From: Martin M. <mar...@de...> - 2003-09-16 08:38:56
|
###################################################################### Webmin/Usermin - Translation - Weekly HOWTO - 16.09.2003 Original: http://webmin.mamemu.de/webmin/modules.html#newlang Martin Mewes - Webmin/Usermin Translation Co-Ordinator (WTCO) ###################################################################### Last changed: 16.09.2003 I changed the TOC to tell folks about latest releases of Webmin/Usermin. ###################################################################### History: 14.09.2003 Inspired by Thibaut Dabonneville I added the section Is there a way to use localization when developing a new theme? ###################################################################### TOC: 1. Latest Stuff for downloading 2. Adding New Languages to Webmin 3. Is there a way to use localization when developing a new theme? 4. Please and always use HTML-Entities where and if possible. 5. Samples 6. Special Hint ###################################################################### 1. Latest Stuff for downloading Current Stable Release for Webmin is 1.110 http://prdownloads.sourceforge.net/sourceforge/webadmin/webmin-1.110.tar.= gz http://prdownloads.sourceforge.net/webadmin/webmin-1.110-1.noarch.rpm Current Development Release for Webmin is 1.110 http://webmin.mamemu.de/devel/rpm/webmin-1.110-1.noarch.rpm http://webmin.mamemu.de/devel/rpm/webmin-1.110-1.src.rpm http://webmin.mamemu.de/devel/tarballs/webmin-1.110.tar.gz http://webmin.mamemu.de/devel/tarballs/webmin-1.110-minimal.tar.gz Current Stable Release for Usermin is 1.040 http://prdownloads.sourceforge.net/webadmin/usermin-1.040.tar.gz http://prdownloads.sourceforge.net/webadmin/usermin-1.040-1.noarch.rpm Current Development Release for Usermin is 1.040 http://webmin.mamemu.de/devel/rpm/usermin-1.040-1.noarch.rpm http://webmin.mamemu.de/devel/rpm/usermin-1.040-1.src.rpm http://webmin.mamemu.de/devel/tarballs/usermin-1.040.tar.gz Current Stable Release for VirtualMin is 1.3 http://webmin.mamemu.de/webmin/download/modules/virtual-server-1.3.wbm.gz =09 ###################################################################### 2. Adding New Languages to Webmin New translations of the existing core Webmin modules are always welcome. If you want to translate Webmin into a new language or update one of the existing translations, follow these steps :=20 Get the latest development version of Webmin so that you can see the latest translations that have been done by other people.=20 In the file lang_list.txt in the Webmin root directory, add a new line for your language like : lang=3Dsw,titles=3D1,charset=3Diso-6666-6 Swahili The lang=3D part defines the short code for the language, and should follow the ISO standard where possible. The titles=3D part controls whether Webmin should use letter images for displaying page titles in the language, and should be set to 1 if your language uses european characters. The optional charset=3D part sets the character set that is sent to the web browser when using the language, so that is can automatically select the right font to use.=20 Switch to your new language in the Webmin Configuration module under the Language icon.=20 In the directory lang under the Webmin root and in each of the lang subdirectories under the module directories, create a new file called sw (or whatever the short code for your language is) that is a translation of the en file in the same directory.=20 In each of the module.info files under the module directories, add a new desc_sw=3D line that is a translation of the desc=3D line.=20 In each of the module directories, create a new file called config.info.sw which is a translation of config.info (if it exists).=20 In the help subdirectory under each of the module directories (where they exist), translate all of the something.html files into something.sw.html.=20 A table of currently translated languages is available so that you can see how much has been done for each language and module so far. There is also a list of other translators that you might want to contact before doing your own translation work.=20 You don't have to finish translating the entire of Webmin for your translation to be useful. Many people just do a few modules at a time, or skip the help pages initially.=20 When your translation has made some progress, send a .tar.gz file of all the translated files to Martin Mewes at we...@we... so that he can include it in the main Webmin distribution. The best way to tar up everything is with the command : tar czf /tmp/translation.tar.gz */lang/sw lang/sw */module.info */config.info.sw */help/*.sw.html ###################################################################### 3. Is there a way to use localization when developing a new theme? =09 Yes (by Jamie Cameron) There is a way to do this - create a lang/ subdirectory under your theme with the usual en, de and other files. Then in your theme CGIs or .pl, use code like : %mytext =3D &load_language("my-theme-directory"); print "<b>$mytext{'something'}</b> <p>\n"; ###################################################################### 4. Please and always use HTML-Entities where and if possible. To find your own HTML-Entities you may try to ask Google for "HTML-Entities" + ISOXXXX-X where ISOXXXX-X must be replaced with _your_ ISO-Code. Useful Links to HTML-Entities German http://www.ramsch.org/martin/uni/fmi-hp/iso8859-1.html Unicode http://www.theorem.ca/~mvcorks/code/charsets/auto.html ###################################################################### 5. Samples: This is a sample module.info <cat> category=3Dsystem desc_ru_SU=3D=F2=C1=D3=D0=C9=D3=C1=CE=C9=C5 =DA=C1=C4=C1=CE=C9=CA longdesc=3DSchedule the execution of one-off commands or scripts. desc_zh_TW.Big5=3D=AB=FC=A5O=B1=C6=B5{ os_support=3Dsolaris slackware-linux redhat-linux mandrake-linux debian-linux suse-linux united-linux open-linux turbo-linux corel-linux msc-linux freebsd netb desc_pl=3DZlecone polecenia desc=3DScheduled Commands desc_es=3DComandos Planificados desc_de=3DGeplante AT-Aufträge name=3DAt depends=3D1.102 version=3D1.102 desc_pt_BR=3DComandos Agendados desc_hu=3D=DCtemezett feladatok desc_ru_RU=3D=D0=E0=F1=EF=E8=F1=E0=ED=E8=E5 =E7=E0=E4=E0=ED=E8=E9 desc_ca=3DOrdres Planificades </cat> As you see in the /desc_de/ I used HTML-Entities in it. ------------------------------------------------------------------- This is a sample config.info.de <cat> # config.info.de-File for at # written by Dieter H=FCrten (www.webmin.de) - DH # die...@te... ###################################################################### # Last patched: 07.08.2003 Martin Mewes for WEBMIN - MM # Questions, comments, snide-remarks: we...@we... ###################################################################### # DH at_dir=3DAT- Aufträge Verzeichnis,0 # MM at_style=3DAT-Systemtyp,1,linux-Linux,solaris-Solaris,freebsd-FreeBSD </cat> As you can see I have have added a Notice on top of the file, which is not really needed, but you may follow this. Please see the differences between the /-/ within /AT-Systemtyp/ and the descriptions at the end of the line /at_style/. Do NOT rewrite freebsd-FreeBSD into freebsd-FreeBSD as this may render this Webmin-Module not usable in your language. This shall tell you, that you should TEST your translation and switch back and forth between English and $your_language in order to see if everything is up. ------------------------------------------------------------------- This is a sample lang/de <cat> # de-File for at # written by Dieter H=FCrten (www.webmin.de) - DH # die...@te... ###################################################################### # Last patched: 07.08.2003 Martin Mewes for WEBMIN - MM # Questions, comments, snide-remarks: we...@we... ###################################################################### #DH index_user=3DAusführen als Benutzer index_date=3DAusführen am index_time=3DAusführen um index_cmd=3DAuszuführende Befehle index_id=3DAuftrags-ID index_exec=3DAusführen auf index_created=3DErzeugt am index_dir=3DAusführen im Verzeichnis index_return=3DBefehls-Liste index_cdate=3DAktuelles Datum index_ctime=3DAktuelle Zeit edit_cmd=3DVollständiges Skript zum Ausführen edit_header=3DEinzelheiten des geplanten Befehls edit_delete=3DDiesen Befehl abbrechen edit_ejob=3DGeplanter Befehl existiert nicht mehr! create_euser=3DFehlender oder ungültiger Benutzername create_ecmd=3DKeine Anweisungen angegeben create_edir=3DFehlendes oder ungültiges Verzeichnis delete_egone=3DBefehl bereits ausgeführt oder gelöscht acl_users=3DDarf geplante Befehle bearbeiten für acl_only=3DNur diese Benutzer acl_except=3DAlle Benutzer außer #MM - 07.08.2003 index_title=3DGeplante AT-Befehle index_header=3DNeuer geplanter AT-Befehl edit_title=3DGeplanter AT-Befehl edit_ecannot=3DSie sind nicht berechtigt, diesen geplanten Befehl zu bearbeiten. create_err=3DKonnte AT-Befehl nicht einrichten create_edate=3DFehlende oder ungültige Datums- oder Zeitangabe create_efuture=3DDatum und/oder Zeit liegt in der Vergangenheit create_ecannot=3DSie sind nicht berechtigt, geplante AT-Befehle für diesen Benutzer anzulegen delete_err=3DKonnte AT-Befehl nicht abbrechen acl_all=3DAlle Benutzer acl_this=3DAktuellen Webmin-Benutzer </cat> As you can see I have not newly translated stuff that has already been done. I have added my stuff at the end of the file. ------------------------------------------------------------------- After "patching" you may want to use this little script I called "install.sh" for copying things into the right directory, so that you can actually see your work. I have placed this in /home/<username>/trans/at/ and I run it with su -c "sh install.sh" #!/bin/sh cp -fv module.info config.info.de /usr/libexec/webmin/at/ cp -fv lang/de /usr/libexec/webmin/at/lang/de rm -fv /etc/webmin/module.infos.cache Please note that you have to "patch" this for every single directory. Example: /home/<username>/trans/apache/install.sh #!/bin/sh cp -fv module.info config.info.de /usr/libexec/webmin/apache/ cp -fv lang/de /usr/libexec/webmin/apache/lang/de rm -fv /etc/webmin/module.infos.cache ###################################################################### 6. Special hint /usr/libexec/webmin/lang/en <original> feedback_desc2=3DThis feedback will be sent to the developer of Webmin, not your system administrator, ISP or hosting company. Please write your feedback in english, even if you are currently running Webmin in another language. </original> You should add the following (after translating it into your language). <br>If you have a question or a request on the <u>Arabic Transalation</u>, please send a feedback <u>only</u> to <u>webmin@webmin.mamemu.de</u>. Complete line: feedback_desc2=3DThis feedback will be sent to the developer of Webmin, not your system administrator, ISP or hosting company. Please write your feedback in english, even if you are currently running Webmin in another language.<br>If you have a question or a request on the <u>Arabic Transalation</u>, please send a feedback <u>only</u> to <u>webmin@webmin.mamemu.de</u>. And please do not forget to set proper HTML-Entities! If you want to take care of the translations yourself you may strip off we...@we... and replace it with your own eMail-Adress. Note for the German folks: I kindly take this part for DE-Translations exclusively ;-) kind regards Martin Mewes --=20 Novacote Flexpack - Division of COIM Deutschland GmbH c/o IT/IS-Department - Hamburg - Germany |