The LibreOffice code base, due to historical reasons, has lots of quasi-duplicate translatable strings in its resources, whose only difference is the grammatical number; e.g. “rounded rectangle” / “rounded rectangles”. For l10n purposes, this is not optimal for the many languages that do not fit with English’s pluralization paradigm — for example, Arabic has up to six plural forms, Slavic languages have three, and even those languages with two plural forms do not exactly fit with English (like Portuguese, where “0 items” should be “0 ítem”, singular). Until very recently, thanks to the work of Caolán, we are now able to use ngettext to support those languages whose pluralization has either fewer or more forms than English (two). ngettext deals with all the problems enumerated above, so LibreOffice should gradually be upgraded to use it. Multiple people can work on this as time permits.
First code pointer: https://git.libreoffice.org/core/+/master/include/svx/strings.hrc
It could be interesting to have some examples of patches. For example, I see this: #define STR_ObjNameSingulNONE NC_("STR_ObjNameSingulNONE", "Drawing object") #define STR_ObjNamePluralNONE NC_("STR_ObjNamePluralNONE", "Drawing objects") First one is used in TakeObjNameSingul, the second in TakeObjNamePlural in svx/source/svdraw/svdobj.cxx Then what should I do for this case?
Sorry for not providing enough pointers. Hope these help: https://cgit.freedesktop.org/libreoffice/core/commit/?id=2116f1d7932aa778afb14daf9cf5cd3df7b05fc1 https://cgit.freedesktop.org/libreoffice/core/commit/?id=791aeac1e492d3f3b6c99fa480226c0b2cc4f7d6 https://cgit.freedesktop.org/libreoffice/core/commit/?id=97a5da96159f28de0b846de7dd94d2880251e8b3
Thank you Adolfo for the feedback. 3 commits quoted and 3 ways to do it. Too complicate for me=>uncc myself.
This could be an easyhack I guess? A couple of cases here: https://git.libreoffice.org/core/+/master/filter/inc/strings.hrc#41 https://git.libreoffice.org/core/+/master/filter/inc/strings.hrc#44