translating the strings of plugins

Florian Schäfer florian at schaeferban.de
Wed May 9 14:00:54 UTC 2018


The three plugins already translated at Transifex differ from the other plugins also in a few other points:* they use another CI provider additionally to or instead of the JOSM Jenkins instance (in this case Travis CI)* they use a Gradle build additionally to or instead of the Ant build
These are not really prerequisites to use Transifex, but for the plugins built with Gradle there's already kind of a procedure to migrate. For plugins using Ant you'd need to adapt the Ant build first.
For plugins with a Gradle build (using the `gradle-josm-plugin`) the procedure looks something like this:* add a `.tx/config` file to your plugin similar to this one: https://github.com/JOSM/Mapillary/blob/738be5f6f0f32b19d71dae3ffd15e6822ee3c1b4/.tx/config* ask one of the maintainers of the JOSM group at Transifex (e.g. me) to add you as a maintainer* get a Transifex API token from https://www.transifex.com/user/settings/api/* configure your CI to run `./gradlew generatePot` each time a new commit is added to the repository, which extracts the translatable strings to a *.pot file* let the CI run the Transifex client to upload the *.pot file, e.g.: https://github.com/JOSM/Mapillary/blob/3c4ec6ffdb9481df566fe6ff8cbdbd3282b6cb9b/.travis.yml#L61-L66* now when you want to update the translations of your plugin, run `./gradlew transifexDownload` and the current translations are downloaded from Transifex.
As said above, this is not the only possible way to achieve this, just the one that the plugins `geojson`, `Mapillary` and `scripting` chose. We could discuss the different variants with their pros and cons and what would be the best way to go for the pt_assistant plugin in the (video) conference for GSoC, that we'll soon have anyway.
Cheers,floscher
P.S.: Please note that all this is probably heavily biased, since I started this switch of some JOSM plugins to Gradle, git and Transifex.

Am Mittwoch, den 09.05.2018, 14:47 +0200 schrieb Jo:
> Oh, I think it would be nice to add PT_Assistant to Transifex. What would be the procedure for that?
> Jo
> 2018-05-09 14:37 GMT+02:00 Florian Schäfer <florian at schaeferban.de>:
> > Hi Polyglot,
> > 
> > 
> > 
> > it's at https://translations.launchpad.net/josm/ .
> > 
> > A few plugins are translated at https://www.transifex.com/josm/josm/content/ instead.
> > 
> > 
> > 
> > Cheers,
> > 
> > floscher
> > 
> > 
> > 
> > Am Mittwoch, den 09.05.2018, 14:00 +0200 schrieb Jo:
> > 
> > > Hi,
> > 
> > > 
> > 
> > > Do we have a web interface where the strings of JOSM and its plugins can be
> > 
> > > translated in a way that is accessible to the general public?
> > 
> > > 
> > 
> > > I can't seem to find it.
> > 
> > > 
> > 
> > > Polyglot
> > 


More information about the josm-dev mailing list