Skip to content

Fix i18n issues#828

Merged
ianhi merged 7 commits intoxarray-contrib:mainfrom
ianhi:fix-i18n-issues
Feb 16, 2026
Merged

Fix i18n issues#828
ianhi merged 7 commits intoxarray-contrib:mainfrom
ianhi:fix-i18n-issues

Conversation

@ianhi
Copy link
Contributor

@ianhi ianhi commented Feb 16, 2026

Several nitpicky follow up issues (found by cluade) as a follow up to #772

  • Missing or misplaced t relative to the backtick
  • phrases with multiple parts were sometimes missing a t on part of it
  • useMemo or and loadCatalog
    • fix some stale caching of useMemo on some components (this only matters on localhost - not on the static site, but still nice to fix so someone doesn't run into it in local dev move in the future)
    • loadcatalog fixes things like pages like teams being broken (whoops that i missed that 😬 ) https://xarray.dev/en/team

heads up @melissawm these are teh issues i was referring to.

to get the new translations to show up properly in english i had to run:

npx lingui extract
npx linugui compile

ianhi and others added 6 commits February 15, 2026 16:27
- Fix MetPy description: `tCollection...` -> t`Collection...` (stray t inside backticks)
- Fix footer copyright: "Apache 2.0Licensed." -> "Apache 2.0 Licensed." (missing space)
- Wrap remaining unwrapped project descriptions and domains for translation
  (hvPlot, Pangeo, cf-xarray, omfit, sgkit, xmip)
- Also fix double space in cf-xarray description

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- features.js: Wrap "Arbitrary metadata tracking" text
- repl.js: Wrap "Try Xarray" heading
- donate.js: Wrap "501(c)(3) nonprofit charity" link text
- timeline-plot-container.js: Wrap "Issues" tab and include end date
  inside translation string

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The useMemo with empty deps ([]) caches data from the first render
and never updates. When the locale changes, the data functions return
new translated strings but useMemo returns the stale cached values.
Since these data functions are cheap to call, just remove useMemo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These pages use translated strings but had no getStaticProps calling
loadCatalog, so translations wouldn't load on direct page access or
SSR in non-English locales. Also wraps the team page title for
translation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Concatenating translated fragments with regular strings (e.g.
value + t\`hours\`) prevents translators from reordering the full
phrase. Use single t\`...\` tagged templates with interpolations
so translators see the complete string.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These pages intentionally don't load translations (blog content is
not translated), so the import is dead code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@netlify
Copy link

netlify bot commented Feb 16, 2026

Deploy Preview for xarraydev ready!

Name Link
🔨 Latest commit 64e3738
🔍 Latest deploy log https://app.netlify.com/projects/xarraydev/deploys/6992616b71c8ff0008976761
😎 Deploy Preview https://deploy-preview-828--xarraydev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Run lingui extract + compile to add catalog entries for newly
wrapped strings. Without this, Lingui shows internal message ID
hashes instead of the actual text.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ianhi
Copy link
Contributor Author

ianhi commented Feb 16, 2026

seems to have fixed some of the issues: https://deploy-preview-828--xarraydev.netlify.app/pt/team

@ianhi
Copy link
Contributor Author

ianhi commented Feb 16, 2026

I'm going to merge this asap because there are some very clearly broken pages on the website which deserve fixing. but I'd love to hear if my changes the .po files are ok and done correctly

@ianhi ianhi merged commit 62a344d into xarray-contrib:main Feb 16, 2026
5 checks passed
@ianhi ianhi deleted the fix-i18n-issues branch February 16, 2026 00:25
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