Replies: 1 comment 1 reply
|
for .desktop files you can use intltool or itstool:
intltool-extract --type=gettext/ini file.desktop.increates .desktop.in.h with translatable strings then in your Makefile: @INTLTOOL_DESKTOP_RULE@
<?xml version="1.0"?>
<its:rules xmlns:its="http://www.w3.org/2005/11/its" version="2.0">
<its:translateRule selector="//*[starts-with(local-name(), Name)]" translate="yes"/>
<its:translateRule selector="//*[starts-with(local-name(), Comment)]" translate="yes"/>
<its:translateRule selector="//*[starts-with(local-name(), GenericName)]" translate="yes"/>
</its:rules>
msgfmt --desktop -d po/ -o app.desktop app.desktop.inthis is probably cleanest approach
the msgfmt --desktop approach is what most modern projects use |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello,
does anyone has a good tool (chain) to handle translatable strings in *.desktop files?
My idea is to create a pot file of that strings, let translators create there language specific po files, and later integrate back the translations into the *.desktop file.
I checked the gettext tools and po4a. They don't fit.
I can only imagine a self written script (e.g. Python using polib or dealing with plain text files). But I want to prevent that and assuming there are others out their with the same problems and maybe solutions.
Thanks
Christian
Related to #17676, about polkit *.policy files.
All reactions