
 Dianara - A Pump.io client
 Copyright 2012-2014  JanKusanagi JRR <jancoding@gmx.com>

===============================================================================

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the
   Free Software Foundation, Inc.,
   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA.

   Or visit http://www.gnu.org/licenses/

===============================================================================



Dianara is translated (from its original English) to a few languages, mainly
Spanish, Catalan and Italian. There are German and Polish translations in the
works.


Here's a basic explanation of how the translation process is done:



Getting started
===============================================================================

If you want to translate Dianara to your language, you'll need to edit the
corresponging TS file from the /translations folder. These .ts files can be
edited with any plain text editor, but the best way to edit them is probably
using the Qt Linguist program.

For instance, if you wish to translate the program into French, you'll have
to open dianara_fr.ts, included with the source code of Dianara, in Qt Linguist.
The language code used is often the same as your country's Internet domain.

If you start Dianara from a terminal, you'll see something like:

   "Using translation file: :/translations/dianara_fr_FR.UTF8"

which indicates that your system uses fr_FR.UTF8 as language locale, and the
file you should edit is dianara_fr.ts, and generate a "compiled" language file
dianara_fr.qm.

If in doubt, or if the file for your language doesn't exist, just contact me on
Pump.io (jankusanagi@identi.ca) or via e-mail, at the address at the top of this
document.

Dianara should load the language configured in your operating system.
If you want to force it to use a specifc language, you can run it with
a specific LANG variable, like this:

LANG=fr ./dianara



Translating
===============================================================================

The translation itself is quite simple. There are a lot of "strings" (sentences
or words), grouped together based (roughly) on what widget uses them. So, some
are used in the Configuration dialog, some are used in the Publisher widget
(the part of the main window where you compose new posts), etc.


You just need to go through those lists, translating each word or sentence,
while keeping in mind a few simple rules:


- If a string contains %1, %2, etc, those will be replaced by something when
  used in the program. The translated string should contain those same values
  even if they're in different order due to language differences.
  There are sometimes "developer comments" visible in Qt Linguist for these,
  where there's some clarification of what will replace %1, %2, etc. when the
  program is running.

  Ex: "Do you want to share %1's post?" would translate to Spanish as
      "¿Quieres compartir el mensaje de %1?".


- Qt Linguist will warn you if the original string ends with a period and
  the translated string doesn't.


- Strings used in buttons and menus might include an & symbol. Those are used
  to mark which letter is used as keyboard accelerator (or shortcut), and should
  be included in the translated version, even if they're in front of a different
  letter. Qt Linguist will warn you if an accelerator is missing.

  Ex: The "&Help" menu might be translated into Spanish as "A&yuda", since there
      is no "H" in the translated string. When running in English, users will
      be able to access that menu by pressing Alt+H. When running in Spanish,
      that menu will be accessed by pressing Alt+Y.

  One thing to keep in mind is that accelerators that are visible at the same
  time on screen shouldn't use the same letter.
  For instance, "&Session" and "&Settings" shouldn't be in the same menu.
  "&Session" and "S&ettings" would work. There's no warning about this,
  so if the accelerators are duplicated in the translation, you'll see that
  using them in the program doesn't work as expected.
  This is a small problem, but try to avoid it.



When done
===============================================================================

Once you're done, or when you want to submit your translation even if it's not
yet complete (which is perfectly fine), you can send the .ts file via e-mail to
the address at the top, or you can create a Pull Request in gitorious.org, if
you're comfortable using git.


Thank you in advance!
