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

Translate SI units and prefixes #553

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Translate SI units and prefixes #553

wants to merge 5 commits into from

Conversation

jeremypw
Copy link
Collaborator

@jeremypw jeremypw commented Oct 17, 2022

Fixes #552

Rather than using the context translation function NC_() to mark array initialisers as translatable (which does not seem to result in any new entries in the .po files for some reason), the more usual N_() function is used and the context provided with TRANSLATOR comments.

Missing translation functions on the output are provided.
The possibility of translating the SI prefixes is also implemented.

@tintou
Copy link
Member

tintou commented Oct 18, 2022

I really feel that this should be reworked to take into account two things for i18n:

  • One can't assume that every language will do a "$PREFIX$UNIT"
  • One has to take plural into account and use ngettext()

@jeremypw
Copy link
Collaborator Author

One can't assume that every language will do a "$PREFIX$UNIT"

Do you mean that some languages will have "$UNIT$PREFIX"? That can be handled by the translation can't it? If you mean some languages will have a completely different single word for e.g. "centimeter" then that is a harder problem. We cannot really provide separate translations for all possible combinations.

One has to take plural into account and use ngettext()

The information in brackets "( to ) is intentionally unpluralized as it is not intended to be a sentence. It is there to disambiguate some cases where there is more than one possible interpretation of the entry and more than one result is given. Pluralizing would also extend the scope of this PR as it is not pluralized in master. Maybe it would be better to replace "to" with a untranslated symbol "=>" to make it clear it is not a sentence?

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.

SI units are not translatable
3 participants