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

Make the 'Pin to Dock' label translatable #2331

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xalt7x
Copy link
Contributor

@xalt7x xalt7x commented Nov 12, 2024

With the single underscore (_) we can re-use original translation.
However, for the 'Pin to Dock' there's no match since GNOME 42-47 original label is 'Pin to Dash'.
Using two underscores (__) as a translation function resolves #2330

With the single underscore (_) we can re-use original translation.
However, for the 'Pin to Dock' there's no match since GNOME 42-47 original label is 'Pin to Dash'.
Using two underscores (__) as a translation function resolves issue 2330
@sergio-costas
Copy link
Collaborator

In my opinion, this should be fixed by updating the translations, not by reusing the translation of a different text.

@xalt7x
Copy link
Contributor Author

xalt7x commented Nov 28, 2024

@sergio-costas

In my opinion, this should be fixed by updating the translations, not by reusing the translation of a different text.

I've actually tried updating translation file (before making comparison screenshots I've modified uk_UA.po). Still, my translation of 'Pin to Dock' was unused until I've applied a change from this PR. Please see issue #2104 that confirms that translation updates won't help here.

With the current
const item = this._appendMenuItem(_('Pin to Dock'));
This extension tries to re-use GNOME string. However, Pin to Dock string doesn't exist in GNOME Dash so we receive English/untranslated item.

One can simply try to re-use GNOME Dash string 'Pin to Dash'.
const item = this._appendMenuItem(_('Pin to Dash'));
Now, an item uses GNOME translation but this hacky solution is bad for multiple reasons:

  • Dash to Dock pot file will contain 'Pin to Dash' instead of 'Pin to Dock'.
  • Translators would need to update .po files and translate 'Dash' as 'Dock'. For that, they would need to have knowledge for meaning of the hack, existence of the issue "Pin To Dock" menu item is untranslatable #2330 and discussion in this PR.

With the simple fix I propose
const item = this._appendMenuItem(__('Pin to Dock'));
Pin to Dock translation will be used after .po file updates.

I believe this is the right way.

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.

"Pin To Dock" menu item is untranslatable
2 participants