Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain term isn't translating in ResultsCard #7

Open
petermenzies opened this issue Sep 25, 2023 · 1 comment
Open

Certain term isn't translating in ResultsCard #7

petermenzies opened this issue Sep 25, 2023 · 1 comment

Comments

@petermenzies
Copy link
Collaborator

Current package version info:

  • seasketch/geoprocessing: 3.0.1-alpha.19
  • react-i18next: ^12.2.0

Issue:

The term Shipping Intensity won't seem to translate in any ResultsCard components in these reports. When the language is changed in storybook and in production, this term remains in English while other terms successfully translate.

Example of the behavior in storybook:
image

The initial aim was to use the term as the ToolbarCard title in ShippingIntensityCard.tsx here:

return (
<ToolbarCard
title={t("Shipping")}
items={
<LayerToggle
label={mapLabel}
layerId={metricGroup.layerId}
simple
/>
}
>

When that didn't work, I tested using the term in other locations besides the ToolbarCard title and in other .tsx files, which all yielded the same result.


The term was successfully extracted and published to POEditor

image

And it was successfully imported into the project:

"Wind Farms": "Parques Eólicos",
"Shipping Intensity": "Intensidade de Transporte Marítimo",
"Shipping": "Transporte Marítimo",

It's also successfully recognized by the i18n ally extension:

image

Eventually I worked around this by renaming the report title to Shipping, which translates just fine.


@twelch
Copy link
Contributor

twelch commented Sep 25, 2023

That is a little crazy that changing the string worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants