[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    Re: KDE desktop menu translations?
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2005-10-31 21:54:49
Message-ID: 200510312253.43702.nicolasg () snafu ! de
[Download RAW message or body]

On Monday 31 October 2005 01:56, Steve Murphy wrote:
> Hello--
>
> Is there anyone that could give me (and I'm sure others would be
> interested, also!) a summary of how the desktop menus are translated and
> are organised?

In short, Scripty processes .desktop (and similar) files and extracts standard 
keys to the corresponding desktop_*.pot file. The translators translate it to 
a desktop_*.po file and Scripty puts the translations back into each .desktop 
(or simialr) file.

Extraction is done by: l10n/scripts/createdesktop.pl

Putting back the translation is done by l10n/scripts/apply.cc (which is not a 
script, so it must be compiled). 
The program is then called by l10n/scripts/merge_desktop_files.sh

The easiest way to look at the keys that are processed is to look at 
apply.cc's source code, at the bottom of the code you can see all checkTag 
calls, with each a key name. (Or you can look at the big regular expresion in 
createdesktop.pl if you know how to read regular expressions.)

If you want the exact definition of what files are considered to be a .desktop 
file, you can look at l10n/scripts/findfiles

>
> I've always been perplexed as to the structure of the desktop menu
> system. I've also never run into a good, high level explanation.

Perhaps you have to look also at the .desktop specification at 
http://www.freedesktop.org (Sorry, I have not the exact URL at hand.)

> We'd like to demonstrate (again) the KDE translations we've done so far
> in Kinyarwanda, and we'd like to have the desktop menus show up
> translated.
>
> I see the desktop_kdebase.po file, and it looks like it contains all the
> menu translations... but to have these translated strings show up in the
> hundreds of *.desktop files in /usr/share seems a bit perplexing...

I had once thought that for such show cases, KDE should allow the translation 
to be retrieved from the desktop*.po files. But it would mean that 
each .desktop file has to point to a PO file. (And it probably needs to be 
optional too, for speed reason in normal use. And, if this feature is wanted, 
somebody will have to implement it for KDE4...)

>
> And what of the highest levels of the menu system, from the "Start" button 

The "Start" button is an icon! :-)

> on the desktop, on down, with the categories, etc. Where are they
> located?

No idea. (And I could not find it quickly either. The categories are defined 
in the .desktop files but the translations are probably not made from there.)

>
> My goal is to provide a set of files I can drop into a newly-installed
> Fedora Core 3 release, that will showcase the translations done to date,
> with best affect... We've done it once, just by forming large number
> of .mo files, and dropping them in the locale dirs, but we want to go a
> step better this time!
>
> Any pointers/suggestions?

If you want to change an installed KDE without using the sources, then it is 
going to be difficult.

Probably you have to modify the script l10n/scripts/merge_desktop_files.sh
so that it does change the installed .desktop files. (apply.cc could probably 
be usable as is, in this use case.)

>
> murf

Have a nice day!

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic