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

"Show Details" menu item is untranslatable #2104

Closed
proninyaroslav opened this issue Oct 11, 2023 · 8 comments · Fixed by #2117
Closed

"Show Details" menu item is untranslatable #2104

proninyaroslav opened this issue Oct 11, 2023 · 8 comments · Fixed by #2117

Comments

@proninyaroslav
Copy link
Contributor

proninyaroslav commented Oct 11, 2023

In the Dash To Dock menu the "Show Details" item in English, and for example this string isn't in the Russian translation and xgettext also doesn't see it (I run make potfile command):

2023-10-11 18-35-47

But in the original GNOME Dock the "Show Details" item is translated:

2023-10-11 18-41-07

@xalt7x
Copy link
Contributor

xalt7x commented Oct 11, 2023

I can confirm this issue.
Unfortunately even when this string is translated, the original text is still shown for some reason.

this string isn't in the Russian translation and xgettext also doesn't see it (I run make potfile command):

That's unrelated because:

  1. This string and few others were missing in most translation files until Fix dashtodock.pot generation (avoid missing strings for translations) #2093
  2. make potfile generates po/dashtodock.pot (template for translators) where you can find this string.

@krystal-cao
Copy link

krystal-cao commented Nov 1, 2023

@proninyaroslav @xalt7x
Because "Show Details" uses the default translation of the Gnome Shell.But the text of the Gnome Shell menu item is "App Details"
WX20231101-102714@2x
WX20231101-102735@2x
WX20231101-102009@2x
WX20231101-102528@2x

@krystal-cao
Copy link

@proninyaroslav
So you can modify _('Show Details') to __('Show Details') in line 1151 of the appIcons.js and build it yourself, I tried it and it works!

@proninyaroslav
Copy link
Contributor Author

@krystal-cao
This is more likely a workaround than a solution. If it uses GNOME translation then why is it only English? In the original GNOME Dock this line is translated.

@krystal-cao
Copy link

krystal-cao commented Nov 1, 2023

@proninyaroslav
I'm guessing that the text on the line of the original GNOME Dock has been changed from 'Show Details' to 'App Details' since some version. 'App Details' is translated in the original GNOME Dock. 'Show Details' is not translated in the original GNOME Dock. So 'Show Details' is only English.If it uses Gnome translation, then the original text must be the same.
You could also change _('Show Details') to _('App Details') and try building it!

@proninyaroslav
Copy link
Contributor Author

@krystal-cao
Yes, it works. Thank you. I created a PR #2117

@xalt7x
Copy link
Contributor

xalt7x commented Nov 2, 2023

@krystal-cao , thanks for finding it!

@proninyaroslav ,
I'd like to have it fixed as well but IMO the better approach would be to get rid of some custom overrides (e.g. "Show Details", "Failed to launch", "Launch using Integrated Graphics Card", "Launch using Discrete Graphics Card" etc.) if "Dash to Dock" can just re-use original strings from the GNOME Shell.
It should prevent such breakages and preserve consistency with the GNOME upstream decisions/translations.
AFAIK, "Dash to Panel" doesn't have this issue.

@proninyaroslav
Copy link
Contributor Author

@xalt7x
A cursory examination of Dash To Panel showed that they use AppMenu from Shell with minimal customization (only hiding some menu items based on settings). I'm not very familiar with gettext, but it seems to me that it is impossible to simply reuse the translation, since you need to know the source string (in this case App Details): https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/appMenu.js#L86. Maybe we should just take AppMenu as a basis and extend the class by adding custom things, but it is unknown how this will affect the future compatibility of the extension with Shell.

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 a pull request may close this issue.

3 participants