collective / collective.nitf

A Dexterity-based content type inspired on the News Industry Text Format specification
8 stars 3 forks source link

Translations are not being applied #97

Closed dimiro1 closed 10 years ago

dimiro1 commented 10 years ago

I installed from master branch but the translations are not being complete applied.

Plone version 4.3.2 collective.nitf rev=436d4fda93839cf50799197a96f87d01e7744d18

![Uploading Captura de tela de 2013-11-22 21:17:22.png . . .]()

hvelarde commented 10 years ago

confirmed; I have no idea what the problem is.

dimiro1 commented 10 years ago

I think I know the problem. The .mo files compiled from .po files are not in being versioned. To solve the problem I set the following configuration in Instance section in buildout.

environment-vars = zope_i18n_compile_mo_files true

So to fix the problem you have to put .mo files in git, or to put an explanation in Readme file.

hvelarde commented 10 years ago

no, .mo file should never be in VCS; also, we are extending from a configuration that has already that variable set:

https://raw.github.com/collective/buildout.plonetest/master/plone-4.3.x.cfg

jpgimenez commented 10 years ago

@dimiro1 are you using your own buildout? because I can't reproduce this with nitf's buildout...

hvelarde commented 10 years ago

I was using package buildout and I ran into the same problem

jpgimenez commented 10 years ago

@hvelarde could you check your parts/instance/etc/zope.conf? should have this lines...

<environment>
    zope_i18n_compile_mo_files true
</environment>
jpgimenez commented 10 years ago

@hvelarde btw, portuguese or spanish?

dimiro1 commented 10 years ago

Yes @jpgimenez I am using a custom buildout.

jpgimenez commented 10 years ago

ok @dimiro1, so your solution of setting "environment-vars = zope_i18n_compile_mo_files true" is the right one, look at: http://developer.plone.org/i18n/internationalisation.html#i18ndude http://vincentfretin.ecreall.com/articles/my-translation-doesnt-show-up-in-plone-4

dimiro1 commented 10 years ago

OK. @jpgimenez. It fixes the problem.

jpgimenez commented 10 years ago

@hvelarde closed?

hvelarde commented 10 years ago

the problem for me what other: pt-BR translations are not used if you set your site language as pt.