i18ndude behaviour for "Default"
francoise <[email protected]> Mon, 7 Feb 2011 07:28:47 -0800 (PST)
| Newsgroups | gmane.comp.web.zope.plone.internationalization |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I am building my .pot files with french "unaccented" msgid and french
default strings. Then I will give .po file to someone who will be able to do
a better english translation than me.
I was wondering why I some Default string where extracted from Page Template
while other were not :
<h2><tal:block tal:content="p/libelle">Ingénieur</tal:block>
<tal:block tal:condition="python:p.position=='II'"
i18n:translate="(confirme)">(confirmé)</tal:block>
<tal:block tal:condition="python:p.position=='III'"
i18n:translate="(encadrement)">(encadrement)</tal:block>
</h2>
gave me the following .pot entries :
#. Default: "(confirmé)"
#: ./site/file1.pt:61
msgid "(confirme)"
msgstr ""
#: ./site/file1.pt:62
msgid "(encadrement)"
msgstr ""
I found the explanation in zope/tal/talgettext.py :
class POEngine(DummyEngine):
def translate():
if msgid == default:
default = None
So when msgid = default no "#.Default ..." is generated ?
I had a problem with "default normalization" : for Page Templates,
zope/tal/talinterpreter.py normalize() is called for "Default" so : " a b
" becomes "a b".
For strings extracted from python code the same normalization does not seem
to be applied. This leads to different defaults for the same default string.
Regards
françoise
--
View this message in context: http://plone-regional-forums.221720.n2.nabble.com/i18ndude-behaviour-for-Default-tp6000650p6000650.html
Sent from the Internationalization mailing list archive at Nabble.com.
------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world?
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Plone-i18n mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-i18n