[prev in list] [next in list] [prev in thread] [next in thread] 

List:       webmin-devel
Subject:    [webmin-devel] [FAQ] Webmin/Usermin - Translation - Monthly HOWTO
From:       "Martin Mewes" <mm () mewes ! tv>
Date:       2004-04-30 22:00:35
Message-ID: 200404302200.i3UM0Zlc023242 () ds217-115-144-166 ! dedicated ! hosteurope ! de
[Download RAW message or body]

######################################################################
Webmin/Usermin - Translation - Monthly HOWTO
Original: http://webmin.mamemu.de/modules.html#newlang
Martin Mewes - Webmin/Usermin Translation Co-Ordinator (WTCO)
Last changed: 26.04.2004
######################################################################

History:
--------

26.04.2004
Virtualmin-Version 1.91 released as stable
Webmin-Development-Version 1.142 released
Usermin-Development-Version 1.072 released

06.04.2004
Webmin-Version 1.140 released as stable
Usermin-Version 1.070 released as stable


######################################################################

Current Stable Release for Webmin is 1.140
http://prdownloads.sourceforge.net/sourceforge/webadmin/webmin-1.140.tar.gz
http://prdownloads.sourceforge.net/webadmin/webmin-1.140-1.noarch.rpm
http://webmin.mamemu.de/devel/tarballs/webmin-1.140-minimal.tar.gz

Current Development Release for Webmin is 1.142
http://webmin.mamemu.de/devel/rpm/webmin-1.142-1.src.rpm
http://webmin.mamemu.de/devel/rpm/webmin-1.142-1.noarch.rpm
http://webmin.mamemu.de/devel/tarballs/webmin-1.142.tar.gz

Current Stable Release for Usermin is 1.070
http://prdownloads.sourceforge.net/webadmin/usermin-1.070.tar.gz
http://prdownloads.sourceforge.net/webadmin/usermin-1.070-1.noarch.rpm

Current Development Release for Usermin is 1.072
http://webmin.mamemu.de/devel/rpm/usermin-1.072-1.noarch.rpm
http://webmin.mamemu.de/devel/rpm/usermin-1.072-1.src.rpm
http://webmin.mamemu.de/devel/tarballs/usermin-1.072.tar.gz

Current Stable Release for VirtualMin is 1.91
http://webmin.mamemu.de/download/virtualmin/virtual-server-1.91.wbm.gz
	
######################################################################

Administrative:
---------------

23.02.2004
If you are anoyed by these post you can filter this with procmail
scanning for

X-Webmin: monthly

in the header.

######################################################################

TOC:

1.	Adding New Languages to Webmin
2.	Is there a way to use localization when developing
	a new theme?
3.	Use a nice script for developing languages.
4.	Samples
5.	Special Hint

######################################################################

1.	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 : 
Get the latest development version of Webmin so that you can see the
latest translations that have been done by other people. 

In the file lang_list.txt in the Webmin root directory, add a new line
for your language like :

lang=sw,titles=1,charset=iso-6666-6 Swahili

The "lang" part defines the short code for the language, and should
follow the ISO standard where possible. The "titles" 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" 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. 

Switch to your new language in the Webmin Configuration module under
the Language icon. 

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. 

In each of the module.info files under the module directories, add a
new desc_sw= line that is a translation of the desc= line. 

In each of the module directories, create a new file called
config.info.sw which is a translation of config.info (if it exists). 

In the help subdirectory under each of the module directories (where
they exist), translate all of the something.html files into
something.sw.html. 

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. 
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. 

When your translation has made some progress, send a .tar.gz file of
all the translated files to Martin Mewes at webmin@webmin.mamemu.de 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

######################################################################

2.	Is there a way to use localization when developing
	a new theme?
	
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 = &load_language("my-theme-directory");
print "<b>$mytext{'something'}</b> <p>\n";

######################################################################

3.	Use a nice script for developing languages.

Christophe Chisogne developed a script which is available in a special
Download-Area at www.webmin.com.

	http://www.webmin.com/wtco/char2ent.pl

There will be more stuff to download there soon.
As example:

dodiff.sh	An easy interface to diff between en-files and your
		language file.

dolinks.sh	As there are many symlinks between Webmin and Usermin
		on Jamies Computer I wrote this little script which
		does a symlink-detection for you.
		So it could be that if you develop for a Usermin-
		Module you enhance a Webmin-Module as well :-)

This is the output from the help: perl char2ent.pl

Usage:
char2ent [--mode=html|work] [-b] [-c] 8bitfile.txt ...
char2ent [--help] [--version]

--mode=x,  -m=x   choose html mode (default) or work mode
--backup,  -b     backup of modified file
--confirm, -c     confirm conversion of each file

If you still need other Entities ...

German
http://www.ramsch.org/martin/uni/fmi-hp/iso8859-1.html

Unicode
http://www.theorem.ca/~mvcorks/code/charsets/auto.html

######################################################################

4. Samples:

Editing usermin/at/lang/de is as easy as this :-)

perl char2ent.pl --mode=work usermin/at/lang/de
Conversion from &#ddd; entities to 8bit chars
Converting file [usermin/at/lang/de]...

And this now is the file

----------------------------------------------------------------------

index_user=Ausführen als Benutzer
index_date=Ausführen am
index_time=Ausführen um
index_cmd=Auszuführende Befehle
index_id=Auftrags-ID
index_exec=Ausführen auf
index_created=Erzeugt am
index_dir=Ausführen im Verzeichnis
index_return=Befehls-Liste
index_cdate=Aktuelles Datum
index_ctime=Aktuelle Zeit
edit_cmd=Vollständiges Skript zum Ausführen
edit_header=Einzelheiten des geplanten Befehls
edit_delete=Diesen Befehl löschen
edit_ejob=Geplanter Befehl existiert nicht mehr!
create_euser=Fehlender oder ungültiger Benutzername
create_ecmd=Keine Anweisungen angegeben
create_edir=Fehlendes oder ungültiges Verzeichnis
delete_egone=Befehl bereits ausgeführt oder gelöscht
acl_users=Darf geplante Befehle bearbeiten für
acl_only=Nur diese Benutzer
acl_except=Alle Benutzer außer
index_title=Geplante AT-Befehle
index_header=Neuer geplanter AT-Befehl
edit_title=Geplanter AT-Befehl
edit_ecannot=Sie sind nicht berechtigt, diesen geplanten Befehl zu bearbeiten.
create_err=Konnte AT-Befehl nicht einrichten
create_edate=Fehlende oder ungültige Datums- oder Zeitangabe
create_efuture=Datum und/oder Zeit liegt in der Vergangenheit
create_ecannot=Sie sind nicht berechtigt, geplante AT-Befehle für diesen Benutzer anzulegen
delete_err=Konnte AT-Befehl nicht abbrechen
acl_all=Alle Benutzer
acl_this=Aktuellen Webmin-Benutzer

----------------------------------------------------------------------

Now you can edit this file normally and if you are finished:

perl char2ent.pl --mode=html usermin/at/lang/de
Conversion from 8bit chars to &#ddd; entities
Converting file [usermin/at/lang/de]...

And this is the file:
----------------------------------------------------------------------

index_user=Ausf&#252;hren als Benutzer
index_date=Ausf&#252;hren am
index_time=Ausf&#252;hren um
index_cmd=Auszuf&#252;hrende Befehle
index_id=Auftrags-ID
index_exec=Ausf&#252;hren auf
index_created=Erzeugt am
index_dir=Ausf&#252;hren im Verzeichnis
index_return=Befehls-Liste
index_cdate=Aktuelles Datum
index_ctime=Aktuelle Zeit
edit_cmd=Vollst&#228;ndiges Skript zum Ausf&#252;hren
edit_header=Einzelheiten des geplanten Befehls
edit_delete=Diesen Befehl l&#246;schen
edit_ejob=Geplanter Befehl existiert nicht mehr!
create_euser=Fehlender oder ung&#252;ltiger Benutzername
create_ecmd=Keine Anweisungen angegeben
create_edir=Fehlendes oder ung&#252;ltiges Verzeichnis
delete_egone=Befehl bereits ausgef&#252;hrt oder gel&#246;scht
acl_users=Darf geplante Befehle bearbeiten f&#252;r
acl_only=Nur diese Benutzer
acl_except=Alle Benutzer au&#223;er
index_title=Geplante AT-Befehle
index_header=Neuer geplanter AT-Befehl
edit_title=Geplanter AT-Befehl
edit_ecannot=Sie sind nicht berechtigt, diesen geplanten Befehl zu bearbeiten.
create_err=Konnte AT-Befehl nicht einrichten
create_edate=Fehlende oder ung&#252;ltige Datums- oder Zeitangabe
create_efuture=Datum und/oder Zeit liegt in der Vergangenheit
create_ecannot=Sie sind nicht berechtigt, geplante AT-Befehle f&#252;r diesen Benutzer anzulegen
delete_err=Konnte AT-Befehl nicht abbrechen
acl_all=Alle Benutzer
acl_this=Aktuellen Webmin-Benutzer

----------------------------------------------------------------------

Restrictions:

You cannot use this procedure completely on ...

config.info.*	(WebMin)
uconfig.info.*	(UserMin)
module.info	(WebMin)

.. because setting commas (,) or delimiters like a dash (-) are
trailing symbols for webmin's perl scripts. You MUST write those
symbols with pure HTML-Entities!

######################################################################

5.	Special hint

/usr/libexec/webmin/lang/en

<original>
feedback_desc2=This 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=This 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 webmin@webmin.mamemu.de 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


-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
-
Forwarded by the Webmin development list at webmin-devel@webmin.com
To remove yourself from this list, go to
http://lists.sourceforge.net/lists/listinfo/webadmin-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic