micheleg / dash-to-dock

A dock for the Gnome Shell. This extension moves the dash out of the overview transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops.
https://micheleg.github.io/dash-to-dock/
GNU General Public License v2.0
3.82k stars 463 forks source link

appIcons: Add support for translating plural forms #2102

Closed 3v1n0 closed 8 months ago

3v1n0 commented 9 months ago

Closes: #2100

xalt7x commented 9 months ago

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 commented 9 months ago

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

3v1n0 commented 9 months ago

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

xalt7x commented 9 months ago

Works for me, thanks!

dash-to-dock--plural