From 3368213c0f7587900a055ee96dde46aea8cd1404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Thu, 12 Mar 2026 10:15:03 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20eliminate=20all=20{@html}=20warnings=20?= =?UTF-8?q?=E2=80=94=20restructure=20legal=20i18n=20data=20and=20disable?= =?UTF-8?q?=20markdown=20exceptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- packages/frontend/src/lib/i18n/locales/en.ts | 122 ++++---- .../routes/admin/articles/[id]/+page.svelte | 1 + .../routes/admin/articles/new/+page.svelte | 1 + .../frontend/src/routes/legal/+page.svelte | 286 ++++++------------ .../src/routes/magazine/[slug]/+page.svelte | 1 + 5 files changed, 169 insertions(+), 242 deletions(-) diff --git a/packages/frontend/src/lib/i18n/locales/en.ts b/packages/frontend/src/lib/i18n/locales/en.ts index 85b8ad3..c9806f6 100644 --- a/packages/frontend/src/lib/i18n/locales/en.ts +++ b/packages/frontend/src/lib/i18n/locales/en.ts @@ -671,37 +671,54 @@ export default { last_updated: "Last updated: September 5, 2025", information: { title: "1. Information We Collect", - text: [ - "Personal Information: When you create an account, we collect information such as your email address, username, and profile information you choose to provide.", - "Content Information: We collect information about the content you upload, view, and interact with on our platform.", + items: [ + { + label: "Personal Information", + text: "When you create an account, we collect information such as your email address, username, and profile information you choose to provide.", + }, + { + label: "Content Information", + text: "We collect information about the content you upload, view, and interact with on our platform.", + }, ], }, information_use: { title: "2. How We Use Your Information", subtitle: "We use your information to:", - text: [ - "
  • Provide and improve our services
  • Communicate with you about your account and our services
  • Personalize your experience on our platform
  • Ensure platform security and prevent fraud
  • Comply with legal obligations
  • ", + items: [ + "Provide and improve our services", + "Communicate with you about your account and our services", + "Personalize your experience on our platform", + "Ensure platform security and prevent fraud", + "Comply with legal obligations", ], }, information_sharing: { title: "3. Information Sharing", subtitle: "We do not sell your personal information. We may share your information in the following circumstances:", - text: [ - "
  • With your consent
  • With service providers who help us operate our platform
  • To comply with legal requirements
  • To protect our rights and the safety of our users
  • In connection with a business transaction
  • ", + items: [ + "With your consent", + "With service providers who help us operate our platform", + "To comply with legal requirements", + "To protect our rights and the safety of our users", + "In connection with a business transaction", ], }, security: { title: "4. Data Security", - text: [ - "We implement appropriate technical and organizational measures to protect your personal information against unauthorized access, alteration, disclosure, or destruction. This includes encryption, secure servers, and regular security audits.", - ], + text: "We implement appropriate technical and organizational measures to protect your personal information against unauthorized access, alteration, disclosure, or destruction. This includes encryption, secure servers, and regular security audits.", }, rights: { title: "5. Your Rights", subtitle: "You have the right to:", - text: [ - "
  • Access your personal information
  • Correct inaccurate information
  • Delete your account and personal information
  • Object to processing of your information
  • Data portability
  • Withdraw consent at any time
  • ", + items: [ + "Access your personal information", + "Correct inaccurate information", + "Delete your account and personal information", + "Object to processing of your information", + "Data portability", + "Withdraw consent at any time", ], }, }, @@ -710,43 +727,47 @@ export default { last_updated: "Last updated: September 5, 2025", acceptance: { title: "1. Acceptance of Terms", - text: [ - "By accessing and using Sexy, you accept and agree to be bound by the terms and provision of this agreement. If you do not agree to abide by the above, please do not use this service.", - ], + text: "By accessing and using Sexy, you accept and agree to be bound by the terms and provision of this agreement. If you do not agree to abide by the above, please do not use this service.", }, age: { title: "2. Age Restriction", - text: [ - "You must be at least 18 years old to use this service. By using our platform, you represent and warrant that you are at least 18 years of age and have the legal capacity to enter into this agreement.", - ], + text: "You must be at least 18 years old to use this service. By using our platform, you represent and warrant that you are at least 18 years of age and have the legal capacity to enter into this agreement.", }, accounts: { title: "3. User Accounts", subtitle: "When creating an account, you agree to:", - text: [ - "
  • Provide accurate and complete information
  • Maintain the security of your account credentials
  • Accept responsibility for all activities under your account
  • Notify us immediately of any unauthorized use
  • ", + items: [ + "Provide accurate and complete information", + "Maintain the security of your account credentials", + "Accept responsibility for all activities under your account", + "Notify us immediately of any unauthorized use", ], }, content: { title: "4. Content Guidelines", subtitle: "All content must comply with our community guidelines. Prohibited content includes:", - text: [ - "
  • Content involving minors
  • Non-consensual content
  • Violent or harmful content
  • Copyrighted material without permission
  • Spam or misleading content
  • ", + items: [ + "Content involving minors", + "Non-consensual content", + "Violent or harmful content", + "Copyrighted material without permission", + "Spam or misleading content", ], }, payment: { title: "5. Payment Terms", subtitle: "For paid services:", - text: [ - "
  • All payments are processed securely through third-party providers
  • Subscriptions renew automatically unless cancelled
  • Refunds are subject to our refund policy
  • Prices may change with 30 days notice
  • ", + items: [ + "All payments are processed securely through third-party providers", + "Subscriptions renew automatically unless cancelled", + "Refunds are subject to our refund policy", + "Prices may change with 30 days notice", ], }, termination: { title: "6. Termination", - text: [ - "We reserve the right to terminate or suspend your account at any time for violations of these terms. You may also terminate your account at any time through your account settings.", - ], + text: "We reserve the right to terminate or suspend your account at any time for violations of these terms. You may also terminate your account at any time through your account settings.", }, }, community: { @@ -754,33 +775,38 @@ export default { description: "Creating a safe and respectful environment for all", values: { title: "Our Community Values", - text: [ - "Sexy is built on respect, consent, and artistic expression. We believe in creating a space where creators and viewers can connect through shared appreciation for intimate art and storytelling.", - ], + text: "Sexy is built on respect, consent, and artistic expression. We believe in creating a space where creators and viewers can connect through shared appreciation for intimate art and storytelling.", }, respect: { title: "Respect and Consent", - text: [ - "
  • All content must be created with full consent of all participants
  • Respect creators' boundaries and content preferences
  • No harassment, bullying, or discriminatory behavior
  • Respect privacy and do not share personal information
  • ", + items: [ + "All content must be created with full consent of all participants", + "Respect creators' boundaries and content preferences", + "No harassment, bullying, or discriminatory behavior", + "Respect privacy and do not share personal information", ], }, standards: { title: "Content Standards", - text: [ - "
  • Content should celebrate love, intimacy, and human connection
  • Artistic and creative expression is encouraged
  • Content must comply with all applicable laws
  • No violent, degrading, or harmful content
  • ", + items: [ + "Content should celebrate love, intimacy, and human connection", + "Artistic and creative expression is encouraged", + "Content must comply with all applicable laws", + "No violent, degrading, or harmful content", ], }, interaction: { title: "Community Interaction", - text: [ - "
  • Engage respectfully in comments and messages
  • Support creators through positive feedback
  • Report inappropriate content or behavior
  • Help maintain a welcoming environment for all
  • ", + items: [ + "Engage respectfully in comments and messages", + "Support creators through positive feedback", + "Report inappropriate content or behavior", + "Help maintain a welcoming environment for all", ], }, enforcement: { title: "Enforcement", - text: [ - "Violations of our community guidelines may result in content removal, account suspension, or permanent ban. We review all reports and take appropriate action to maintain a safe environment.", - ], + text: "Violations of our community guidelines may result in content removal, account suspension, or permanent ban. We review all reports and take appropriate action to maintain a safe environment.", }, }, cookie: { @@ -788,32 +814,24 @@ export default { description: "How we use cookies and similar technologies", what: { title: "What Are Cookies", - text: [ - "Cookies are small text files that are stored on your device when you visit our website. They help us provide you with a better experience by remembering your preferences and improving our services.", - ], + text: "Cookies are small text files that are stored on your device when you visit our website. They help us provide you with a better experience by remembering your preferences and improving our services.", }, types: { title: "Types of Cookies We Use", essential: { title: "Essential Cookies", - text: [ - "These cookies are necessary for the website to function properly. They enable basic features like page navigation and access to secure areas.", - ], + text: "These cookies are necessary for the website to function properly. They enable basic features like page navigation and access to secure areas.", }, }, managing: { title: "Managing Cookies", subtitle: "You can control cookies through:", - text: [ - "
  • Your browser settings
  • Third-party opt-out tools
  • ", - "Please note that disabling certain cookies may affect the functionality of our website.", - ], + items: ["Your browser settings", "Third-party opt-out tools"], + note: "Please note that disabling certain cookies may affect the functionality of our website.", }, third_party: { title: "Third-Party Cookies", - text: [ - "We may use third-party services that set their own cookies. These include analytics providers, payment processors, and content delivery networks. Please refer to their respective privacy policies for more information.", - ], + text: "We may use third-party services that set their own cookies. These include analytics providers, payment processors, and content delivery networks. Please refer to their respective privacy policies for more information.", }, }, questions: "Questions About Our Legal Policies?", diff --git a/packages/frontend/src/routes/admin/articles/[id]/+page.svelte b/packages/frontend/src/routes/admin/articles/[id]/+page.svelte index 1414842..7d6cb0b 100644 --- a/packages/frontend/src/routes/admin/articles/[id]/+page.svelte +++ b/packages/frontend/src/routes/admin/articles/[id]/+page.svelte @@ -167,6 +167,7 @@ class={`rounded-lg border border-border/40 bg-muted/20 p-4 overflow-auto prose prose-sm max-w-none prose-headings:text-foreground prose-p:text-muted-foreground min-h-96 ${editorTab === "write" ? "hidden sm:block" : ""}`} > {#if preview} + {@html preview} {:else}

    diff --git a/packages/frontend/src/routes/admin/articles/new/+page.svelte b/packages/frontend/src/routes/admin/articles/new/+page.svelte index ed3916e..f89223a 100644 --- a/packages/frontend/src/routes/admin/articles/new/+page.svelte +++ b/packages/frontend/src/routes/admin/articles/new/+page.svelte @@ -151,6 +151,7 @@ class={`rounded-lg border border-border/40 bg-muted/20 p-4 overflow-auto prose prose-sm max-w-none prose-headings:text-foreground prose-p:text-muted-foreground min-h-96 ${editorTab === "write" ? "hidden sm:block" : ""}`} > {#if preview} + {@html preview} {:else}

    diff --git a/packages/frontend/src/routes/legal/+page.svelte b/packages/frontend/src/routes/legal/+page.svelte index 4742171..da0cb51 100644 --- a/packages/frontend/src/routes/legal/+page.svelte +++ b/packages/frontend/src/routes/legal/+page.svelte @@ -5,6 +5,9 @@ import { Separator } from "$lib/components/ui/separator"; import SexyBackground from "$lib/components/background/background.svelte"; import Meta from "$lib/components/meta/meta.svelte"; + import en from "$lib/i18n/locales/en"; + + const legal = en.legal; let activeTab = $state("privacy"); @@ -35,19 +38,19 @@ - {$_("legal.privacy.title")} + {legal.privacy.title} - {$_("legal.terms.title")} + {legal.terms.title} - {$_("legal.community.title")} + {legal.community.title} - {$_("legal.cookie.title")} + {legal.cookie.title} @@ -57,47 +60,30 @@ - {$_("legal.privacy.title")} + {legal.privacy.title} -

    - {$_("legal.privacy.last_updated")} -

    +

    {legal.privacy.last_updated}

    -

    - {$_("legal.privacy.information.title")} -

    +

    {legal.privacy.information.title}

    -

    - {@html $_("legal.privacy.information.text.0")} -

    -

    - {@html $_("legal.privacy.information.text.1")} -

    - - + {#each legal.privacy.information.items as item (item.label)} +

    {item.label}: {item.text}

    + {/each}
    -

    - {$_("legal.privacy.information_use.title")} -

    +

    {legal.privacy.information_use.title}

    -

    {$_("legal.privacy.information_use.subtitle")}

    +

    {legal.privacy.information_use.subtitle}

      - {@html $_("legal.privacy.information_use.text.0")} + {#each legal.privacy.information_use.items as item (item)} +
    • {item}
    • + {/each}
    @@ -106,14 +92,14 @@

    - {$_("legal.privacy.information_sharing.title")} + {legal.privacy.information_sharing.title}

    -

    - {$_("legal.privacy.information_sharing.subtitle")} -

    +

    {legal.privacy.information_sharing.subtitle}

      - {@html $_("legal.privacy.information_sharing.text.0")} + {#each legal.privacy.information_sharing.items as item (item)} +
    • {item}
    • + {/each}
    @@ -121,24 +107,20 @@
    -

    - {$_("legal.privacy.security.title")} -

    -

    - {@html $_("legal.privacy.security.text.0")} -

    +

    {legal.privacy.security.title}

    +

    {legal.privacy.security.text}

    -

    - {$_("legal.privacy.rights.title")} -

    +

    {legal.privacy.rights.title}

    -

    {$_("legal.privacy.rights.subtitle")}

    +

    {legal.privacy.rights.subtitle}

      - {@html $_("legal.privacy.rights.text.0")} + {#each legal.privacy.rights.items as item (item)} +
    • {item}
    • + {/each}
    @@ -152,43 +134,33 @@ - {$_("legal.terms.title")} + {legal.terms.title} -

    - {$_("legal.terms.last_updated")} -

    +

    {legal.terms.last_updated}

    -

    - {$_("legal.terms.acceptance.title")} -

    -

    - {@html $_("legal.terms.acceptance.text.0")} -

    +

    {legal.terms.acceptance.title}

    +

    {legal.terms.acceptance.text}

    -

    - {$_("legal.terms.age.title")} -

    -

    - {@html $_("legal.terms.age.text.0")} -

    +

    {legal.terms.age.title}

    +

    {legal.terms.age.text}

    -

    - {$_("legal.terms.accounts.title")} -

    +

    {legal.terms.accounts.title}

    -

    {$_("legal.terms.accounts.subtitle")}

    +

    {legal.terms.accounts.subtitle}

      - {@html $_("legal.terms.accounts.text.0")} + {#each legal.terms.accounts.items as item (item)} +
    • {item}
    • + {/each}
    @@ -196,15 +168,13 @@
    -

    - {$_("legal.terms.content.title")} -

    +

    {legal.terms.content.title}

    -

    - {$_("legal.terms.content.subtitle")} -

    +

    {legal.terms.content.subtitle}

      - {@html $_("legal.terms.content.text.0")} + {#each legal.terms.content.items as item (item)} +
    • {item}
    • + {/each}
    @@ -212,13 +182,13 @@
    -

    - {$_("legal.terms.payment.title")} -

    +

    {legal.terms.payment.title}

    -

    {$_("legal.terms.payment.subtitle")}

    +

    {legal.terms.payment.subtitle}

      - {@html $_("legal.terms.payment.text.0")} + {#each legal.terms.payment.items as item (item)} +
    • {item}
    • + {/each}
    @@ -226,12 +196,8 @@
    -

    - {$_("legal.terms.termination.title")} -

    -

    - {@html $_("legal.terms.termination.text.0")} -

    +

    {legal.terms.termination.title}

    +

    {legal.terms.termination.text}

    @@ -243,70 +209,54 @@ - {$_("legal.community.title")} + {legal.community.title} -

    - {$_("legal.community.description")} -

    +

    {legal.community.description}

    -

    - {$_("legal.community.values.title")} -

    -

    - {@html $_("legal.community.values.text.0")} -

    +

    {legal.community.values.title}

    +

    {legal.community.values.text}

    -

    - {$_("legal.community.respect.title")} -

    -
    -
      - {@html $_("legal.community.respect.text.0")} -
    -
    +

    {legal.community.respect.title}

    +
      + {#each legal.community.respect.items as item (item)} +
    • {item}
    • + {/each} +
    -

    - {$_("legal.community.standards.title")} -

    -
    -
      - {@html $_("legal.community.standards.text.0")} -
    -
    +

    {legal.community.standards.title}

    +
      + {#each legal.community.standards.items as item (item)} +
    • {item}
    • + {/each} +
    -

    - {$_("legal.community.interaction.title")} -

    -
    -
      - {@html $_("legal.community.interaction.text.0")} -
    -
    +

    {legal.community.interaction.title}

    +
      + {#each legal.community.interaction.items as item (item)} +
    • {item}
    • + {/each} +
    -

    - {$_("legal.community.enforcement.title")} -

    -

    - {@html $_("legal.community.enforcement.text.0")} -

    +

    {legal.community.enforcement.title}

    +

    {legal.community.enforcement.text}

    @@ -318,88 +268,48 @@ - {$_("legal.cookie.title")} + {legal.cookie.title} -

    - {$_("legal.cookie.description")} -

    +

    {legal.cookie.description}

    -

    - {$_("legal.cookie.what.title")} -

    -

    - {@html $_("legal.cookie.what.text.0")} -

    +

    {legal.cookie.what.title}

    +

    {legal.cookie.what.text}

    -

    - {$_("legal.cookie.types.title")} -

    +

    {legal.cookie.types.title}

    -

    - {$_("legal.cookie.types.essential.title")} -

    -

    - {@html $_("legal.cookie.types.essential.text.0")} -

    +

    {legal.cookie.types.essential.title}

    +

    {legal.cookie.types.essential.text}

    -
    -

    - {$_("legal.cookie.managing.title")} -

    +

    {legal.cookie.managing.title}

    -

    {$_("legal.cookie.managing.subtitle")}

    +

    {legal.cookie.managing.subtitle}

      - {@html $_("legal.cookie.managing.text.0")} + {#each legal.cookie.managing.items as item (item)} +
    • {item}
    • + {/each}
    -

    - {@html $_("legal.cookie.managing.text.1")} -

    +

    {legal.cookie.managing.note}

    -

    - {$_("legal.cookie.third_party.title")} -

    -

    - {@html $_("legal.cookie.third_party.text.0")} -

    +

    {legal.cookie.third_party.title}

    +

    {legal.cookie.third_party.text}

    @@ -409,14 +319,10 @@ -

    - {$_("legal.questions")} -

    -

    - {$_("legal.questions_description")} -

    - {$_("legal.questions_email")}{legal.questions} +

    {legal.questions_description}

    + {legal.questions_email}
    diff --git a/packages/frontend/src/routes/magazine/[slug]/+page.svelte b/packages/frontend/src/routes/magazine/[slug]/+page.svelte index e382fd2..b0a4d71 100644 --- a/packages/frontend/src/routes/magazine/[slug]/+page.svelte +++ b/packages/frontend/src/routes/magazine/[slug]/+page.svelte @@ -116,6 +116,7 @@
    + {@html marked.parse(data.article.content ?? "")}