Skip to content
geeksville edited this page Dec 30, 2011 · 9 revisions

This page documents how to add a new supported language to Gaggle.

The minimum set of files to change

https://raw.github.com/geeksville/Gaggle/master/res/values/strings.xml Download this and edit it using the text editor of your choice (notepad etc...). At the top of the file it explains how to change each of the strings. However, I'll paste those instructions here as well:

  1. Thank you for volunteering to do a translation! How would you like your name to read in the credits? What email address do you want to publish (if any)?
  2. Use a simple text editor to edit this file (Notepad on Windows or gedit on Linux)
  3. The strings in the table below are the english language version, if for your language you do not think it is appropriate to translate that line at all (i.e. we should show the english version), just delete the full XML string element from your file.
  4. If you are not sure about a translation and would like to use english for a particular line until you know a bit more about how it is used in the program, just comment the line out using the XML comment delimeters.
  5. Please try to keep the translated strings approximately the same length as their english versions. That said, don't worry about this too much - if you can't get a clear translation in the given length, feel free to use a longer phrase (I might need to fix some layout files in the app though).
  6. If the name of a particular string has _short at the end, it is is important to use the shortest possible translation. It is likely I'm using it in a very small summary field and abbreviations are okay.
  7. After you make your translation, email the file to me and I'll add it to a test version of Gaggle. After tweaking it a little, I'll send you a test version to see if you are also happy with our work. Then it will be released in the regular distribution.
  8. If a string spans multiple lines in this file, please try to keep the line breaks approximately the same in your translation.

Extra files to change

Changing just the strings.xml file will get you 90% of the way to supporting any language. However, if you'd like 'bonus points' the following files could also use fixing for a new lanugage:

  1. https://raw.github.com/geeksville/Gaggle/master/res/values/arrays.xml Copy and translate the text for the sections marked as . Delete all other sections in the file (so the user will get the non localized versions).
  2. https://raw.github.com/geeksville/Gaggle/master/assets/no_flights.html
  3. https://raw.github.com/geeksville/Gaggle/master/assets/no_waypoints.html Feel free to change the waypoints file to include links to a source of waypoints that makes more sense for your language.

What to do with the translated files?

Just email your modified files to me and I'll spit out a test build and send it to you. Or if you'd like to use this as an excuse to learn github proceed to the next section.

Checking translation into github

If you've never used git, the following steps might have a bit of a learning curve. If you find yourself getting frustrated, just email the files to me and I'm happy to take care of the git grunge. ;-)

  1. Follow the instructions at http://help.github.com/fork-a-repo/ to fork https://github.com/geeksville/Gaggle
  2. Create a subdirectory of "res" named "values-XX" where XX is the two letter code for your language.
  3. Copy res/values/strings.xml and res/values/arrays.xml to the directory you just created. Apply translations as described above - making sure to delete any entries which you don't need to translate.
  4. If you'd like to update the two most critical html files, cd into "assets" then copy no_flights.html and no_waypoints.html into no_flights-XX.html and no_waypoints-XX.html. See the existing Spanish translation for an example.
  5. Change the files on your local machine then push them back up to your fork (see "Push Commits" in the fork-a-repo document linked above)
  6. Send me a "pull request" from your repo - see instructions here

Learning git stuff might be kinda painful - if you have questions I'm happy to help. If you decide to just email the files that is fine too.