FFGo uses the gettext library to localize its interface. Localization
files are stored in the "src/ffgo/data/locale" directory; additionally,
other files that can be translated are in the "src/ffgo/data/config/",
"src/ffgo/data/help/" and "share/" folders. You are very welcome to
update/improve existing translations, or add a new one if you wish. Even
the smallest contribution will be appreciated. Here are some helpful (I
hope) tips:



1. IF YOU ARE FAMILIAR WITH GETTEXT AND WOULD LIKE TO CONTRIBUTE A NEW,
   OR MODIFY AN EXISTING TRANSLATION:

  Localization files are in the "src/ffgo/data/locale" directory. See
  section 4 for information about other files that can be translated.

  When ready, please file a merge request or send "FFGo.po", and/or
  other files to a mail address provided at the end of this document.
  I'll be happy to include your translation in the next release of FFGo.



2. IF YOU'D LIKE TO MODIFY AN EXISTING TRANSLATION BUT NEVER TRANSLATED
   AN APPLICATION BEFORE:

  Don't worry, it is quite simple. All you need to do is to edit an
  "FFGo.po" file located in a
  "src/ffgo/data/locale/LANGUAGE_CODE/LC_MESSAGES" directory. You can do
  so by using any text editor, but using dedicated software (e.g.
  Poedit, Virtaal, or Emacs) is a more convenient and less error-prone
  way to edit PO files. The translation process itself is
  straightforward and you should have no trouble with the task at all.
  One thing to remember is to always include in your translations the
  formatting placeholders such as "%s", "{0}", "{1}", "{foobar}", etc.,
  that are present in the original strings. These are replaced at
  runtime with appropriate values, and their absence would likely lead
  to crashes of the application.

  When you're happy with the changes you made to a PO file, one last
  thing to do is to generate a new "FFGo.mo" file from the .po file.
  "src/ffgo/data/locale/LANGUAGE_CODE/LC_MESSAGES/FFGo.mo" is the file
  that will actually used by the program to show translated messages in
  the language identified by LANGUAGE_CODE. Some editors have an option
  to automatically generate it for you. If not, you'll have to do it
  manually. To do this, open a terminal emulator, navigate to the folder
  containing the "FFGo.po" file corresponding to the language you are
  translating into, and run this command:

    msgfmt FFGo.po

  Alternatively, if you are running FFGo directly from an unpacked
  tarball or zip file, or from a clone of the Git repository, you may
  run 'make update-mo' from the top-level distribution directory (the
  one containing the 'ffgo-launcher.py' script). This method requires
  GNU Make in addition to 'msgfmt'.

  Note: you may need to install gettext if the 'msgfmt' command is not
        found. In Debian-based distributions, it is found in the gettext
        package.

  Now you can inspect if the changes you made are properly included in
  FFGo. If you're happy with the result, please file a merge request or
  send the "FFGo.po" file to the email address provided at the end of
  this document. I'll be happy to include your translation in the next
  release of FFGo.

  See section 4 for information about other files that can be
  translated.



3. IF YOU'D LIKE TO ADD A NEW TRANSLATION BUT NEVER TRANSLATED AN
   APPLICATION BEFORE:

  First, you need to create a new folder in the "src/ffgo/data/locale"
  directory. The name of this new folder should be the ISO 639-1 code
  for your language. Some common language codes according to this
  standard can be found here:
  <https://www.gnu.org/savannah-checkouts/gnu/gettext/manual/html_node/Usual-Language-Codes.html>.
  Then, navigate to this newly created directory and create an
  "LC_MESSAGES" folder. The rest of the translation process is the same
  as described in section 2, with one exception: you should edit the
  "FFGo.pot" file located in the "src/ffgo/data/locale" directory, and
  then save it as "FFGo.po" into the folder you created.

  Note: you may also download "FFGo.pot" from the FFGo Git repository at
        <https://github.com/frougon/FFGo>.

  In the end, open "FFGo.po" in a text editor and edit some comments:

    * in the first line, replace the word LANGUAGE with the actual name
      of your language.

    * in the fourth line, provide your personal data (if you wish of
      course), as you are the first author of this translation.

  See section 4 for information about other files that can be
  translated.



4. SOME ADDITIONAL TEXT TO TRANSLATE:

  You can also translate files in the "src/ffgo/data/config/" and
  "src/ffgo/data/help/" directories. Contents from the first directory is
  shown in the “Options window[1]” at first start of FFGo, and contents
  from the second directory is displayed in the help window.

  [1] The text window at the left of the application main window, right
      below the fgfs status indication---which reads “Ready” when
      FlightGear is not running.

  If no file with your language code is present, open the file which
  ends with "en", and save it after replacing the "en" suffix with your
  language code---the same as the name of the directory containing your
  translations in "src/ffgo/data/locale".

  Please note that no line in these files should have more than 79
  characters. In the case of the help file, it is mandatory to stay
  within that 79 characters limit, while in the case of the config, it
  is only a general advice and can be slightly exceeded if appropriate.
  In many text editors, you can enable a right margin line which helps
  to avoid exceeding this limit.

  Additionally, you may also check:
    - if "share/ffgo.desktop" has localization for your language
      included;
    - if there are files under the "docs" directory that you would like
      to translate.



5. TESTING YOUR TRANSLATION:

  When your translation is ready, you can test if all the text is
  properly displayed in the application. Navigate to the $USER_DATA_DIR
  folder (~/.ffgo on Unix, %APPDATA%/FFGo on Windows) and move out, or
  temporarily rename the file called "config". This will simulate the
  situation where FFGo is started for the first time. When started, the
  program should automatically pick up a translation based on your
  system settings. If no proper translation is found, it should revert
  to the default: the English language. If you encounter any trouble at
  this point, please contact me at the email address below; I'll be
  happy to help.


Thanks for your contributions!


-- Florent Rougon <f.rougon@frougon.net>

(original text by FGo!'s author, Robert 'erobo' Leda)


Local Variables:
coding: utf-8
fill-column: 72
End:
