PlacelessTranslationService locales catalogs bugs

7 messages Options
Embed this post
Permalink
Juan Pablo Giménez

PlacelessTranslationService locales catalogs bugs

Reply Threaded More More options
Print post
Permalink
Hi,

        Today I filled to tickets, http://dev.plone.org/plone/ticket/9575 and
http://dev.plone.org/plone/ticket/9582

        I was trying to overrides plonelocales domain for spanish language to
support another date format. I can do it into a package than register a
translation with i18n:registerTranslations, but I want to do it the same
way than we overrides i18n locales, I mean putting it into
INSTANCE_HOME/i18n, in this case INSTANCE_HOME/locales. PTS have code to
support it, but doesn't work.

        In my tickets I include patches to fix this problem (#9582) and fix the
GettextMessageCatalog used when PTS_LANGUAGES have been defined...

        Hopping this could be useful to someone else... and maybe (I'm
dreaming) included in next releases...


        Saludos, and happy Plone TuneUp day!!! :)




------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

signature.asc (204 bytes) Download Attachment
Vincent Fretin

Re: PlacelessTranslationService locales catalogs bugs

Reply Threaded More More options
Print post
Permalink
Hi,

Have you read the following thread
http://n2.nabble.com/Recipe-for-overriding-translations-td3045492ef221724.html
Like Hanno said, you have to put your package before Plone:

[instance]
recipe = ...
zcml = my.package Plone

so the translations from my.package have priority on Plone translations.


Vincent Fretin
Ecreall
Site : http://vincentfretin.ecreall.com



2009/10/2 Juan Pablo Giménez <[hidden email]>:

> Hi,
>
>        Today I filled to tickets, http://dev.plone.org/plone/ticket/9575 and
> http://dev.plone.org/plone/ticket/9582
>
>        I was trying to overrides plonelocales domain for spanish language to
> support another date format. I can do it into a package than register a
> translation with i18n:registerTranslations, but I want to do it the same
> way than we overrides i18n locales, I mean putting it into
> INSTANCE_HOME/i18n, in this case INSTANCE_HOME/locales. PTS have code to
> support it, but doesn't work.
>
>        In my tickets I include patches to fix this problem (#9582) and fix the
> GettextMessageCatalog used when PTS_LANGUAGES have been defined...
>
>        Hopping this could be useful to someone else... and maybe (I'm
> dreaming) included in next releases...
>
>
>        Saludos, and happy Plone TuneUp day!!! :)
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9-12, 2009. Register now!
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Plone-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/plone-developers
>
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Juan Pablo Giménez

Re: PlacelessTranslationService locales catalogs bugs

Reply Threaded More More options
Print post
Permalink
El sáb, 03-10-2009 a las 11:00 +0200, Vincent Fretin escribió:

> Hi,
>
> Have you read the following thread
> http://n2.nabble.com/Recipe-for-overriding-translations-td3045492ef221724.html
> Like Hanno said, you have to put your package before Plone:
>
> [instance]
> recipe = ...
> zcml = my.package Plone
>
> so the translations from my.package have priority on Plone translations.
Hi Vincent,

        Yes, I know, but I think than could be better to use the same approach
for both translation methods, I mean you can take for sure than putting
them under INSTANCE_HOME will override any previous translation. Anyway
the code was already there, just needs a few changes to work...


Regards,
Juan Pablo Giménez


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

signature.asc (204 bytes) Download Attachment
Hanno Schlichting-4

Re: PlacelessTranslationService locales catalogs bugs

Reply Threaded More More options
Print post
Permalink
2009/10/5 Juan Pablo Giménez <[hidden email]>:
> Yes, I know, but I think than could be better to use the same approach
> for both translation methods, I mean you can take for sure than putting
> them under INSTANCE_HOME will override any previous translation. Anyway
> the code was already there, just needs a few changes to work...

I answered this on the Trac ticket http://dev.plone.org/plone/ticket/9582.

With the already implemented changes in Plone 4.0 replacing this
entire mechanism with the standard one as described by Vincent, this
new feature won't make it into any Plone release.

Sorry, but our whole custom i18n folder approach is phased out, as is
any kind of functionality that depends on the instance home location.
Code and functionality will be found in normal Python packages alone
in the future.

Hanno

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Juan Pablo Giménez

Re: PlacelessTranslationService locales catalogs bugs

Reply Threaded More More options
Print post
Permalink
Hi Hanno...

El lun, 05-10-2009 a las 18:01 +0200, Hanno Schlichting escribió:

> I answered this on the Trac ticket http://dev.plone.org/plone/ticket/9582.
>
> With the already implemented changes in Plone 4.0 replacing this
> entire mechanism with the standard one as described by Vincent, this
> new feature won't make it into any Plone release.
>
> Sorry, but our whole custom i18n folder approach is phased out, as is
> any kind of functionality that depends on the instance home location.
> Code and functionality will be found in normal Python packages alone
> in the future.
This is good... I wasn't saying than overrides on instance folder is
better... In fact is a lot cleaner the packages approach and we don't
need extra recipes like collective.recipe.i18noverrides... I was just
saying than in Plone3.3 (PTS 1.5) the methods could be unified, because
you already wrote the code... ;) But don't worry, I was just hacking
around and couldn't resist the temptation of fix _load_locales_dir... :)

btw, did you managed to take a look at
http://dev.plone.org/plone/ticket/9575
looks like PTS is using the unoptimized catalog class when PTS_LANGUAGES
is not defined...

Regards,
Juan Pablo



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

signature.asc (204 bytes) Download Attachment
Hanno Schlichting-4

Re: PlacelessTranslationService locales catalogs bugs

Reply Threaded More More options
Print post
Permalink
Hi.

2009/10/5 Juan Pablo Giménez <[hidden email]>:
> btw, did you managed to take a look at
> http://dev.plone.org/plone/ticket/9575
> looks like PTS is using the unoptimized catalog class when PTS_LANGUAGES
> is not defined...

I already applied your fix to SVN and closed the ticket ;-)

Hanno

------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers
Juan Pablo Giménez

Re: PlacelessTranslationService locales catalogs bugs

Reply Threaded More More options
Print post
Permalink
El lun, 05-10-2009 a las 19:46 +0200, Hanno Schlichting escribió:
> Hi.
>
> 2009/10/5 Juan Pablo Giménez <[hidden email]>:
> > btw, did you managed to take a look at
> > http://dev.plone.org/plone/ticket/9575
> > looks like PTS is using the unoptimized catalog class when PTS_LANGUAGES
> > is not defined...
>
> I already applied your fix to SVN and closed the ticket ;-)

Thanks Hanno... this make my day! :)


Juan Pablo...



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Plone-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-developers

signature.asc (204 bytes) Download Attachment