Translating External Tools

Albert Astals Cid aacid at
Mon Sep 23 22:51:59 BST 2019

El dilluns, 23 de setembre de 2019, a les 16:12:45 CEST, Dominik Haumann va escriure:
> Hi everyone,
> I have some translation-related questions for the external tools plugin.
> Currently some things are certainly wrong.
> 1.
> We have default tools in a file compiled into Kate, see:
> In short, this is a ini-like file. Entries that need translation are:
> name=...
> category=...
> The rest must not be translated. Still, I am pretty sure we are missing a
> line or so in the extraction script:
> Can one of you clarify how to do this properly?

You're using a custom file format, so you need a custom solution.

Something with sed/grep/whatever that extracts from that customrc file and appends to rc.cpp

Also you'll need to call i18n() on whatever thing you read from that rc file so it actually gets translated.

> 2. ui.rc
> The xmlgui file is located here:
> The contents to be discussed is:
> <gui name="externaltools" library="externaltoolsplugin" version="1">
> In other plugins, I can also find an attribute "translationDomain", e.g.:
> My CMakeLists.txt file located at
> contains this:
> target_compile_definitions(externaltoolsplugin PRIVATE
> TRANSLATION_DOMAIN="kateexternaltoolsplugin")
> Am I missing the translationDomain in the ui.rc file?

Yes, how do you expect the kpart code to know from which domain(aka file) to load the translations when presented with that xml file otherwise?


> Any hints are welcome.
> Best regards
> Dominik

More information about the KWrite-Devel mailing list