⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 translation.howto

📁 -一个LINUX下的使用方&#63845 的CD-ROM刻录软件,开放源码
💻 HOWTO
字号:
/---------------------------------------------------------\| TRANSLATION HOWTO                                       ||                                                         || X-CD-Roast 0.98                                         ||                                                         || 09.07.2000 Thomas Niederreiter                          |\---------------------------------------------------------/Introduction:-------------X-CD-Roast 0.98 does allow easy internationalization of all itstexts. All it does need is somebody who is doing the translation.If you want to be an official X-CD-Roast language-maintainer please contact me. I have to coordinate all your efforts - wouldbe quite stupid to have more then one person working on a certaintranslation without knowing about each other.So - if you have contacted me and I agreed you to be a language-maintainer you can start your work.This file describes all you have to know.First of all you might wonder why I don't use GNU gettext for this - well, as I started this I did not know very much about gettext and mysystem is a lot easier to understand. It also allows on-the-fly switchingof languages while the program is running and you also need not to recompileanything to update the language-files.I am aware of the problems with missing fontset when switching manuallyto another language - The needed font for your locale is loaded at startupand when you change the language then there is no way for me to reloadthe necessary fonts for the new language. So, when switching languages at runtime you have to expect problems withthe display of any special characters the new languages needs. The only sure way to switch languages is by setting the LANG, LC_ALL orLC_MESSAGE environment variable to your languages before starting X-CD-Roast. By default X-CD-Roast will always check this enviroment variables todetermine which language (and fonts) should be loaded! When you overridethis setting in setup by setting a fixed language you may running intoproblems! Please test your translation only with the correct set locale!This is also the only way to get multi-byte fontset working fine.E.g. to set your locale to german: 	"export LANG=de_DE" (depends on your shell)If you get a "Gdk-WARNING **: locale not supported by C library" thenyou don't have support for this locale on your system. This means (amongother things) that your system does not know which fonts belong to that language. In this case you have to update your system or try to install support for this locale. See your system documentation about this.The files:----------There are two files which contain all text-strings used by X-CD-Roast.Both files are read once at startup of X-CD-Roast in memory. The first file- lib/lang/language.def - contains all the texts of the menues and dialog-boxes. The second - lib/lang/langhelp.def - does contain only the bubble(tooltip) online help.  Beginning from version 0.98alpha4 X-CD-Roast does a little syntax-checkingof the language files at startup. So when you get a "sequence-warning" fromX-CD-Roast check if you did not mix up some language-ids or messages.  The format:-----------The "language.def" file has a header, in which all used languages aredefined.Comments are starting with a hash "#" as the first char on a line.--# Translation done by: tnLANG_0: English; us, uk# Translation done by: tnLANG_1: Deutsch; de--This lines define which languages are available. Be sure to use exactlythe number here, which I have assigned you. The next field is the name of your language. Best expressed in your ownlanguage - so I wrote "Deutsch" instead of "German". Its the text thatis displayed in the setup-menu.After the semicolon you can add your iso-language-codes. If you have morethan one you can seperate them by comma.This codes are used to identify your language by looking the LANG or LC_MESSAGES enviroment-variables. This is required to load the correct fontsfor your locale. Next are the texts itself. First is always an id-number (message-id) which is defined by me. Then, seperated by the underscore, is the language-id. So, 0012_1 means: "Text Nr. 12", in "Language Nr. 1" (German). Also only change and add texts with your language-id! All other languagesare handled by someone else.Things to consider:-------------------Its good to know that you should fill out all texts - if you dont providea translation there will be an automatic fallback to language 0(english). With new releases of X-CD-Roast there always will be newtexts added - I do try not to change any old texts - so usually you don'thave to look through all old text-definition to see if something changed.If I really have to change something in the older texts, I will contactyou by email.  The text itself is in quotes - if you want to have quotes in the text itselfyou can escape them with a backslash. e.g. (\").You also can't break up a long line in several short - the line can be aslong as you want - as long its a single line.Several lines are used as format-strings by printf. In this case you mustbe sure to include the format-chars like %d and %s on the correct positions. Also keep in mind that space in the menues is very limited. Try not use muchlonger translations as the original texts. If you are not sure start X-CD-Roast from time to time to check if your texts do fit on the screen.Some texts are going over more than one line - dialog-windows for example.These texts contain \n to mark where to break long lines. Please seewhere I used \n in my texts and try to use them also correctly.You can use special chars of your language - as long X-CD-Roast (or GTK)can display them and your system has support for this locale. You also need to have a text-editor which allows you to enter suchchars - I can't give you a hint here...my german keyboard is fully supported by my RedHat-distribution and allowed me to enter the umlautsdirectly.The "langhelp.def" file is the same as the "language.def" - you can justleave the header away, because automatically the one from the "language.def"is used. Because these textis are only used in the bubble-help of GTK, youdon't have to worry about breaking up long lines. GTK-bubble (tooltip) helpwraps them automatically.How to get started:-------------------Starting from version 0.98alpha4 I included a little shellscriptlib/lang/lang_extract.sh which should ease the translations.Change your directory to lib/lang within the X-CD-Roast source treeand call "./lang_extract.sh <id>". Replace <id> with your given language-id.So e.g. the swedish translator would type: "./lang_extract.sh 6"The script rips out all other languages except english and yours. So youhave a much smaller file to handle and can see more easily which partsneed translations. If you start completely new with translation and your language-id has notbeen used before, you do exactly the same - in this case you only get alanguage-file with english texts. Be sure to add your "LANG_"-string inthe header and add your text as described above. The lang_extract.sh shipped with alpha5 also got a nice feature whichdoes automatically create empty dummy translations, which is saving youthe work to enter the message and language ids yourself.When you are done translating language.def and langhelp.def just sendme back this (much smaller) files. You can also change your own old texts - I will remerge the complete file everytime I receive a translation-update from you!You may have noticed that on some (mostly older) distributions thespecial chars of your language are not correctly displayed when thetext is printed bold. This seems to be a libc problem which is fixedin the most recent linux distributions. However I added a command-lineswitch which disabled multi-byte-font support and causes that the characters are displayed correctly. Start X-CD-Roast with the -o switchfor that. Things I have to worry about:-----------------------------You might wonder how I do merge various translations into one file.When serveral people are working on different languages each one willmail me back their version.I have a script which will merge any number of translations into onelanguage file. You just have to be sure only to use your language-idnumber.I guess thats all you have to know. Please don't start translating stuff without contacting me first andreceived your personal language-id. The current translators/languages are:--------------------------------------id 0: English, Thomas Niederreiter <tn@fh-muenchen.de>id 1: German, Thomas Niederreiter <tn@fh-muenchen.de>id 2: Dutch, Edwin Hakkennes <E.Hakkennes@et.tudelft.nl>id 3: Italian, Andrea di Lecce <dryu@octava.it>id 4: French, Ferdinand de Broich <firebird@chez.com>id 5: Croatian, Denis Pleic <dpleic@open.hr>id 6: Swedish, Richard Torkar <ds98rito@thn.htu.se>id 7: Danish, Lars Juul <larsjuul@mail.dk>id 8: Portuguese, Pedro Borges <pcb@mail.com>id 9: Spanish, Jose Luis Benitez Crespo <jlbc@bigfoot.com>id 10: Turkish: Alexander Neptun <alnep@gmx.net>id 11: Estonian: Argo Vessmann <argo@ut.ee> and Triin Hannust <specter@ut.ee>id 12: Brasilian Portuguese: Till Kamppeter <Till.Kamppeter@uni-bayreuth.de>id 13: Japanese, Takeyuki Fujioka <fujioka@bil.educ.fukushima-u.ac.jp>id 14: Catalan, Pau Garcia i Quiles <pgquiles@teleline.es>id 15: Reserved for Czech - looking for translator! id 16: Reserved for Hungarian - looking for translator!id 17: Romanian, Adrian Costin <nc99@asterix.cj.wan.ro>id 18: Traditional Chinese, Chih-Wei Huang <cwhuang@linux.org.tw>id 19: Simplified Chinese, Chih-Wei Huang <cwhuang@linux.org.tw>id 20: Greek, Pancyber <pancyber@hotmail.com>id 21: Norwegian, Andreas-Johann Ulvestad <aj@lilo.no>id 22: Polish, Rafal Kura <jafal@usa.net>id 23: Russian, Igor Pruchanskiy <igor@linuxinside.com>id 24: Slovak, Martin Petr醟 <petrak@spsknm.schools.sk>id 25: Serbian, Dejan Dzodan <hobit@iname.com>If you are on this list and don't want to do any further translations,please contact me so that I can find a new language maintainer.09.07.2000 Thomas Niederreiter <tn@fh-muenchen.de>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -