-
Notifications
You must be signed in to change notification settings - Fork 578
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
Grammar bug in bookshelf and vessels shelf #3076
Comments
Unfortunately, the Minetest TR format does not support numerus (e.g. singluar/plural in English). So a workaround for this would be to slightly repharse the string. |
Alternative workaround: Add a second translation string for the singular case (good enough for languages which distinguish this case). Alternative rephrasing of the string: Parenthesize the plural: |
The problem with the "alternative workaround" is that it doesn't work. Many languages do NOT have a singlular/plural system like English. Check out this list: https://www.unicode.org/cldr/cldr-aux/charts/29/supplemental/language_plural_rules.html |
As said, it works good enough for language which have a singular/plural system. Other languages can still use a rephrasing in their translation of the plural case if it would need to be further distinguished; there is no need to make the English formulation suck for this. |
This comes back to an issue with the way translation is handled based on source language strings as the key: What if in other languages, there could be more than one translation that needs to be performed for pluralisation, declension and so on? The Minetest built-in translator is a 1:1, bijective function*. It can't act as a relation and there's no apparent way to feed it information to reduce such a relation into a function. The only way we can get multiple output strings is to vary the source strings. There are extensions to the basic idea of translating strings that add more information. For instance, the WordPress environment has additional arguments in some functions for context, and plural/singular form. That still leaves out languages with other forms, like special cases for two of something or "a small number of", as Wuzzy mentioned - and I will add a few more links: Linguistics StackExchange Are there any languages with different plural forms for different numbers? and Wikipedia's article on Grammatical Number. But I have already seen what Wuzzy seems to consider bodges in terms of plural and declension in existing translations of Minetest mods. Let me see what I have in terms of / for alternation of declined forms in my installed mods:
Note how the practice transcends any particular language, and is used for plural and gender; it is used in German, Spanish, Czech, Italian. Again, with (s) for plural, it has a precedent of being used and translated:
Of course, there are exceptions; sometimes the translation avoids it:
I think in this case, perfect is the enemy of good. It is better to have a simple singular & plural in English and allow it to be translated into many languages, perhaps however imperfectly, instead of waiting indefinitely for the perfect translation APIs to do it with. That is a discussion for the engine or a 3rd party i18n mod to have. *I will accept that it may not be considered injective if we include instances where the translator has written the same string as a translation for multiple source strings, but this isn't typically a good translation. |
By the way: Gettext has solved this problem ages ago. |
That solution is out of scope for MTG; that is a MTE discussion to be had. At the MTG level, all we can do is consider which workaround works best given the current engine capabilities. |
gettext manual link: So it boils down to a C expression that resolves plural forms into the right string, placed at the top of a locale file. That certainly has its pros and cons. It also makes me wonder if Minetest mods would all need to put the same boilerplate at the top of locale files. But it's definitely a discussion for the engine to have about how it will extend the translation functions. I don't think it's Minetest Game's place to make its own i18n library. |
This is a grammatical error.
If you put exactly 1 book in a bookshelf, the infotext says it has "1 empty books".
If you put exactly 1 glass bottle in a vessels shelf, the info text says it has "1 items".
The text was updated successfully, but these errors were encountered: