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

Add spanish localizations #1317

Merged
merged 4 commits into from
Nov 20, 2024
Merged

Add spanish localizations #1317

merged 4 commits into from
Nov 20, 2024

Conversation

katherinejensen00
Copy link
Contributor

@katherinejensen00 katherinejensen00 commented Nov 19, 2024

Added more spanish localizations in core, partially as a test to make sure there weren't any unknown infinite loops caused by localization.


This change is Reviewable

Copy link
Contributor

@irahopkinson irahopkinson left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. On a broader scale it doesn't seem right that we have to add the same strings in several places for our L10n strategy to work. I'm guessing you have noticed that the build is failing?

Reviewed 6 of 6 files at r1, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @katherinejensen00)


extensions/src/paratext-registration/src/paratext-registration.web-view.tsx line 88 at r1 (raw file):

  }, []);

  const [localizedStrings] = useLocalizedStrings(useMemo(() => LOCALIZED_STRING_KEYS, []));

Curious why this memo was needed? It doesn't fit my understanding of React since the const is declared outside the function it is already stable and doesn't need the cost of using useMemo. If this is needed then there are other places in code to change this also.


assets/localization/es.json line 4 at r1 (raw file):

  "%about_versionLabel_format%": "Versión: {version}",
  "%about_licenseLabel_format%": "Licencia: {license}",
  "%Book.GEN%": "Génesis",

BTW any reason Book is capitalized and has a dot separator (just noting it doesn't follow the existing pattern)?


extensions/src/hello-world/contributions/localizedStrings.json line 54 at r1 (raw file):

      "%project_settings_helloWorld_headerColor_description%": "Color of the headers (must be a valid [HTML color name](https://htmlcolorcodes.com/color-names/))"
    },
    "es": {

BTW curious why we a localizing non-user facing extensions? Is this just for testing L10n?


assets/localization/es.json line 6 at r1 (raw file):

  "%insertNote%": "Insertar Nota",
  "%mainMenu_about%": "Acerca de Platform.Bible",
  "%mainMenu_downloadSlashInstallResources%": "Descargar/instalar recursos",

FYI good spotting that "Slash" doesn't belong in the key name.

Copy link
Contributor Author

@katherinejensen00 katherinejensen00 left a comment

Choose a reason for hiding this comment

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

That is a good point. I am not sure what the answer is, besides artificially making them different in the short term. I noticed the build was failing, but was having trouble deciphering the message. Duplicate keys across files makes sense though. Thanks!

Reviewable status: 5 of 6 files reviewed, 3 unresolved discussions (waiting on @irahopkinson)


assets/localization/es.json line 4 at r1 (raw file):

Previously, irahopkinson (Ira Hopkinson) wrote…

BTW any reason Book is capitalized and has a dot separator (just noting it doesn't follow the existing pattern)?

To be consistent with P9 Scripture book localization patterns


assets/localization/es.json line 6 at r1 (raw file):

Previously, irahopkinson (Ira Hopkinson) wrote…

FYI good spotting that "Slash" doesn't belong in the key name.

That was TJ's idea


extensions/src/hello-world/contributions/localizedStrings.json line 54 at r1 (raw file):

Previously, irahopkinson (Ira Hopkinson) wrote…

BTW curious why we a localizing non-user facing extensions? Is this just for testing L10n?

Exactly, just using this as a testing playground, especially since hello world contains an eclectic group of things, it can have some unique scenarios that are good for testing.


extensions/src/paratext-registration/src/paratext-registration.web-view.tsx line 88 at r1 (raw file):

Previously, irahopkinson (Ira Hopkinson) wrote…

Curious why this memo was needed? It doesn't fit my understanding of React since the const is declared outside the function it is already stable and doesn't need the cost of using useMemo. If this is needed then there are other places in code to change this also.

You are right. I had a problem with a similar piece of code, but I didn't realize that one had declared the strings inside the function and the other hadn't. I removed this one. Thanks for teaching me something new!

Copy link
Contributor

@irahopkinson irahopkinson left a comment

Choose a reason for hiding this comment

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

:lgtm: thanks for this and all the other L10n work.

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@katherinejensen00 katherinejensen00 merged commit 569c339 into main Nov 20, 2024
7 checks passed
@katherinejensen00 katherinejensen00 deleted the Add-Spanish-Localizations branch November 20, 2024 21:05
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.

2 participants