SGDDevTranslation

From Super Grub Disk Wiki
Jump to: navigation, search

Contents

Warning

Where it says italian replace with YOUR LANGUAGE. Where it says S30ita replace with S30LAN. For example if your language is portuguese is: S30por.

Install a Basic SGD Development System

First of all you are going to build a .iso to see how it is done because it has changed a bit to the website instructions.

Download: http://forjamari.linex.org/frs/last_package.php?group_id=61&package_id=152

Untar it and then cd to untarred folder. tar xvjf /path/to/the/tar.bz2 cd /path/to/the/tar

Make a Test SGD Cdrom iso

./make_sgd.sh cdromiso /home/pepe/mysgdiso.iso

You need mkisofs or genisofs installed by the way.

Try to burn the iso in a cdrw and see if it works or try it in qemu with something like that:

 qemu -boot d -cdrom /path/to/the/iso

Options and menues translation

Go to the directory where you have untar your source code.

cd to dev_sgd copy recursively "en" folder to "yourlanguage" folder (i.e. ita)

cd dev_sgd
cd tr
cp -a S10en S30ita


cd to yourlanguage

Go inside conf folder and translate:

S02_main.sh
S030_messages.sh
translate.sh

you have to translate the strings inside "" (on the right) Be careful with stranges characters, if you need to use " escape it with \.


Translate Help files

return to "yourlanguage" and then translate all the help.txt files that you will find and all the .txt files that you may find inside help folders (which are usually found inside sdg_module folders)

Ah! Do not translate the txt files from folders that do not have sdg_module inside it... because they may be options that are not used... although if you translate them you won't need to translate them in a future.


Example with Euskera

cd dev cp -R en eu # eu is not created before this command (If it is created you will put en inside eu) cp -R es/* eu cd eu

cd conf gedit S02_main.sh gedit S030_messages.sh gedit translate.sh

  1. you have to translate the strings inside "" (on the right)
  2. Be careful with stranges characters, if you need to use " escape it with \. 


cd .. for $n in `find txt` do gedit $n ;

  1. It won't work because I'm not good at these bash fors, I think one ; or two will be useful
  1. Ah! Do not translate the txt files from folders that do not have sdg_module inside it...
  2. because they may be options that are not used... although if you translate them you
  3. won't need to translate them in a future. 


Notes about translate.sh

SDG_TRANSLATE_BASE_DIR denotes one of the languages folder.

This is how the building of a sgd language folder works. An empty folder is created. Imperium language (usually en) is copied into it. SDG_TRANSLATE_BASE_DIR is copied into it. "Yourlanguage" is copied into it.

This is useful for fast translations of languages that are inside a country that speaks other language that is not the imperium language.

Example: Euskera.

Euskera is a language that is spoken in "El Pais Vasco" a portion of earth inside Spain. (Note for USAians: Spain is a country in the south of Europa) Main language in Spain is Spanish. Imperium language is English.

So...

Imagine that 100% of GSD is translated into English (ins't it obvious, it's the imperium language) Imagine that 80% of GSD is translated into Spanish (This will happen if I'm too lazy and I only make new translations into English :) or if other developer takes GSD developing leader role. ) Imagine that 0% of GSD is translated into Euskera.

So what happens... that an Euskera teenage or whoever try to begin translation and only translates translate.sh and activate option. Will other options be in NOTHING... because they are not translated ? No.

Euskera users will find menues translated into Euskera and the activate option. Most of the rest of options and help will be in Spanish. (Most of the Euskera people understand Spanish) And the new options that I wouldn't have translated into Spanish will be in English.

Testing your translation

Run ./make_sgd.sh qemutest script from Super Grub Disk development folder.

SGD should appear inside a qemu window.

(If you do not have qemu please install it!)

You can also build a SGD cdrom with :

./make_sgd.sh cdromiso /home/pepe/mysgdiso.iso

Speed your development

Once you have seen that you can build a multilingual cdrom which includes Italian and you see that modifying the txt files you see them in the qemu result you can speed your developing:

You should remove every sdg_module file from tr folders except the S30ita one.

This will generate an only italian cdrom when running the qemutest or when generating the iso file.