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

Untranslated entries in editor on right-click #1735

Open
juppes2 opened this issue Feb 8, 2024 · 12 comments
Open

Untranslated entries in editor on right-click #1735

juppes2 opened this issue Feb 8, 2024 · 12 comments

Comments

@juppes2
Copy link

juppes2 commented Feb 8, 2024

A couple of months ago i have done a German localization of Frescobaldi. Everything is fine - I am happy with it so far, and I hope that all those who use it as well.
What struck me very recently only (since obviously I do not use this very often) is that when you right-click a selected string of text in the editor, there still are some basic entries which still are in English:

  1. Undo
  2. Redo
  3. Cut
  4. Copy
  5. Paste
  6. Delete
  7. Select All

Apart from these seven, there are a couple of entries in German - see screenshot of the menu.

FrescobaldiContextMenu

In the regular menu (Edit) in the menu bar at the top of the window, all seven entries are localised:

FrescobaldiMenuEdit

How come? The entries from the latter menu seem to be in $USER/frescobaldi/i18n/frescobaldi/de.po, but it seems that when you right-click on a selected string in the editor, Cut, Copy, Paste etc. are being read from somewhere else, whereas it seems that the German entries still seem to come from de.po.

I have tried to locate them in one of the many sub-files of Frescobaldi, but in vain, and so I ask here, because I know that here there are people around who might well be able to tell me where they abscond in order to escape translation...

Thanks for any suggestion

@fedelibre
Copy link
Member

I think I've come across the same issue in the past, read from here.

I don't know if it's really the same bug and now it's late to check.

Which OS and which Frescobaldi version are you using?

@juppes2
Copy link
Author

juppes2 commented Feb 10, 2024

First of all: I am on Frescobaldi 3.3.0 and my OS is Linux Mint 21.3 Victoria with Cinnamon.
Maybe what you mention is a good hint. It seems to me, too, that those 7 menu entries come from somewhere else. Having looked at $USER/frescobaldi/i18n/messages.py, I have found all those entries to be in there. But how can I find out what is being called when I right-click some selection in the editor?

In messages.py I see this:

('QTextControl', '&Undo')

('QTextControl', '&Redo')

('QTextControl', 'Cu&t')

('QTextControl', '&Copy')

('QTextControl', '&Paste')

('QTextControl', 'Delete')

('QTextControl', 'Select All')

And what can be done about it so that these strings are localized as well? What Frescobaldi version did you localize, and what did you change so they also were in Italian? If I got Wilbert right, he has added some missing strings in messages.py, but those seven are already there and yet not being called.

So I guess it is only a similar bug. And what is 'QTextControl'?

@fedelibre
Copy link
Member

Well, I've just tried it on Frescobaldi 3.3.0 (flatpak) and if I choose the Italian locale (or any local other than English) I can reproduce the same bug:

immagine

@fedelibre
Copy link
Member

As written by Wilbert in the issue I linked to, the buttons come from the Gtk theme. If you change the style to the Breeze theme, you'll see only translated items. So we should figure out why the fix made by Wilbert four years ago doesn't work anymore.

@jeanas
Copy link
Member

jeanas commented Feb 11, 2024

(@juppes2 Are you the same person as @papioara?)

@juppes2
Copy link
Author

juppes2 commented Feb 11, 2024

@jeanas: Yes, I am

@juppes2
Copy link
Author

juppes2 commented Feb 11, 2024

@fedelibre: Ah, that's where it comes from! Do you mean by changing to Breeze theme that I just change it in Frescobaldi?

@juppes2
Copy link
Author

juppes2 commented Feb 12, 2024

I have played around on my system a little. The result is: that fix from a couple of years ago still works on my System (Linux Mint 21.3 Victoria with Cinnamon), but not unconditionally. Here's what I did:

  1. Installed Breeze - since I did not have it, and it did not appear among the choices in the Frescobaldi settings. Just that without making any changes like in Qt-Settings or redefining environment variables and the like. It's just there now.
  2. Restarted. Now the English menu entries are gone.

FrescobaldiContextMenu2

So, if you have Breeze, you are covered as for the localization, if not, well... So does this 'mechanism' exist, because the icons are needed to be called from there? To me it seems that is must not necessarily be the case, because in the Edit menu on top of the window, they are there with the correctly localized entries, and this was already the case before having installed Breeze.

@juppes2
Copy link
Author

juppes2 commented Feb 14, 2024

Arrgh, it's back again, although I did not change anything myself. Side effect of system update??

FrescobaldiMenu3

@fedelibre
Copy link
Member

Well, it's strange. Are you sure you don't have multiple installations of Frescobaldi?

I'm just trying Frescobaldi rpm on my computer at work and it seems to have problems with translations. I can only set no translation or the default system language (no other languages available); switching to the defaut (Italian) language doesn't work. I'll see if I have time to investigate more next week.

@juppes2
Copy link
Author

juppes2 commented Feb 16, 2024 via email

@papioara
Copy link
Contributor

papioara commented Feb 29, 2024

I have compared my two Frescobaldi versions now ( 3.2 and 3.3.0). The first one is the one installed from the repos, and the latter one is the one I always use for actual work. As far as localisations are concerned, they have the features I expected: version 3.2 has a mix of English and (in my case) German in very many menus. Obviously the localisation had been done quite a while ago. In the meantime new features have been added, but the commands which came with them remained untranslated. In the meantime I have updated the German localisation for version 3.3.0 which is comprehensive now. But both these versions have this one feature in common: the right-click menu of a selected item in the editor which still is a mix of English and German (see list at the beginning of this post. Apparently the entries mentioned there are being loaded from somewhere else, but I still have no sufficient clue where they come from.
I had installed Breeze on my system, and for one day all the entries were all German, but the next day - as shown above - the old English/German mix was back for unknown reasons.

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

No branches or pull requests

4 participants