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

Cita preferences (and item pane section header and sidenav) not translated to some languages #288

Open
Tracked by #257
diegodlh opened this issue Aug 22, 2024 · 3 comments

Comments

@diegodlh
Copy link
Owner

Cita preferences are not translated to most of the languages we support.

Apparently they are only translated to English (en-US) and German (de), and all other translations are ignored.

Because both en-US and de are supported locales by Zotero, I guess this may be related to the way how we support locales not supported by Zotero (see 15de93b). Note, however, that they are not translated to zh-Hant and zh-Hans, even though these are supported by Zotero, and we have preferences translations for these languages.

Maybe this could be fixed if we move that piece of code from src/utils/locale.ts to static/bootstrap.js, as suggested here?

The thread I opened in the zotero-dev mailing list may provide further ideas: https://groups.google.com/g/zotero-dev/c/GUovOSrtQy4

@diegodlh
Copy link
Owner Author

Note that translations do work in citationEditor.xhtml, citationImporter.xhtlm and identifierImporter.xhtml (have not tried selector.xhtml).

However, these use Wikicite.getString() (which in turn relies on our custom Localization object set up by our initLocale function), as opposed to preferences.xhtml which relies on native Fluent markup-based approach.

@diegodlh
Copy link
Owner Author

Noting too that Zotero.plugins.registerLocales() seems to be running before the extension bootstrap.js' startup() function. So moving the aforementioned code into bootstrap.js will probably not fix this issue.

@diegodlh diegodlh changed the title Cita preferences not translated to some languages Cita preferences (and item pane section header and sidenav) not translated to some languages Aug 23, 2024
@diegodlh
Copy link
Owner Author

7033ea2 fixed that the item pane section header label and sidenav tooltiptext did not show.

However, they also seem to be not translated to languages other than en-US and de.

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

No branches or pull requests

1 participant