Sorry for the third message in a row.

I implemented something for #5. It seems to work as expected but I’m not 
satisfied of the admin integration. For now, we can only change the value 
of translatable fields for the current language. So language switching has 
to be done and it is impossible to update every language for a field at 
once. I’ll try to mimic django-modeltranslation behavior to add several 
fields instead of one.

To have this working I added a new parameter to the register_setting 
function, called translatable. This value default to False and is set to 
True for SITE_TITLE, SITE_TAGLINE and SHOP_CURRENCY_LOCALE. Are there other 
settings that need this kind of behavior?

I’ll try to investigate possible causes for #1 in a couple of days. But I 
consider it a minor issue since adding a dot at the end of the button_text 
field makes it being translated (even though it might seem ugly).


Le mercredi 14 mai 2014 15:35:20 UTC+2, Mathias Ettinger a écrit :
>
> commits for #2 and #4 have been pushed
>
>
> Le mercredi 14 mai 2014 13:28:06 UTC+2, Mathias Ettinger a écrit :
>>
>> I learned something from #5. I’ll try to play with conf.models and see 
>> what happens.
>>
>> For #1, I was simply suggesting to change the text of the button. At 
>> least for my setup, when the text is “Submit” for the english language or 
>> “Wyślij” for polish, it display the french (default) button_text field 
>> whatever the active language is. But if I change the text to something 
>> else, it gets displayed properly.
>>
>>
>>
>> Le mardi 13 mai 2014 22:49:28 UTC+2, Eduardo Rivas a écrit :
>>>
>>>  Sorry, I didn't understand your explanation on point 1. Could you 
>>> elaborate a little bit more? The issue I was describing is that the Submit 
>>> button is not showing the active language text in the form, but rather the 
>>> default language value.
>>>
>>> About number 2, I actually had this working a while back using Django's 
>>> set_language<https://docs.djangoproject.com/en/dev/topics/i18n/translation/#set-language-redirect-view>view.
>>>  I created a 
>>> gist <https://gist.github.com/jerivas/8f9873c36cd8a895cd4a> with some 
>>> code that can go directly into base.html or (even better) in a small 
>>> template in includes/. Please note that settings.USE_I18N must be included 
>>> in TEMPLATE_ACCESSIBLE_SETTINGS.
>>>
>>> Finally, the reason I brought up #5 was because some Settings are indeed 
>>> model instances stored in the database. See: 
>>> https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/conf/models.py.
>>>  
>>> However, they are a special case, as we wouldn't want to translate all 
>>> Settings instances. It would be good to include it in the ToDo just to keep 
>>> it in mind.
>>>  
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to