Website in transifex

View: New views
12 Messages — Rating Filter:   Alert me  

Website in transifex

by Nick Schermer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Duno if i understand it correctly, but if Jerome is redesigning the
website, it could be worth looking if we can handle translations in
transifex. That should be fairly easy with xml and our current git
setup.

Nick
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Mike Massonnet-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/5 Nick Schermer <nickschermer@...>:
> Duno if i understand it correctly, but if Jerome is redesigning the
> website, it could be worth looking if we can handle translations in
> transifex. That should be fairly easy with xml and our current git
> setup.

How do you see this should be working?

I see two options:
1- use gettext.
2- use gettext as intermediate to generate arrays.

I am more in favor of solution 2. With the basic gettext functions you
have to set the locale to the exact match on the system (for French it
would be fr_FR.utf8 but not fr_FR or fr and that's on my system,
others might have UTF8 capsed). And if the locale is missing on the
system it wont work at all, in fact it needs that all locales are
installed... dunno but it is like that since years. There is an
external php-gettext library developed on launchpad that doesn't have
this problem but the last news was in 2006 and I don't like the idea
of including it.

In the benchmarking POV, unless we are enabling memcached, the loading
of the compiled po files is slow, while loading a php file with an
array is very quick. Once it is loaded it is as fast as if we would
display from arrays however.

Loading translations and displaying (run once):
gettext   0,0074100494384766   89.12%
array   0,00043296813964844   5.21%

Displaying translations already loaded (run 1000 times):
gettext   0,04879903793335   7.15%
array   0,041149139404297   6.03%

Working with intermediate files will need some sort of a small script
and generate the php array files for each language.

And now about the existing translations, it will be very hard
(impossible) to reuse them. They are mostly outdated and don't respect
any template.

I had also like to know more about Jérôme's plan indeed. I don't
remember if there was an initial thread.

> Nick

--
Mike
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Nick Schermer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/6 Mike Massonnet <mmassonnet@...>:
> 2009/11/5 Nick Schermer <nickschermer@...>:
>> Duno if i understand it correctly, but if Jerome is redesigning the
>> website, it could be worth looking if we can handle translations in
>> transifex. That should be fairly easy with xml and our current git
>> setup.
>
> How do you see this should be working?

I did not look into a real solution until I know that the plans are
for the website.

Nick
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Jérôme Guelfucci-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nick Schermer wrote:

> 2009/11/6 Mike Massonnet <mmassonnet@...>:
>> 2009/11/5 Nick Schermer <nickschermer@...>:
>>> Duno if i understand it correctly, but if Jerome is redesigning the
>>> website, it could be worth looking if we can handle translations in
>>> transifex. That should be fairly easy with xml and our current git
>>> setup.
>> How do you see this should be working?
>
> I did not look into a real solution until I know that the plans are
> for the website.
>
> Nick

Hello all,

For now, I don't plan to touch the architecture of the website. There is
already a lot of work to improve the contents and improve the current
CSS. I agree that the translation system needs to be improved, but I
think that it does not have top priority (at least on my list).

If someone feels like working on this, it would be cool to find a
solution that does not change the current PHP "templates" too much, I
would appreciate if I could avoid rewriting what I have just rewritten.

Cheers,

Jérôme

PS: I updated the distros page recently, some changes still need to be
pushed to the production website though. I may still change some things,
but this is more or less how it'll look like.
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Nick Schermer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/7 Jérôme Guelfucci <jeromeg@...>:
>
> If someone feels like working on this, it would be cool to find a solution
> that does not change the current PHP "templates" too much, I would
> appreciate if I could avoid rewriting what I have just rewritten.

I can play with this a bit, I am most familiar with the website code.

Nick
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Jérôme Guelfucci-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nick Schermer wrote:
> 2009/11/7 Jérôme Guelfucci <jeromeg@...>:
>> If someone feels like working on this, it would be cool to find a solution
>> that does not change the current PHP "templates" too much, I would
>> appreciate if I could avoid rewriting what I have just rewritten.
>
> I can play with this a bit, I am most familiar with the website code.
>
> Nick

That would be awesome Nick! You can use the devel branch if you want, I
don't plan to use it until I have finished updating the contents (i will
use it for the new layout/CSS).

Jérôme

_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Mike Massonnet :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/7 Nick Schermer <nickschermer@...>:
> 2009/11/7 Jérôme Guelfucci <jeromeg@...>:
>>
>> If someone feels like working on this, it would be cool to find a solution
>> that does not change the current PHP "templates" too much, I would
>> appreciate if I could avoid rewriting what I have just rewritten.
>
> I can play with this a bit, I am most familiar with the website code.

I guess you will made your mind yourself about how it should look
then. If you need a help afterwards to rewrite the texts just ring the
bell.

