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: Singular and plural #86

Closed
Valdnet opened this issue Apr 13, 2022 · 3 comments
Closed

l10n: Singular and plural #86

Valdnet opened this issue Apr 13, 2022 · 3 comments
Labels
technical debt Technical issue

Comments

@Valdnet
Copy link

Valdnet commented Apr 13, 2022

@skjnldsv For the following text string, add singular and plural for {limit} and {countLeft}.

title: t('files_downloadlimit', 'This share was limited to {limit} downloads. There is still {countLeft} left allowed.', { limit: this._store.limit, countLeft }),

You should also think about separating sentences, because there may be different situations in which the limit of downloads for the remaining downloads to be downloaded may be different.

@skjnldsv
Copy link
Member

You should also think about separating sentences, because there may be different situations in which the limit of downloads for the remaining downloads to be downloaded may be different.

Could you clarify? :)
Not sure I get it

@Valdnet
Copy link
Author

Valdnet commented Apr 13, 2022

Could you clarify? :)

For downloads greater than or equal to 5:
This share was limited to 5 downloads. There is still 4 left allowed.
This share was limited to 5 downloads. There is still 2 left allowed.
This share was limited to 5 downloads. There is still 1 left allowed.
This share was limited to 10 downloads. There is still 5 left allowed.
This share was limited to 10 downloads. There is still 4 left allowed.
This share was limited to 10 downloads. There is still 2 left allowed.
This share was limited to 10 downloads. There is still 1 left allowed.

For downloads from 2 to 4:
This share was limited to 2 downloads. There is still 1 left allowed.
This share was limited to 3 downloads. There is still 2 left allowed.
This share was limited to 3 downloads. There is still 1 left allowed.
This share was limited to 4 downloads. There is still 3 left allowed.
This share was limited to 4 downloads. There is still 2 left allowed.
This share was limited to 4 downloads. There is still 1 left allowed.

If the text string appears up to the 1 download limit then also:
This share was limited to 1 download. There is still 1 left allowed.

Note that there may be a text string with a limit of e.g. 10 downloads, where e.g. 5 more are available, but there may e.g. be 2 more downloads available.
Therefore, the text string must be split into two text strings:
This share was limited to {limit} downloads.
There is still {countLeft} left allowed.
This is the only way to match the appropriate singular or plural for the variable {limit} and and separately for the variable {countLeft}.

@joshtrichards joshtrichards added the technical debt Technical issue label Jun 8, 2024
@susnux
Copy link
Contributor

susnux commented Aug 8, 2024

Fixed with the Typescript rewrite

@susnux susnux closed this as completed Aug 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
technical debt Technical issue
Projects
None yet
Development

No branches or pull requests

4 participants