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

Transifex pluralization configuration #323

Open
yolile opened this issue Aug 9, 2021 · 1 comment
Open

Transifex pluralization configuration #323

yolile opened this issue Aug 9, 2021 · 1 comment
Labels

Comments

@yolile
Copy link
Member

yolile commented Aug 9, 2021

There are some strings in transifex that can only be in the plural, like this one:
image

but they are configured as pluralizable so the translator must fill in the singular and plural translation.

@jpmckinney
Copy link
Member

jpmckinney commented Aug 9, 2021

I see the code for these:

case 1:
translated = this.$ngettext('There is one array in this table', 'There is one array in this table');
break;
case 2:
translated = this.$ngettext('There are two arrays in this table', 'There are two arrays in this table');
break;
case 3:
translated = this.$ngettext(
'There are three arrays in this table',
'There are three arrays in this table'
);
break;
case 4:
translated = this.$ngettext(
'There are four arrays in this table',
'There are four arrays in this table"'
);
break;
case 5:
translated = this.$ngettext(
'There are five arrays in this table',
'There are five arrays in this table'
);
break;
default:
translated = this.$ngettext(
'There is %{ n } array in this table',
'There are %{ n } arrays in this table'
);

I think it's fine to remove the cases 1-5 and just use numbers like in the default case instead of "one", "two", "three", etc.

@sabahfromlondon I don't know if you had a strong opinion on words vs. numbers? Words unfortunately make for very repetitive code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants