Skip to content

Conversation

@cathysarisky
Copy link
Member

@cathysarisky cathysarisky commented Jul 3, 2025

This is the translation wrapping for Source.
The PR includes French strings generated with AI. My intent is to remove these ASAP, replacing with human translations, but they're useful for inspection of the results.

Note

Adds i18n to the theme using the t helper with en/fr locales, translating common UI strings and introducing pagination, content-CTA, and private page templates.

  • Internationalization:
    • Add locales/en.json and locales/fr.json with translation keys.
    • Replace hardcoded strings with {{t}} across templates (navigation, headers, forms, lightbox, pagination, post metadata, etc.).
    • Update default.hbs title to use {{meta_title page=(t "Page %")}}.
  • New templates/partials:
    • partials/pagination.hbs: localized pagination controls (Newer Posts, Older Posts, Page {page} of {totalPages}).
    • partials/content-cta.hbs: localized member/tier upgrade CTA messaging.
    • private.hbs: localized private site access page.
  • Template updates:
    • partials/components/* and post.hbs: translate labels like Featured, Latest, Read more, Subscribe, Sign in, Account, search prompts, and lightbox controls; parameterize {{reading_time}} with localized minute strings.
    • Footer copyright uses localized Powered by {ghostlink} with injected link.

Written by Cursor Bugbot for commit eb7e562. This will update automatically on new commits. Configure here.

@cathysarisky cathysarisky marked this pull request as ready for review December 9, 2025 22:55
@cathysarisky cathysarisky changed the title (for once we have theme i18next) Full set of translation wrapping Dec 9, 2025
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on January 3

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

"Upgrade": "",
"Upgrade your account": "",
"Zoom in/out": ""
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing translation keys in English locale file

The English locale file en.json is missing two translation keys that are used in templates and exist in fr.json: "% min read" (used in post.hbs for the reading_time helper's minutes parameter) and "and" (used in content-cta.hbs for tier list separators). This inconsistency between locale files may cause translation lookups to fail or display incorrect text for English users.

Additional Locations (2)

Fix in Cursor Fix in Web

@@ -0,0 +1,67 @@
<!DOCTYPE html>
<html class="no-js" lang="en">
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Hardcoded language attribute ignores site locale setting

The new private.hbs template has a hardcoded lang="en" attribute, while default.hbs correctly uses lang="{{@site.locale}}". This causes the private page to always indicate English to browsers and screen readers, even when the page content is displayed in French or another language. The translated strings on this page (like "This site is private." and "Password") will be in the correct language, but the HTML document will incorrectly declare itself as English.

Fix in Cursor Fix in Web

@@ -1,7 +1,7 @@
<form class="gh-form" data-members-form>
<input class="gh-form-input" id="{{email_field_id}}" name="email" type="email" placeholder="jamie@example.com" required data-members-email>
<input class="gh-form-input" id="{{email_field_id}}" name="email" type="email" placeholder="{{t "jamie@example.com"}}" required data-members-email>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Untranslated aria-label inconsistent with visible translated text

The aria-label="Subscribe" attribute remains hardcoded in English while the visible button text was updated to use {{t "Subscribe"}} for translation. This inconsistency means screen reader users will hear "Subscribe" in English even when the visible text is translated to French. Other templates in this PR correctly translate aria-labels (e.g., aria-label="{{t "Menu"}}" in navigation.hbs).

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant