OBSOLETE
This way to made translations is obsolete!
We dont use the same way that before with command-line and things, now, you just need eltrans, eltrans is a graphical tool that does everything automatically, just install it from http://repository.elive-systems.com/pool/main/e/eltrans/ if you don't have it actuallly installed
Note: users from Gem, first install poedit and do these configurations:
- File -> preferences -> disable the "compile .mo files" option.
- Go to the View tab and unselect both options about "show comments"
How to make translations for Elive
Warning: Important, do NOT USE scite for editing any file, more info in the bug reported
First of all you need to request a language to translate to Thanatermesis, including a username and a password for use.
But... WTF is SVN ?
SVN (also called subversion) is a version control system, in more understandable words... is something like a repository for work in source code (and plain files, so translations too), it is very easy to use and very powered, this website is very nice-featured with SVN like visual DIFF's, changesets between exact revisions (versions), download in differents formats (included the famous patch) and a big etc
SVN is very professional and a advanced system, but a translator can use it only knowing 2 commands: update (download) and commit (send your changes)
Moire information in the Wikipedia article
Before you start
- First of all you need to have the package subversion installed (SVN), so just do apt-get install subversion in a terminal (of course root)
- Very important: You need to have the system working in utf-8 mode. To check this, launch the command locale in a terminal, you need to have a result similar to:
eliveuser@Elive[~]$ locale LANG=es_ES.UTF-8 LANGUAGE=es_ES.UTF-8 LC_CTYPE="es_ES.UTF-8" LC_NUMERIC="es_ES.UTF-8" LC_TIME="es_ES.UTF-8" LC_COLLATE="es_ES.UTF-8" LC_MONETARY="es_ES.UTF-8" LC_MESSAGES="es_ES.UTF-8" LC_PAPER="es_ES.UTF-8" LC_NAME="es_ES.UTF-8" LC_ADDRESS="es_ES.UTF-8" LC_TELEPHONE="es_ES.UTF-8" LC_MEASUREMENT="es_ES.UTF-8" LC_IDENTIFICATION="es_ES.UTF-8" LC_ALL=es_ES.UTF-8
If this is not your case, you need to reconfigure your language. Try it from Elpanel. If you can't find your language, you can request it to be added at http://bugs.elivecd.org. Anyway, you can try the Debian way dpkg-reconfigure locales. Before you make any translation, reboot the machine to make sure that the changes are done correctly on the whole system.
- Now, use SVN to download the sources for the translations. You need an account in the svn repository of Elive to make the translations. If you don't have one and you want to collaborate with us by making translations, request an account from Thanatermesis. Then look at related News after you have made a directory in your /home where you can work, now and in the future, on the translations.
eliveuser@Elive[~]$ mkdir development eliveuser@Elive[~]$ cd development eliveuser@Elive[~/development]$ svn co svn://elivecd.org/translations translations
This should be sufficient, but if you have problems with the login you can try the --no-auth-cache option. You can also try more parameters, likeeliveuser@Elive[~/development]$ svn co --no-auth-cache --verbose --username my_username --password my_password svn://elivecd.org/translations translations
If you continue to have a problem it is possible that your login doesn't work, in that case notify Thanatermesis
- Once you have downloaded the directory translations of the svn repository to your directory translations, you are ready to work and the password isn't asked anymore.
Important things
- The grammar is very important, today I have see in a article about Elive for Macbooks that someone not want to try Elive because the grammar errors, I have fixed it on changeset:51 thanks to aspell, you can use a command like aspell -c -l es yourfile.txt (the value es means the language to use), maybe you need to install aspell and aspell-yourlanguage packages
- First of all you need to know the charset locale of your desired language. These are the first 2 double-chars values of the variables of the command locale. In the above example my locale is es_ES@UTF-8, then, the value that i need to know is es and more exactly, es_ES, For example:
- en_US: English (America)
- fr_FR: French
- hu: Hungarian
- it: Italian
- po_BR: Portuguese (brazilian)
Tip: You can use for the translations, a value like en or en_US, both are accepted now (better to use the second option en_US)
Note: The charset is not always equivalent to the word. For example es is not equivalent to the word spanish.
- You can see, for example, a directory called eliveinstaller on the downloaded tree, and inside you will find all the languages available for it. You can add a new one, edit an existing one to correct it, or add new messages not yet translated. Anyway, thanks to this awesome site called Trac, you can browse the SVN repository a lot easier and more user-friendly with the Browse tab, and you also have a lot of nice and well made features like:
- source:/translations/eliveinstaller: This is a simple link to a directory of the SVN repository
- changeset:15/icons/gimp/icon.edc: This is a example of view the changes made in a file, with a lot of different options, views, author, etc... you obtain a diff file between those revisions too in the bottom of the page, a diff file is exactly what is called a patch, like this, you have a lot of options and ways to view it
- [14:15]: You can view the exact logs between a commit and other
- source:/icons/gimp/icon.edc#14 The code of a file in the revision nÂș 14, to look for the old versions of the commits/code
- etc... browse and see all the available options
- The SVN system is an online repository for work to work with diff files. That means that you can recover very old code, like the first you committed, for example. It also means that you can remove your directory of work entirely. When you download the translations branch again you will recover all of it. For example: imagine that you go to another country with your laptop and you don't have the directory of work. You can download it and work with the last version committed.
- It's important to know that all the commits are saved every time it is sent. This means that for every commit, the revision number grows a number, and the repository too.... We don't want to work in a repository that has revisions like 3928729387. So, edit and work with your files until you are finished, then commit it. Do not send a commit every time you write a new line.
- Is very important to verify that the code works without problems before you send it to the repository. You need to test it. Testing the translations is probably the easiest. You just need to put your file in the place where the other files are. To know where those files are located you can use, for example, the command dpkg -L eliveinstaller-3g.
Note: Due to the instability of unionfs, if you try this on the LiveCD mode it may not work correctly. Launch it from a terminal and see if you get any error messages.
- You can use any editor to edit your files. We recommend vim to the ones who know how to use it, but in any case, do not use scite (bug report)
- When you commit a file, you need to add a message between the 'keys'. Please be clear. For example; if you add a language file you can use a message like Adding language romanian to the eliveinstaller. If you fix some wording, write one like Fixed some typos in romanian language. You can be more detailed too, for example; Fixed a bug that hangs the eliveinstaller when you select a root partition mounted. Those messages are informative, especially for knowing and finding what is exactly done in that revision. Those messages are saved. Later we can browse with the search function to find anything we want easily.
- If you need to compare files on your local machine of work, for example; if you have a translation on a USB key and another in your local directory of work, and you don't know which of the two is the newest one... or also mixed, you can use:
- diff: This is the standard tool of unix/linux for viewing differences between files, is also good to made patches
- meld: This is the special one and my prefered, a very good graphical tool where you can view the differences and send parts of it between the files, you need to apt-get install meld, take a look to screenshot
Meld tool is very helpful.
How to work with SVN
Working with SVN is really very easy. After you have downloaded the files you can simply start working with them. Edit them with any editor and commit your changes with the simple command svn commit like this example:
eliveuser@Elive[~/development/translations/eliveinstaller/]$ svn commit -m 'Fixed some wrong words on french language' Transmitting file data ....... Committed revision 17. eliveuser@Elive[~/development/translations/eliveinstaller/]$
If you are not correcting a file but adding a file, you need to use the add option. Remember: in this case you are sending all the contents of it. If it is a file, just the file. If is a directory, you are sending the whole directory with his files and sub-directories. If you want to send, for example; all the images of your directory you can use the * wildcard like *png. When you add a file, your working directory remembers it but doesn't send it since you don't commit it, for example:
eliveuser@Elive[~/development/translations]$ svn add eliveinstaller A eliveinstaller A eliveinstaller/de-utf8 A eliveinstaller/en-utf8 A eliveinstaller/es-utf8 A eliveinstaller/fr-utf8 A eliveinstaller/hu-utf8 A eliveinstaller/it-utf8 A eliveinstaller/sv-utf8 eliveuser@Elive[~/development/translations]$ snv commit -m 'Adding the directory eliveinstaller with all the language files' Adding eliveinstaller Adding eliveinstaller/de-utf8 Adding eliveinstaller/en-utf8 Adding eliveinstaller/es-utf8 Adding eliveinstaller/fr-utf8 Adding eliveinstaller/hu-utf8 Adding eliveinstaller/it-utf8 Adding eliveinstaller/sv-utf8 Transmitting file data ....... Committed revision 17. eliveuser@Elive[~/development/translations]$
It's very easy, these are basically the only 2 options of svn that you need to know for simple and basic work usage. There is a better and more complete but small Howto about SVN on the link HowtoSvn. You can find more options on it, maybe you will need it in the future. I recommend you take at least a quick look before you start working with SVN.
How to test your modifications
If is a file to start by #!/bin/bash you can just replace the original file by your own one or add it if it doesn't exist On this example, we found the location of the files and after put our file on it:
eliveuser@Elive[~]$ apt-cache search eliveinstaller eliveinstaller-3g - Elive installer, new generation, with the upgrader feature eliveinstaller-ng - Elive installer, new generation, with the upgrader feature eliveuser@Elive[~]$ dpkg -l | grep "eliveinstaller" | grep "ii" ii eliveinstaller-3g 3.2-5 Elive installer, new generation, with the up eliveuser@Elive[~]$ dpkg -L eliveinstaller-3g /. /usr /usr/sbin /usr/sbin/eliveinstaller /usr/share /usr/share/eliveinstaller /usr/share/eliveinstaller/po /usr/share/eliveinstaller/po/README_translators.txt /usr/share/eliveinstaller/po/en-help-iso /usr/share/eliveinstaller/po/en-utf8 /usr/share/eliveinstaller/po/es-utf8 /usr/share/eliveinstaller/po/sv-utf8 /usr/share/eliveinstaller/po/fr-utf8 /usr/share/eliveinstaller/po/de-iso /usr/share/eliveinstaller/po/en-iso /usr/share/eliveinstaller/po/es-iso /usr/share/eliveinstaller/po/fr-iso /usr/share/eliveinstaller/po/hu-iso /usr/share/eliveinstaller/po/it-iso /usr/share/eliveinstaller/po/en-help-utf8 /usr/share/eliveinstaller/po/sv-iso /usr/share/eliveinstaller/po/hu-utf8 /usr/share/eliveinstaller/po/it-utf8 /usr/share/eliveinstaller/po/de-utf8 /usr/share/eliveinstaller/postinstall eliveuser@Elive[~]$ su password: ****** root@Elive[/home/eliveuser]# cp development/translations/eliveinstaller/de-utf8 /usr/share/eliveinstaller/po/de-utf8
- dpkg -l = show installed (or deinstalled) packages
- dpkg -L = show the files of a installed package
Note: About the eliveinstaller translation: Remember that the liveCD mode uses unionfs for the virtual write mode of the system, and sometimes it doesn't work too good... the eliveinstaller needs to be launched from the liveCD mode (of course), but if you do those tests on the liveCD mode, maybe you can get errors on the terminal where you launch eliveinstaller as root. On this case, just reboot and try again
You can edit this page to correct my tarzanic english too :)
If you have a RSS reader, we recommends to add http://dev.elivecd.net/log?limit=100&mode=stop_on_copy&format=rss to the it for see the commits of SVN, a good thing is to change your google homepage of your firefox configuration to http://netvibes.com , you can customize this site for see your emails, RSS news, wheather, google searcher bar... etc etc
NOTE: A lot of applications that Elive has are from Debian. Normally those applications are in your own language. If this is not the case, you can make a translation for this non-elive application in an easy way with this howto and collaborate with Debian too. Then you will have this application in your language, in your computer, and in the future all the users of Debian and Elive that speak your language can benefit from it as well.

