GnuCash
Contact   Instructions
Bug 796966 - Underscore showing in german translation strings in the gui - business - search invoice
Summary: Underscore showing in german translation strings in the gui - business - sear...
Status: NEW
Alias: None
Product: GnuCash
Classification: Unclassified
Component: Business (show other bugs)
Version: git-maint
Hardware: PC Linux
: Normal normal
Target Milestone: ---
Assignee: core
QA Contact: core
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-04 10:31 EST by Christoph Holtermann
Modified: 2019-02-02 16:09 EST (History)
6 users (show)

See Also:


Attachments
screenshot of the gui (49.54 KB, image/png)
2018-12-04 10:31 EST, Christoph Holtermann
no flags Details

Description Christoph Holtermann 2018-12-04 10:31:42 EST
Created attachment 373072 [details]
screenshot of the gui

The underscore is visible in the GUI as can be seen on the screenshot. _Rechnung and _Zahlung. The underscore exists in the po-file de.po.

msgid "View/Edit Invoice"
msgstr "_Rechnung anzeigen/bearbeiten"

and

msgid "_Process Payment..."
msgstr "_Zahlung verarbeiten..."

I don'tknow what the underscore is about, but it certainly shouldn't be visible in the gui.
Comment 1 Bob 2018-12-05 04:13:54 EST
If the button was setup to use a mnemonic accelerator key the underscore in front of the letter would be the key to use with the 'Alt' key. You can see this by holding down the 'Alt' key in the search dialogue and looking at the 'Find' button and in the po file that is '_Suchen...' so that is 'Alt+S'.

The buttons on the end have not been setup for this so the translation is wrong. If the text is right, all that needs to be done is remove the '_' from these two strings.
Comment 2 Christoph Holtermann 2018-12-07 07:15:47 EST
Wouldn't it be better to fix the button instead ?
Comment 3 Geert Janssens 2018-12-07 08:49:34 EST
Yes
Comment 4 Christoph Holtermann 2018-12-07 09:38:27 EST
Is this specific to the business buttons or are all buttons ignoring the underscores ?
Comment 5 Geert Janssens 2018-12-07 10:35:42 EST
We are not deliberately ignoring underscores as far as I know. But if the original message ID doesn't have an underscore to mark an accelerator, the translated ID can't have it either.

Note that in your original message above you have selected the wrong msgid for "Process Payment..."

There's another one in the po file without the underscore (line 1475 in current maint's po file), but the German translation still has it.

So if you want to fix the buttons it suffices to fix the original strings in the code that will be used by these buttons. The accelerator should be chosen carefully not to collide with existing accelerators in the same dialog window.
Comment 6 Christoph Holtermann 2018-12-07 10:54:56 EST
Thanks Geert !

I see that I took the "_Zahlung verarbeiten" String from line 3566.

So to fix this I have to assure that the translation doesn't have an underscore if the original doesn't. So either add to the original language or remove in the translation.
Comment 7 Christoph Holtermann 2018-12-07 10:55:43 EST
Couldn't that be automated and raise a warning ?
Comment 8 Frank H. Ellenberger 2019-02-02 16:09:25 EST
(In reply to Christoph Holtermann from comment #7)
> Couldn't that be automated and raise a warning ?

msgfmt -c --check-accelerators="_" --statistics de.po
generates the warnings at least in the other direction.

Some background:
When I did the translation of 2.6, I did also a review of the GUI for missing or desirable mnemonics. But with the switch to version 3 several parts got lost: Some in the translation and some in the GUI.
After that frustration I did not find the time to redo and continue that task.

So, if you find such strings, improve the GUI instead of reverting de.po.
A similar issue are hellipses (...) in menu entries if dialogs follow.

Note You need to log in before you can comment on or make changes to this bug.