-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
There was a problem hiding this 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.
There was a problem hiding this 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 usinguseMemo
. 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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this and all the other L10n work.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
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