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

appIcons: Add support for translating plural forms #2102

Merged
merged 3 commits into from
Oct 13, 2023

Conversation

3v1n0
Copy link
Collaborator

@3v1n0 3v1n0 commented Oct 9, 2023

Closes: #2100

@xalt7x
Copy link
Contributor

xalt7x commented Oct 11, 2023

Thanks for the quick response.

Unfortunately it still doesn't work for me

  1. make potfile still generates po/dashtodock.pot without plural forms

msgid "Quit %d Windows"
msgstr ""

However translation still works

  1. I 've tried replacing "N__" with "ngettext"
this._quitMenuItem.label.set_text(N__(
this._quitMenuItem.label.set_text(ngettext(

After that po/dashtodock.pot receives plural strings

msgid "Quit %d Window"
msgid_plural "Quit %d Windows"
msgstr[0] ""
msgstr[1] ""

But after the actual build translation isn't used (strings remain in English)

@xalt7x
Copy link
Contributor

xalt7x commented Oct 11, 2023

Please review my PR to your branch which resolves the aforementioned issues.

With this change the plural strings are generated in the potfile
@3v1n0
Copy link
Collaborator Author

3v1n0 commented Oct 12, 2023

Done your merge, let me know if this should go in now.

@xalt7x
Copy link
Contributor

xalt7x commented Oct 12, 2023

Works for me, thanks!

dash-to-dock--plural

@3v1n0 3v1n0 merged commit ac7e317 into micheleg:master Oct 13, 2023
1 check passed
vanvugt added a commit that referenced this pull request Jan 24, 2024
Update Ukrainian translation (sync with PR #2102)
sergio-costas pushed a commit to sergio-costas/dash-to-dock that referenced this pull request Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support plural forms for translation ("Quit %d Windows" string)
2 participants