https://bugs.documentfoundation.org/show_bug.cgi?id=173991
Bug ID: 173991
Summary: Make it easier to translate number strings that might
be zero
Product: LibreOffice
Version: unspecified
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Localization
Assignee: [email protected]
Reporter: [email protected]
There are two places where LibreOffice has a string like “%1 matches found” and
the %1 can sometimes be zero. These are using the ngettext mechanism so that
the translator can translate the string different ways for each plural form.
When there is only one result the original string in English is “One match
found”. This can be confusing to translate because in some languages zero uses
the same plural form as one. So if the translator translates that string
literally and keeps the “one” in there then the UI will be very confusing
because it will say the translated form of “one match found” even when there
are no matches. This is currently the case for the French, Brazilian
Portuguese, Indonesian and Punjabi translations.
Steps to reproduce for the string in Writer:
1) Use the French UI language
2) Create an empty Writer document
3) Select “Rechercher” from the panel burger menu at the top right of the
window to open the search panel.
4) Type something into the search box and press enter.
It will say “Une correspondance trouvée” (one match found) even though nothing
was found.
Steps to reproduce for the string in Calc:
1) Use the French UI language
2) Create an empty Calc document
3) Click Édition -> Rechercher et Remplacer from the menu.
4) Click “Autres options”
5) Select the “Styles de cellules” checkbox
6) Click “Tout rechercher”
A new dialog box will appear with the message “Une correspondance trouvée” even
though there are no results listed.
The translators could fix this by changing the first plural form message to
something like “%1 match found” so that it will come out as either “0 match
found” or “1 match found” (where something like “0 match found” is probably
right for French).
On the other hand we could fix this in code as well to have a separate string
for zero like “no matches found”. This could be nice because it’s more natural
in English too and then it doesn’t matter if the translators get the
translation for the other string wrong.
I made patches for that here:
https://gerrit.libreoffice.org/c/core/+/212372
and here:
https://gerrit.libreoffice.org/c/core/+/212373
For more information please see the discussion on the localisation mailing
list:
https://listarchives.libreoffice.org/global/l10n/2026/msg00234.html
--
You are receiving this mail because:
You are the assignee for the bug.