Would like to translate missing sentences (french)

10 posts / 0 new
Last post
#1 Thu, 09/13/2007 - 22:29
julien.pham

Would like to translate missing sentences (french)

Hi,

I don't understand what should I do to translate missing sentences on usermin login page. Look at : https://webmail.sominice.fr

The text "Login to Usermin" and "You must enter..." is not translated... and I don't know how to translate it... I searched into the fr file for usermin, and I didn't find any sentence for this text.

Even in the english lang file this sentence is nowhere...

How comes?

Thanks

Thu, 09/13/2007 - 22:53
Joe
Joe's picture

Hey Julien,

You know, I can't seem to pick that one out either. session_header and session_mesg seems promising but it doesn't seem to do anything.

I'll ask Jamie to chime in here.

--

Check out the forum guidelines!

Fri, 09/14/2007 - 07:46
Joe
Joe's picture

You can find those strings in the ulang/en file under the Usermin root directory.
Due to the way I package Usermin, it shares the lang/en directory with Webmin, and then overrides some strings in ulang/en

--

Check out the forum guidelines!

Fri, 09/14/2007 - 08:15 (Reply to #3)
julien.pham

So I guess we need to be careful when we upgrade modules, to not loose the translations we made?

As I not only did some translations, I customized translations for me... for example on the login screen the big text is "Login to Usermin", and I put as a translation "Messagerie SOMINICE", as this is my company name...

btw would be fine to have options in usermin to setup the messages to display on login screen...

Fri, 09/14/2007 - 08:37 (Reply to #4)
Joe
Joe's picture

If you do some translations that would be useful to everyone, you can send them to me and I will include them in the next Usermin release.

If you want to make changes that are just specific to your site, you can create the file /etc/usermin/custom-lang , and put into it the same message codes as are in lang/en and ulang/en . These will then override the defaults built into Usermin.

You can also do overrides for strings within modules by creating a file like /etc/usermin/MODULENAME/custom-lang .

--

Check out the forum guidelines!

Fri, 09/14/2007 - 10:00
julien.pham

Oh ok that's fine. I'll do that... I translated some modules so I will... btw it seems the module to help translating works for usermin modules too, except that I can edit a language file with it, but if my language does not exist yet, I can create it, but then I cannot edit the file... And if I create the file for my language I do not see the other languages anymore... too bad ^^

I have another question... why did you decide for plain text translations? In some other CMS they use .pot, .po and .mo files, so the .mo is a binary one...

And now a feedback... I'm french so I use accentuated characters such as "é" or "à". But if I put those characters in the translation text, then it will display weird on the website. I have to use the html way of writing them, such as é and à for instance. It makes the process of doing translations a pain. I found a way around, I do the translations into a windows text editor, then I put them into an html wysiwyg editor, then I copy the source code... but... I think the translation system should be improved to help translating modules...

Fri, 09/14/2007 - 20:48 (Reply to #6)
Joe
Joe's picture

I guess the reason for the current language files that they were designed before I ever heard of .po files :-) Also, they are a simple format that can be read by Webmin with no need for external libraries.

The reason that HTML escapes need to be used instead of accented characters is that in most cases the text is actually HTML. So characters like < and > and & and anything non-ascii need to be escaped..

--

Check out the forum guidelines!

Fri, 09/14/2007 - 21:35 (Reply to #7)
julien.pham

Characters like "é" and "è" are ASCII too ^^ But they need to be written in html mode...

I didn't have this problem with the other webmail which uses pot/po/mo...

Perhaps for a future version you should consider changing the translation system...

Sat, 09/15/2007 - 03:57 (Reply to #8)
julien.pham

btw how do I send you translations?

Sat, 09/15/2007 - 11:59
Joe
Joe's picture

Ideally the translation tool that most people use with Webmin (the wbmtranslator module) would do this for you. I will have to talk to the author about this..

To send translations, if you are using wbmtranslator you can do it from within that module. Otherwise you could use commands like this :

cd /usr/libexec/webmin
tar cvzf /tmp/translation.tar.gz $module/module.info $module/config.info.$language $module/lang/$language $module/help/*.$language.html

where $module is the module sub-directory, and $language is the language code (like fr). Then email me the /tmp/translation.tar.gz file.

--

Check out the forum guidelines!

Topic locked