Plugin translation

Kai Michael Poppe - OSM osm at poppe.dev
Sun Jul 12 15:43:41 UTC 2020


Good afternoon list!

I was trying to get translation for my plugins started but I seem to be
unable to perform the most basic task of creating a .pot :/

Going by
https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins#Translatingaplugin
I thought of using option b) and use ant in josm/i18n.

With ant pot I manage to get a josm.pot that contains the strings from
my plugins but how do I carry on from there? I can't seem to be able to
progress just for my plugin (because even though there are strings
available for translation, ant deletes the contents of the
build-directory), much less does ant -Dplugin=name singleplugintrans
have any effect because it tells me this:

plugintrans:
     [echo] Run plugintrans target for plugin fhrs
    [mkdir] Created dir: D:\_dev\osm\josm\josm\i18n\build\plugin_fhrs
[gettext-extract] ..\plugins\fhrs
[gettext-extract] build\plugin_fhrs
[gettext-extract] build
[gettext-extract]
C:\Users\kpopp\AppData\Local\Temp\srcfiles6695765664603206947.tmp
[gettext-extract] Executing: xgettext -c --from-code=utf-8
--output=D:\_dev\osm\josm\josm\i18n\build\plugin_fhrs\josm.pot
--language=Java -k -ktrc:1c,2 -kmarktrc:1c,2 -ktr -kmarktr -ktrn:1,2
-ktrnc:1c,2,3
--files-from=C:\Users\kpopp\AppData\Local\Temp\srcfiles6695765664603206947.tmp
     [exec] Reading file build/plugin_fhrs/josm.pot
     [exec] Skipped file ../plugins/fhrs/data/en.lang: Contained 0
strings out of     3.
   [delete] Deleting directory D:\_dev\osm\josm\josm\i18n\build\plugin_fhrs

I know that I'm jumping the launchpad stuff, mostly because I don't
really need a crowdsourced translation right now but also because I'd
prefer to use Transifex.

Could someone give me 101 on how in the world I'll be able to create
working .pot files (which then could go into the GitHub repo and into
Transifex from there if I so need in the future) and .lang files from there?

Thanks!

Kai



More information about the josm-dev mailing list