tc7.5b8 weird chinese symbols in lister menus

Bug reports will be moved here when the described bug has been fixed

Moderators: Hacker, petermad, Stefan2, white

User avatar
petermad
Power Member
Power Member
Posts: 16104
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

I think it might be better to check if there is a \t in the string when appending the hotkey.
So if the \t is missing, append it and then the hotkey, otherwise just append the hotkey. This way, custom languages can define static hotkey labels and definitions like the Extended Menu could work without any changes.
I support that fully ++++ ;-)
Multiple \t for a menu entry in a language file can be considered as erroneous and the language file should be fixed.
To be precise there is not actually multiple \t's in the language file, but a conflict with \t's in the language file and hardcoded \t's.


IMHO hardcoded shortcuts (hence \t's) should not exist in translatable menus - because then they are not really translatable :!:

Take for example the German 5915="D&rucken...", 5921="Als Text &kopieren" and 5924="&Alles markieren" - they have Ctrl+P, Ctrl+C and Ctrl+A as shortcuts in the Lister menu (when using wcmd_deu.lng), where it should have been Strg+P, Strg+C and Strg+A :!: :roll:


So as a workaround until these menus items are truely translatable including the shortcut,s and the translations are added to all .lng files - I think that implementing your suggestion would be the right thing to do.

Or in case of an \t in the language file - TC should simply not add the hardcoded shortcut - it is then up to the translator to include the formerly hardcoded shurtcut into the translation - for example change:
5912="&Next File\tAlt+Right / "
to:
5912="&Next File\tAlt+Right / N"

It would also make it possible to fix the Ctrl/Strg problem mentioned above.
Last edited by petermad on 2009-08-03, 21:40 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
j
Member
Member
Posts: 124
Joined: 2009-04-13, 19:49 UTC

Post by *j »

petermad wrote:
Multiple \t for a menu entry in a language file can be considered as erroneous and the language file should be fixed.
To be precise there is not actually multiple \t's in the language file, but a conflict with \t's in the language file and hardcoded \t's.
No, I mean that IF the language file contains multiple \t THEN it is erroneous. If it contains just one \t it should be OK and TC should detect this. Then there would be no need to truncate the string as multiple \t are not allowed in the first place.

Anyway, the alternative not to add a hotkey at all (which IMHO makes even more sense) is also good but then every existing translation has to be modified.
User avatar
petermad
Power Member
Power Member
Posts: 16104
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

the alternative not to add a hotkey at all (which IMHO makes even more sense) is also good but then every existing translation has to be modified
Or as I wrote above: if a \t is detected then don't add the hotkey - then only translations which had extra hotkeys added would have to be changed .
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50840
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I could confirm now that Windows 7 shows characters which aren't part of the string. I will therefore cut the string at the second tab character (if there is any) to avoid this problem. Thanks for reporting it!
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 16104
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

TC 7.50rc1 now cuts the string in menus before second \t :D


Because of this fix, may I suggest that you change strings 5915, 5921 and 5924 in the German .lng file to:

Code: Select all

5915="D&rucken...\tStrg+P"
5921="Als Text &kopieren\tStrg+C"
5924="&Alles markieren\tStrg+A" 
since it is now possible to override the hardcoded English menu shortcuts with translated shortcuts.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50840
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Thanks for confirming the fix! I will consider your suggestion.
Author of Total Commander
https://www.ghisler.com
Post Reply