Re: [Mailman-Developers] features suggestion: languages
"Bognar, Attila" wrote:
Hi all,
I'm quite new to this list. I faced a "problem": I run a maillists for Hungarian people and the problem is that some of them don't speak english very much. So I have/should change the English text to Hungarian.
So what I suggest: when creating a new list, there could be a question, which asks what language the list should be. The datas of languages could be taken for example from ~mailman/templates/hungarian/
Well, we (Victoriano Giralt and I) have the same trouble and we're thinking on modifying mailman to support different languages.
We see the multilingual issue as a three pronged one: - The mail messages sent by the MLM to the users. - The apparence of web pages. - And the commands used to control the MLM via e-mail.
At first, we should tack the two fist ones. The last one is not a big issue thanks to the amazing web user interface :) ;)
Our approach to the problem would be as follows:
The system should have a default system language, defined at install time, which will be used for everything unbound to any list.
The system will have a set of supported languages, that can be selected as list default language (list creation) or by users for interfacing to
system areas not related to a list.A list can support a subset of languages of server, one of them being the list default language, that will be used for users that don't select a language and and for any list general messages, like the signature appended to list messages.
The user selected language will be used for the web interface and for personal messages, like password reminders.
The templates will be customisable like they are now, but on different languages.
List info webpage could be shown in any language supported by the list.
System logs will be in English. System manager should know what they are doing :)
This ends the philosophical part. Now the hard implementation issues :)
Directory $prefix/templates would include different directories, each dedicated to a diferent language, from which the selected new list languages, would be copied. So, this structure would be replicated for every list, but only for the list supported languages.
templates/es/ spanish de/ german bu/ bulgarian it/ italian, etc
The system messages would use a similar directory structure. A new directory, called $prefix/messages, would be created, to hold the supported languages. This directory would hold a module per supported language, named 'language'.py, i.e.: es.py, de.py, bu.py, etc
Each file could have entries like:
--- BEGIN es.py --- ErrorInvalidPasswd = 'Error: clave incorrecta' ListNotFound = 'la lista no se encuentra: %s' DEFAULT_MSG_FOOTER = """_______________________________________________ lista de distribucion %(real_name)s - %(real_name)s@%(host_name)s %(web_page_url)slistinfo/%(_internal_name)s """ --- END es.py ---
And to use it: It should be at the beggining of a program that wants to use it, like:
import MsgLang -- or whichever name it should have Msg = MsgLang.MsgLang() -- We are going send messages in the server default language Msg = MsgLang.MsgLang('es') -- We are going to send spanish messages
print Msg.msg('ErrorInvalidPasswd') returns 'Error: Invalid Password"'
print Msg.msg('ListNotFound') % 'List' should return 'la lista no se encuentra: List'
VBLE = {'web_page_url' : 'http://www.uma.es/', 'real_name' : 'Lista', 'host_name' : 'uma.es', '_internal_name' : 'XXXX'} print Msg.msg('DEFAULT_MSG_FOOTER') % VBLE should return '_______________________________________________ lista de distribucion Lista - Lista@uma.es http://www.uma.es/listinfo/XXXX'
We have a little problem, one of us is new to Python, but we won't reveal who :)
Of course this is open to discussion on this list.
___
/ F \
[[[]]]]
( O O )
#----------------0000--(_)--0000---------------# | Juan Carlos Rey Anaya (jcrey@uma.es) | | Servicio Central de informática | | Universidad de Málaga - España | #----------------------------------------------# # Solo se que cada vez se menos :-| # #----------------------------------------------#
On Fri, 21 May 1999, Juan Carlos Rey Anaya wrote:
I am also to interested in localization, my domain is Czech language.
We see the multilingual issue as a three pronged one:
- The mail messages sent by the MLM to the users. It is generealy not problem, becouse mailman is transparent for MIME encodings (We have 15 charactes in ISO-8859-2 character set).
- The apparence of web pages. It can be modified by exchanging templates in directories. I have made it and it works fine, the only problem is, that for example labels on buttons are hard genertated from source code.
- And the commands used to control the MLM via e-mail.
Here should by done some work, if I will send czech message, i need modify headers from e-mail. Mailman generates only US-ASCII headers and by templetas I can modify only body of message.
Command should not be translated. Only, and it is not localization subject, I am modifiing every version to recognize more command as aliases, like sub, subscribe, add...
This ends the philosophical part. Now the hard implementation issues :)
Directory $prefix/templates would include different directories, each dedicated to a diferent language, from which the selected new list languages, would be copied. So, this structure would be replicated for every list, but only for the list supported languages.
templates/es/ spanish de/ german bu/ bulgarian it/ italian, etc Yes, it can be done like this.
The system messages would use a similar directory structure. A new directory, called $prefix/messages, would be created, to hold the supported languages.
Yes and the messages should contains not only body, but also headers from mail.
This directory would hold a module per supported language, named 'language'.py,
Please check gettext package, which is also suported by python. It is my preffered way to internationalize aplications.
I think, we can include templates directory in 1.0, to help other with translation, f.e. in contib directory, it will not automaticaly install, but it can be manually placed instead of english templates.
cheers dan
--
________________________________________
DDDDDD
DD DD Dan Ohnesorg, supervisor on POWER
DD OOOO Dan@feld.cvut.cz
DD OODDOO Dep. of Power Engineering
DDDDDD OO CTU FEL Prague, Bohemia
OO OO work: +420 2 24352785;+420 2 24972109
OOOO home: +420 311 679679;+420 311 679311
________________________________________
Pesimista vidi v ementalskem syru jen ty diry.
Hi!
I am offering myself to help translate MailMan to spanish.
Juan Carlos: si quieres, puedo ayudar, solo contactame via mail.
Personally, I like the idea of having several language options at
installation time and choosing one.
Cheers,
/B
Bruno Mattarollo <bruno@gaiasur.com.ar> ... proud to be a PSA member <http://www.python.org/psa>
-----Original Message----- From: mailman-developers-admin@python.org [mailto:mailman-developers-admin@python.org]On Behalf Of Juan Carlos Rey Anaya Sent: Friday, May 21, 1999 9:58 AM To: mailman-developers@python.org Subject: Re: [Mailman-Developers] features suggestion: languages
"Bognar, Attila" wrote:
Hi all,
I'm quite new to this list. I faced a "problem": I run a maillists for Hungarian people and the problem is that some of them don't speak english very much. So I have/should change the English text to Hungarian.
So what I suggest: when creating a new list, there could be a question, which asks what language the list should be. The datas of languages could be taken for example from ~mailman/templates/hungarian/
Well, we (Victoriano Giralt and I) have the same trouble and we're thinking on modifying mailman to support different languages.
We see the multilingual issue as a three pronged one:
- The mail messages sent by the MLM to the users.
- The apparence of web pages.
- And the commands used to control the MLM via e-mail.
[...SNIP...]
We have a little problem, one of us is new to Python, but we won't reveal who :)
Of course this is open to discussion on this list.
___ / F \ [[[]]]] ( O O )
#----------------0000--(_)--0000---------------# | Juan Carlos Rey Anaya (jcrey@uma.es) | | Servicio Central de informática | | Universidad de Málaga - España | #----------------------------------------------# # Solo se que cada vez se menos :-| # #----------------------------------------------#
Mailman-Developers maillist - Mailman-Developers@python.org http://www.python.org/mailman/listinfo/mailman-developers
participants (3)
-
Bruno Mattarollo
-
Dan Ohnesorg
-
Juan Carlos Rey Anaya