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: There is no text string in Transifex #3441

Open
Valdnet opened this issue Aug 31, 2021 · 7 comments
Open

l10n: There is no text string in Transifex #3441

Valdnet opened this issue Aug 31, 2021 · 7 comments
Labels
1. to develop Accepted and waiting to be taken care of bug language l10n and translations

Comments

@Valdnet
Copy link
Contributor

Valdnet commented Aug 31, 2021

The following text string is missing from Transifex:

label: this.$t('calendar', 'second'),

return t('calendar', 'second')

obraz

This is because a similar text string is found in this:

label: this.$n('calendar', 'second', 'seconds', this.count),

obraz

which is in the plural.

@ChristophWurst Do you have any idea for that?

@Valdnet Valdnet added bug 0. to triage Pending approval or rejection labels Aug 31, 2021
@tcitworld tcitworld added 1. to develop Accepted and waiting to be taken care of and removed 0. to triage Pending approval or rejection labels Sep 1, 2021
@tcitworld
Copy link
Member

I think we already had the issue once.

@rakekniven
Copy link
Member

Still the same for v3.0.1 on NC v22.2.3
Browser: Firefox v94
OS: macOS Big Sur 11.6.1

@st3iny
Copy link
Member

st3iny commented Dec 1, 2021

So I dove into gettext and found the root of this problem. Every msgid inside a PO file has to be unique. In calendar there is an ambiguity between "second" singular and "second/seconds" plural. Both instances are assigned to the same msgid "second" which is not allowed.

However, more modern versions of gettext are able to handle message contexts but neither our javascript library (@nextcloud/l10n) not our extraction tool (translationtool.phar) are able to handle those at the moment.

Ref http://pology.nedohodnik.net/doc/user/en_US/ch-poformat.html -> scroll to 2.2.2. Disambiguating Contexts

The only quick fix I can come up with right now is to change the wording. See also the warning message that translationtool.phar emits:

xgettext: Warnung: msgid 'second' is used without plural and with plural.
                   /srv/http/dev_apps/calendar/coverage/src/components/Editor/Repeat/RepeatFirstLastSelect.vue.html:324: Here is the occurrence without plural.
                   /srv/http/dev_apps/calendar/translationfiles/templates/calendar.pot:645: Here is the occurrence with plural.
                   Workaround: If the msgid is a sentence, change the wording of the sentence; otherwise, use contexts for disambiguation.

@rakekniven
Copy link
Member

rakekniven commented Dec 2, 2021

Thank you for digging into it.
Explanation is clear.

Unfortunately I have no good idea for another wording.

@joshtrichards joshtrichards added the language l10n and translations label Aug 7, 2024
@rakekniven
Copy link
Member

Another issue referencing to this one.

nextcloud/server#48840

@rakekniven
Copy link
Member

@st3iny Who can tackle this one again?

@SebastianKrupinski
Copy link
Contributor

@rakekniven we are probably going to need another class for positions "this.$t('calendar-poistion', 'second')"

Let me check in to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug language l10n and translations
Projects
None yet
Development

No branches or pull requests

6 participants