TRANSLATING PLAYSMS
--------------------

NOTE: playsms is using a layered structure for the translations, so for
 each module there is it's own translation


CREATE NEW TRANSLATIONS
-----------------------
To create a NEW tranlation of playsms, you will have copy the translation template
 to your destination language
For example, to translate from english (en_US) to catalan (ca_ES) you should do the
 following for every component you want to translate

#For common strings
cp -a plugin/language/en_US plugin/language/ca_ES
cp -a plugin/language/messages.pot plugin/language/ca_ES/LC_MESSAGES/messages.po

#For themes,plugins and tools strings
cp -a plugin/type_of_plugin/name_of_plugin/language/en_US plugin/type_of_plugin/name_of_plugin/language/ca_ES
cp -a plugin/type_of_plugin/name_of_plugin/language/messages.pot plugin/type_of_plugin/name_of_plugin/language/ca_ES/LC_MESSAGES/messages.po

You will have to translate the .po file, you can use poedit, lokalize or any other
 other software to translate
You can also edit these file:
 - docs/README #this is the readme document with the authors of the translations

IMPORTANT: If you want, there are a couple of script to help you with the translation
backup-language-files.sh (creates a backup of existant language files)
create-new-language.sh (creates a tgz that contains all the files to translate
	the whole playsms interface)
restore-language-files.sh (restores the language files (po) from the backup or newly
	created files


UPDATE THE TRANSLATIONS
-----------------------

To improve/finish the translations into your language, you will have
 to go into every folder of the program to get the .po files  to be translated.

Once you've translated the .po files with poedit, lokalize or any other tool
 you just have to replace them into the destination folder.

Go to the section REGENERATING THE MO FILES for the rest...


UPDATING THE POT FILES OF THE SYSTEM
----------------------------------

When new strings are added to the system, on any of the themes or plugins, updating the
 pot files will allow the users to update their translations.
The .pot files are the templates on with every translation is based.
There's a contrib script into contrib/tools/language/ for this

##To update the pot files with new texts (/var/www/playsms is you web path)
bash 1-update-pot-files.sh /var/www/playsms


MERGE EXISTANT PO FILES WITH NEWER POT TEMPLATES
------------------------------------------------

Once we have updated the pot files, we can merge them with the existant translations
 so the translators have only to worry about translating. 

##To merge the update pot files with existant .po files for each language (/var/www/playsms is you web path)
bash 2-merge-existing-po-files.sh  /var/www/playsms


REGENERATING THE MO FILES
-------------------------

Until you regenerate the mo files, the translations won't be visible in 
 the web interfaces. To accomplish that, you will have to use msgfmt
For any time there are new .po files their correspondant .mo files need to be
 generated, this is a simple way of doing it.


##To regenerate the .mo file from the .po files on the system (/var/www/playsms is you web path)
bash 3-regenerating-mo-files.sh /var/www/playsms

--
Joan
