Historical bug tracker for the Pacman package manager.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues
This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
FS#70556 - Use plural-form string with ngettext in pacman-key
Attached to Project:
Pacman
Opened by Rafael Fontenelle (josephg) - Friday, 23 April 2021, 09:43 GMT
Opened by Rafael Fontenelle (josephg) - Friday, 23 April 2021, 09:43 GMT
|
DetailsSummary and Info:
Two strings from 'pacman-key' contain a variable for key count, and as such should be used as plural-form string[1]. Not using a plural-form string, might be OK in English and most languages, but might be harder for other languages with a more complex plural rules[2]. The strings are: - "Disabled %s keys." (line 376) - "Locally signed %s keys." (line 507) My suggestion is to use "ngettext" and set a singular and a plural versions of this string, even if the singular form is never going to be used. This way 1) translators are sure that %s means a count, and 2) the translation respects the target locale's plural-form. See attached git-diff from master branch. [1] https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html [2] http://docs.translatehouse.org/projects/localization-guide/en/latest/l10n/pluralforms.html |
This task depends upon
Comment by Allan McRae (Allan) -
Sunday, 04 December 2022, 10:22 GMT
This requires slightly more work. We test if gettext is present and fallback to a plain printf if not. Something similar needs done for ngettext.
Comment by Allan McRae (Allan) -
Friday, 23 December 2022, 07:35 GMT
https://gitlab.archlinux.org/pacman/pacman/-/merge_requests
use-ngettext.diff