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

l10n: Add singular and plural #324

Open
Valdnet opened this issue Sep 27, 2020 · 6 comments
Open

l10n: Add singular and plural #324

Valdnet opened this issue Sep 27, 2020 · 6 comments

Comments

@Valdnet
Copy link
Contributor

Valdnet commented Sep 27, 2020

I propose to add singular and plural variation for a text string:

  • %s messages shown of %s messages stored in database.

<div id="ocsms-phone-msg-nb"><?php p($l->t('%s messages shown of %s messages stored in database.', array( '{{ messages.length }}', '{{ totalMessageCount }}')));?></div>

May be helpful:
https://github.com/nextcloud/server/blob/a2a3b87c19662f06cfb804b9fead7e939b1c3e6c/core/src/globals.js#L139-L148

@e-alfred
Copy link
Collaborator

Could you provide a PR for this change?

@Valdnet
Copy link
Contributor Author

Valdnet commented Dec 27, 2020

@e-alfred I think this should be done by someone who knows more about PHP programming 😉.

@e-alfred
Copy link
Collaborator

Is this the only occurrence? Did you find more instances that should be changed? I changed this particular one last time at the request of @rakekniven.

@Valdnet
Copy link
Contributor Author

Valdnet commented Dec 27, 2020

Is this the only occurrence? Did you find more instances that should be changed?

So far, only this string text has noticed.

@rakekniven
Copy link
Member

Just did a blame and remember now :-)
My thoughts have been that you will not have only one message in your database and instead of overworking the code I just made a tiny suggestion to only use plural form.

@Valdnet
Copy link
Contributor Author

Valdnet commented Dec 29, 2020

My thoughts have been that you will not have only one message in your database

@rakekniven But you also have to take into account the number of messages to be displayed 😉.

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

No branches or pull requests

3 participants