Discussion:
[Erp5-dev] translation
Yoshinori Okuji
2004-08-25 11:48:58 UTC
Permalink
I'm working on translation in ERP5. This is driven by Localizer +
TranslationService. In the past, we used ISO-8859-1 as the default
encoding because it was the default in Zope, but we now use UTF-8 as
our standard encoding. This means that you need to convert _all_ text
into UTF-8, if you use non-ASCII characters, when you migrate to the
current version of ERP5.

If you have an older ERP5 installation, you must create these objects in
your portal:

Localizer (Localizer)
Localizer/default (MessageCatalog)
Localizer/erp5_ui (MessageCatalog)
Localizer/erp5_content (MessageCatalog)
translation_service (TranslationService)

In translation_service, you must create two domains: ui and content. The
domains in the translation_service must correspond to apporopriate
message catalogs:

Default -> Localizer/default
ui -> Localizer/erp5_ui
content -> Localizer/erp5_content

All of these operations are automatically done if you add "ERP5 Site" in
ZMI.

ERP5Shop and Base18 won't work well. ERP5Shop will be addressed later.
Base18 won't be improved, since we intend not to use Base18 in the
future.

Data is not translated well yet. This is because it is hard to dicide
where the translation should occur (i.e. Formulator, Page Template or
ListBox).


This is information on real translation. Basically, ERP5 translates
messages only in Page Templates. There are a few exceptions: ListBox
and a Python Script. ListBox is exceptional, because it generates HTML
directly from raw data. This might change, if ListBox is
well-modularized.

I have already inserted many i18n tags into Page Templates and ListBox.
So the UI can be translated very easily now. Actually, I have a
japanese version of ERP5 locally, although this is not complete yet.

If you want to translate any mesesage, open the ZMI in Localizer/erp5_ui
or Localizer/erp5_content. You can translate messages from your web
browser.


From now on, you should be very careful about titles when you make a new
skin. If you use any inappropriate word, it can spoil out translated
messages.

Consistency is quite important to reduce the burden of translators. For
example, we have several terms for "identifier": identifier, id, Id and
ID. This is very bad. I recommend using ID always.

Also, you should use natural English for titles. For example, "Currency
ListBox" is horrible. This is only meaningful for developers. This
should be read "Currencies".

YO
--
Yoshinori Okuji, Nexedi Research Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com
Loading...