> Nick

--
Mike
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Nick Schermer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/7 Mike Massonnet <mmassonnet@...>:

> 2009/11/7 Nick Schermer <nickschermer@...>:
>> 2009/11/7 Jérôme Guelfucci <jeromeg@...>:
>>>
>>> If someone feels like working on this, it would be cool to find a solution
>>> that does not change the current PHP "templates" too much, I would
>>> appreciate if I could avoid rewriting what I have just rewritten.
>>
>> I can play with this a bit, I am most familiar with the website code.
>
> I guess you will made your mind yourself about how it should look
> then. If you need a help afterwards to rewrite the texts just ring the
> bell.

Well I already figured xml2po works quite well on the simple html
pages we have in i18n/, so I'm thinking about using that. Will write
some scripts to merged the english html into po(t) files and some
script we can run to generated translated pages from po files. The
last one can then be hooked into git or transifex.

In that case mocha will generate translated files which will easily be
synced to the other servers, without spoiling the git clones of the
website.

Nick
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Auke Kok-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nick Schermer wrote:

> 2009/11/6 Mike Massonnet <mmassonnet@...>:
>> 2009/11/5 Nick Schermer <nickschermer@...>:
>>> Duno if i understand it correctly, but if Jerome is redesigning the
>>> website, it could be worth looking if we can handle translations in
>>> transifex. That should be fairly easy with xml and our current git
>>> setup.
>> How do you see this should be working?
>
> I did not look into a real solution until I know that the plans are
> for the website.

I recently did this for the moblin userguide project, which is written
in xml. using xml2po, you generate pot/po files, and they can after
being translated merged back without issue.

for an example, look at the moblin-user-guide project on git.moblin.org.

of course, it does mean that the php documents might need to be
reformatted, since xfce's website is setup a bit differently. but that
might not be a big issue. the tools are all there.

Auke
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Nick Schermer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/7 Auke Kok <sofar@...>:
> I recently did this for the moblin userguide project, which is written in
> xml. using xml2po, you generate pot/po files, and they can after being
> translated merged back without issue.
>
> for an example, look at the moblin-user-guide project on git.moblin.org.
>
> of course, it does mean that the php documents might need to be reformatted,
> since xfce's website is setup a bit differently. but that might not be a big
> issue. the tools are all there.

I already have that working more or less, but indeed, the pages need a
bit of reformatting, but not a lot. Generating the pages is however
quite time consuming (the po -> xml stage), so we might want to run
the script as a cronjob instead of a git hook.

Nick
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Auke Kok-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nick Schermer wrote:

> 2009/11/7 Auke Kok <sofar@...>:
>> I recently did this for the moblin userguide project, which is written in
>> xml. using xml2po, you generate pot/po files, and they can after being
>> translated merged back without issue.
>>
>> for an example, look at the moblin-user-guide project on git.moblin.org.
>>
>> of course, it does mean that the php documents might need to be reformatted,
>> since xfce's website is setup a bit differently. but that might not be a big
>> issue. the tools are all there.
>
> I already have that working more or less, but indeed, the pages need a
> bit of reformatting, but not a lot. Generating the pages is however
> quite time consuming (the po -> xml stage), so we might want to run
> the script as a cronjob instead of a git hook.

you might want to take a look at my makefiles then... it only makes new
xml files for po files that have changed, sigificantly reducing build
time after each commit

Auke
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev

Re: Website in transifex

by Nick Schermer :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/11/7 Auke Kok <sofar@...>:

> Nick Schermer wrote:
>>
>> 2009/11/7 Auke Kok <sofar@...>:
>>>
>>> I recently did this for the moblin userguide project, which is written in
>>> xml. using xml2po, you generate pot/po files, and they can after being
>>> translated merged back without issue.
>>>
>>> for an example, look at the moblin-user-guide project on git.moblin.org.
>>>
>>> of course, it does mean that the php documents might need to be
>>> reformatted,
>>> since xfce's website is setup a bit differently. but that might not be a
>>> big
>>> issue. the tools are all there.
>>
>> I already have that working more or less, but indeed, the pages need a
>> bit of reformatting, but not a lot. Generating the pages is however
>> quite time consuming (the po -> xml stage), so we might want to run
>> the script as a cronjob instead of a git hook.
>
> you might want to take a look at my makefiles then... it only makes new xml
> files for po files that have changed, sigificantly reducing build time after
> each commit

Yes I already had that in mind, will take a look for sure. I think
I'll also split into multiple pot files, that will also make
translating easier, on the other hand, the gross of the translations
are the documentation, which will be translated in git somewhere in
the near future, I suppose.

Nick
_______________________________________________
Xfce4-dev mailing list
Xfce4-dev@...
http://foo-projects.org/mailman/listinfo/xfce4-dev