Title Fallback behavior for po2cc?
Priority bug Status chatting
Project Translate Milestone
Superseder Nosy List cwebber, jedoig, lunpa, nkinkade, nyergler
Assigned To lunpa Keywords

Created on 2009-03-21.13:11:49 by nyergler, last changed 2012-08-20.21:43:07 by cwebber.

msg4022 (view) Author: cwebber Date: 2012-08-20.21:43:07
I think we might be doing this now already but I'm not sure.
msg2322 (view) Author: nyergler Date: 2010-10-25.05:02:21
We should think about how this can happen; it's slightly complicated by the fact 
that you can't just check for translate returning "nothing", as the translation 
files contain English text as the starting point (at least for symbolic strings). 

Note that if fall back worked the way we want it to, PO files as generated by 
Zope's default i18n extraction tools would work fine for us.
msg2246 (view) Author: cwebber Date: 2010-10-15.16:33:26
The answer is, unfortunately, no:

Pretty much everything uses zope.i18n.translate, and that itself doesn't do

>>> translate('', 'cc_org', {}, target_language='es')
u'El licenciador permite la reproducci\xf3n, distribuci\xf3n y comunicaci\xf3n
p\xfablica de la obra, incluso con fines comerciales.'
>>> translate('', 'cc_org', {}, target_language='es_CO')
u'The licensor permits others to copy, distribute, display, and perform the
work, including for commercial purposes.'
msg2166 (view) Author: nyergler Date: 2010-09-28.22:31:58
msg1849 (view) Author: nyergler Date: 2010-07-19.18:15:14
Reassigning to Chris; Chris, can you confirm that the translate function used in
cc.engine utilizes a fallback path such as es_CO -> es -> en ?  If so, please
close this as resolved.
msg573 (view) Author: nyergler Date: 2009-03-21.13:11:49
If a language does not have a translation for a string, we should fall back to
either a parent language (ie, es for es_CO) or English (en_US).  This *should*
have been handled by po2cc, but appears to no longer be.  For example, deed.pd.

We recently stripped all English "translations" from the PO style files; this
may be related (I can't remember if the po2cc uses the PO or CC style files for
Date User Action Args
2012-08-20 21:43:07cwebbersetmessages: + msg4022
2012-08-20 21:39:59lunpasetassignedto: cwebber -> lunpa
nosy: + lunpa
2010-10-25 05:02:21nyerglersetmessages: + msg2322
2010-10-15 16:33:26cwebbersetmessages: + msg2246
2010-09-28 22:31:58nyerglersetmessages: + msg2166
2010-07-19 18:15:14nyerglersetstatus: unread -> chatting
nosy: + cwebber, - paulproteus
messages: + msg1849
assignedto: jedoig -> cwebber
2009-04-06 22:22:26nyerglersetassignedto: nyergler -> jedoig
nosy: + jedoig
2009-03-21 13:11:49nyerglercreate