Jump to content


Photo

Regarding translation


  • Please log in to reply
6 replies to this topic

#1 m42

m42

    Member

  • New Members
  • PipPip
  • 18 posts
  • LocationPortugal

Posted 19 November 2012 - 04:18 PM

Hi,

Is there any reason to use php arrays for the l10n stuff instead of the gettext / .po format ?

The reasons to use .po files are:
1 - Its easy to build/update .po catalogs from the sources
2 - We can use usual tools (poedit, lokalize, ....) to maintain the language files
3 - Common framework and tools for l10n work, instead of "yet-another-array-format" for the messages.
4 - Easy to keep the message files clean and ordered (instead of big fat warnings "// PLEASE KEEP it ordered, bla, bla, bla").


Just a thought,
Pedro "m42" Ribeiro

#2 Ivica

Ivica

    Advanced Member

  • Moderators
  • 565 posts

Posted 20 November 2012 - 06:49 AM

Hi Pedro,
Thanks for suggestion, at some point we might consider improving our language files, and switching to use gettetxt, and automate translation process, and creation/updating message list. The problem can be additional software(for editing po files, because not all users/translators might be familiar with it), how to install it on windows servers(maybe this is not issue) and similar. We are using custom scripts for managing language files.

We are busy with adding some CRM core features, like reports, UI for messages, upgrade tool and similar.

Pedro, if you have some experience with localization and getetxt, would you like to contribute to Zurmo, and help us improve l10n stuff?

#3 m42

m42

    Member

  • New Members
  • PipPip
  • 18 posts
  • LocationPortugal

Posted 20 November 2012 - 11:17 AM

Hi Ivica,

Sure, i'm willing to contribute to zurmo. I'm still learning the ins and outs of the code (not very much used to Yii framework), but i have a few years experience with l10n stuff on Debian, so i think it will be doable :)

What's the best course of action to start implementing those features ?

#4 raysto

raysto

    Zurmo Team

  • Administrators
  • 1,973 posts

Posted 21 November 2012 - 01:25 AM

Hi Ivica,

Sure, i'm willing to contribute to zurmo. I'm still learning the ins and outs of the code (not very much used to Yii framework), but i have a few years experience with l10n stuff on Debian, so i think it will be doable :)

What's the best course of action to start implementing those features ?

Hi Pedro,
We would be delighted to have your assistance. Thank you for offering to help. We will need to outline the steps. At first glance, we might have you clone the repository first and maybe start to integrate with gettext. Yii supports these kind of translation files. What do you think about that?
Thanks,
Ray

Ray Stoeckicht
Zurmo Team
Try Zurmo Pro


#5 m42

m42

    Member

  • New Members
  • PipPip
  • 18 posts
  • LocationPortugal

Posted 21 November 2012 - 10:32 PM

I've already cloned the repository ;)

I think it would be nice to be able to change the MessageStore, without touching the Yii::t calls, but i really still don't know all the ups and downs of the code... Are you using the regular Yii MessageStore classes ?

#6 Ivica

Ivica

    Advanced Member

  • Moderators
  • 565 posts

Posted 22 November 2012 - 06:26 AM

Hi Pedro,
Yes, we are using regular Yii class to store messages, it is actually PHP array(CPhpMessageSource), so I think we don't need to touch Yii::t function. As you know, Yii also support gettext format for language source, and it would be great if we could switch to it.
I attached you two other functions from our internal repository(for continuous integration) that help us in creating skeleton files for new translation and checking for messages that aren't translated(it works only for four languages that are included in Zurmo repository). Problem that we have right now, is that we are not able to update existing language packages with new messages automatically, and improving this was in our task list.
We would need to rewrite these two functions(I think that get text can manage good part of these tasks via its parameters), and improve them, for example to update .po files automatically, to avoid any manual interaction.

On one of my previous projects(Zend Framework based), I integrated SimplePo, simple web interface for editing .po files, storing messages in database and so on, and it would be perfect if we could do something similar for this project, but this is long term plan.

For faster communication, I sent you my email and skype id via forum private messages.

Attached Files



#7 Martinal

Martinal

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 20 December 2013 - 01:01 PM

Guys, I recommend using https://poeditor.com/ as a hosting platform for translation projects. It's really efficient with gettext and crowd-sourcing projects. It has translation memory, a comments system, reference language possibility and many small features that add up to something very useful. I an using it and it makes work easier.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users