Bug 209052 - Messed up menus after switching Kate's application language
Summary: Messed up menus after switching Kate's application language
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 281090 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-10-01 01:27 UTC by Dima Ryazanov
Modified: 2012-11-01 19:59 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot (53.11 KB, image/png)
2009-10-01 01:27 UTC, Dima Ryazanov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Ryazanov 2009-10-01 01:27:00 UTC
Version:            (using KDE 4.3.1)
OS:                Linux
Installed from:    Ubuntu Packages

I once switched KDE's language from English to Ukrainian, then back. For some reason, Kate stayed in Ukrainian, so I switched it using Help->Switch Application Language.

Now, however, the menus under Tools->Mode are first displayed in English, then most of them appear again in Ukrainian.
Just as an experiment, I changed the language to Russian. The Tools->Mode stayed the same - English followed by Ukrainian.
Comment 1 Dima Ryazanov 2009-10-01 01:27:50 UTC
Created attachment 37273 [details]
Screenshot
Comment 2 Dima Ryazanov 2009-10-01 01:30:52 UTC
Also, the contents of the menus is now split between the English and Ukrainian versions. E.g., C# is under "Sources", but C++ is under "Сирці".
Comment 3 Dima Ryazanov 2009-10-01 01:59:58 UTC
Ok, I have repro steps, kind of:

1. Switch the language from English to something else.
2. Go to Settings->Configure Kate->Editor Component->Open/Save->Modes & Filetypes
3. Make some change there and save it.
4. Kate creates a file ~/.kde/share/config/katemoderc with changes in the new language.
5. Switch the language back to English.
6. Now, Kate reads the items from katemoderc in whatever language it was saved in, and displays them under Tools->Mode.
Comment 4 Burkhard Lück 2009-10-05 09:23:06 UTC
This is another case of OTT = One Time Translation.

This bug applies to all kde applications. 
In case you change settings, these changed settings are written to a file appnamerc in kde-config --localprefix using the strings translated to the current locale.

Next time you launch the application no matter in what locale, the app reads its rc file and displays the translated strings.

The only way to get rid of these translations is to remove the rc file, but then you also loose all your changed settings.
Comment 5 Dominik Haumann 2011-08-07 13:45:21 UTC
In other words, changing the translation on-the-fly probably is buggy in most KDE applications.

Fixing this in Kate is maybe possible, but it looks like a very annoying limitation that produces lots of work for almost no gain.

What do we do about it?
Comment 6 Burkhard Lück 2011-08-09 18:49:17 UTC
See https://bugs.kde.org/show_bug.cgi?id=171424, where Peter Penz fixed a similar issue (OTT=One Time Translation) for kfileplaces (Places names in File Open/Save dialog).

Running master in locale x-test and grepping my .kde dir for "xx" I get more than several 100 hits, each of them an OTT.

The proper fix for this and all other OTT's has to be done on kconfig level:
* Distiguish between "system" and "user defined/edited" items
* Write only english strings for system items into kconfig files and retranslated them reading kconfig values
Comment 7 Christoph Cullmann 2012-11-01 17:59:40 UTC
*** Bug 281090 has been marked as a duplicate of this bug. ***
Comment 8 Christoph Cullmann 2012-11-01 19:59:53 UTC
Git commit 5b001498b38e27d8a23ad9f52b9222335399be51 by Christoph Cullmann.
Committed on 01/11/2012 at 20:59.
Pushed by cullmann into branch 'master'.

fix up Mode name translation

M  +10   -11   part/mode/katemodeconfigpage.cpp
M  +2    -0    part/mode/katemodemanager.cpp
M  +14   -0    part/mode/katemodemanager.h
M  +5    -4    part/mode/katemodemenu.cpp

http://commits.kde.org/kate/5b001498b38e27d8a23ad9f52b9222335399be51