A simple script for performing translation of place names in JOSM.
Installation:
-
Download "translate.js" and "dict.csv" and place them in the same path and you are done.
-
You can create your own "dict.csv" using any spreadsheet app and saving the result as a CSV file. Ensure that the first column corresponds to the "name" field and second colomn corresponds to the translated string in the "name:xx" field. Please note that it is important to have the data in the first column sorted in the ascending order.
-
Modify "name:xx" fields in the script to correspond to the target language.
Usage instructions:
-
Generate a list of places for translation from OSM using overpass turbo (http://overpass-turbo.eu/). The script that can acheive this is available in the file "overpass_script.txt".
-
Download the raw data generated using "export->raw data" as "export.osm"
-
Import "export.osm" in JOSM.
-
Install the plugin "scripting" from "JOSM:Edit->Preferences->Plug-in"
-
Run the script using "JOSM:Scripting->Run"
-
Upload changes to OSM server