[Mailman-Developers] features suggestion: languages
Juan Carlos Rey Anaya
jcrey@uma.es
Fri, 21 May 1999 14:57:39 +0200
"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 :-| #
#----------------------------------------------#