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

Translation: Singular "Plural form" unused and meaningless to translators #1610

Open
buhtz opened this issue Jan 19, 2024 · 2 comments
Open
Assignees
Labels
Bug Cosmetics appearance, icons, themes GOOD FIRST ISSUE Used by 24pullrequests.com to suggest issues Low relevant, but not urgent

Comments

@buhtz
Copy link
Member

buhtz commented Jan 19, 2024

config.Config._1_HOUR: _('Every hour'),
config.Config._2_HOURS: ngettext(
'Every {n} hour', 'Every {n} hours', 2).format(n=2),

Results in

grafik

The Singular Form doesn't make much sense from the perspective of translators.

Could be modified into.

config.Config._1_HOUR: ngettext( 
     'Every hour', 'Every {n} hours', 1).format(n=1),
config.Config._2_HOURS: ngettext(
     'Every {n} hour', 'Every {n} hours', 2).format(n=2),

Short tests seems to work.

@buhtz buhtz self-assigned this Jan 19, 2024
@buhtz buhtz added Bug Cosmetics appearance, icons, themes Low relevant, but not urgent labels Jan 19, 2024
@buhtz buhtz added this to the 2nd release from now (1.5.0) milestone Jan 19, 2024
@aryoda
Copy link
Contributor

aryoda commented Jan 19, 2024

The Singular Form doesn't make much sense from the perspective of translators.

So you propose to drop the 1 in case of singular (if I understand the ngettext() signature right (gettext.ngettext(singular, plural, n))?

@buhtz
Copy link
Member Author

buhtz commented Jan 20, 2024

Yes.

@buhtz buhtz added the GOOD FIRST ISSUE Used by 24pullrequests.com to suggest issues label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Cosmetics appearance, icons, themes GOOD FIRST ISSUE Used by 24pullrequests.com to suggest issues Low relevant, but not urgent
Projects
None yet
Development

No branches or pull requests

2 participants