[Sugar-devel] SUGAR_LANGPACKDIR
    Bert Freudenberg 
    bert at freudenbergs.de
       
    Mon Jun  4 14:43:14 EDT 2012
    
    
  
On 04.06.2012, at 19:15, Simon Schampijer wrote:
> On 06/04/2012 07:04 PM, Bert Freudenberg wrote:
>> On 04.06.2012, at 18:51, Simon Schampijer wrote:
>> 
>>> +    langpackdir = client.get_string('/desktop/sugar/i18n/langpackdir')
>>> +    if langpackdir is not None and langpackdir:
>>> +        os.environ['SUGAR_LANGPACKDIR'] = langpackdir
>> 
>> How should activities use SUGAR_LANGPACKDIR? Google comes up empty.
>> 
>> - Bert -
> 
> This is only a workaround for a bug:
> 
> http://bugs.sugarlabs.org/ticket/3654
> 
> http://lists.sugarlabs.org/archive/sugar-devel/2012-May/037678.html
> 
> The initial idea is described at, it is a gconf variable:
> http://wiki.sugarlabs.org/go/Features/Enhanced_Gettext
> 
> Regards,
>   Simon
Well, env vars are much easier to deal with than gconf. Is this something an activity can rely on now?
How about SUGAR_LOCALEDIR? Is that always ${SUGAR_BUNDLE_PATH}/locale ?
Reading the code, the procedure seems to be to pick the latest MO file found in any of these directories
	${SUGAR_LOCALEDIR}		(from ${SUGAR_BUNDLE_PATH}/locale )
	${SUGAR_LANGPACKDIR}		(from gconf /desktop/sugar/i18n/langpackdir )
	${prefix}/share/locale		(where prefix is compiled into the bundle, typically /usr or /usr/local)
and where "latest MO" means opening all MO files and comparing their ‘PO-Revision-Date:’ header.
Is that interpretation correct? And complete?
- Bert -
    
    
More information about the Sugar-devel
mailing list