Ticket #171 (new New feature)

Opened 8 months ago

Last modified 2 weeks ago

Plugin for translators

Reported by: mauser Assigned to:
Priority: major Milestone: DigitalVibes
Component: Plugins Version:
Keywords: Cc:

Description

Create a plugin that makes translator's work easy.

1. Read all translation strings from main translation file and from all plugins. 2. Present them in a nice HTML form, and make possible to edit strings from chosen language.

translation constant | default translation (english) | chosen language translation

3. Save user translation in appropriate files.

Attachments

translations_plugin.jpg (40.0 kB) - added by mauser on 05/04/08 13:36:40.
idea for plugin's interface
translations_admin.patch (48.0 kB) - added by mauser on 05/07/08 16:35:13.
first, very quickly done version :)
TranslationsAdmin.zip (7.5 kB) - added by mauser on 10/23/08 15:16:27.
working version with r640

Change History

05/04/08 13:36:40 changed by mauser

  • attachment translations_plugin.jpg added.

idea for plugin's interface

05/04/08 13:45:09 changed by mauser

How should it work? (first see attached screenshot)

  • first translator chooses language - plugin loads all of translation files
  • it shows all of translations strings or only for choosen plugin (
    • first column definition
    • second column default string (always english)
    • third column editable field filled with choosen language translation (if strings for choosen language are unavailable it displays empty fields)
  • after clicking 'save' button plugin saves new translations strings (in appropriate files associated with each plugin)

05/05/08 23:40:31 changed by matt

Maciej, sounds good to me. Maybe the input should be textarea as some translation strings are pretty long.

05/07/08 16:35:13 changed by mauser

  • attachment translations_admin.patch added.

first, very quickly done version :)

05/07/08 16:36:43 changed by mauser

Basic functionality of plugin implemented. We can start translating Piwik into as many languages as possible :)

05/07/08 20:43:01 changed by maetrus

Sounds very well, but how to commit the new language to svn? Also it would be nice to save the language files, so that you should put the translations into another installtion ... (difficult to describe but you understand).

05/07/08 22:03:35 changed by mauser

It is work for translator coordinator http://piwik.org/blog/2008/05/piwik-is-looking-for-a-translator-coordinator-be-part-of-the-piwik-team/

basically after translating new language execute:

$ svn stat | awk '{if($1 == "?") print $2}' | xargs svn add
$ svn diff > lang.patch

and send lang.patch to the translator coordinator

05/09/08 10:30:44 changed by maetrus

Yes, mauser this is the way we would do. But what about these users who wants to translate and do not know svn?

05/09/08 14:46:35 changed by matt

mauser, I agree with maetrus, we would need a "Export all languages files to ZIP" link, that would create a ZIP of all the languages files in the right directories so that we only have to extract this zip on the piwik root folder, and everything would go in place. Using php5 zip features should do the trick, we have to make sure it works on 5.1 (I can see on http://ie2.php.net/manual/en/zip.setup.php that they talk about 5.2)

mauser, do you reckon you can add this feature? :)

05/09/08 14:49:11 changed by matt

mauser, I removed your function to create directories in Piwik.php because it was only used by your plugin. Please move it instead in your plugin class.

Please attach your plugin files in a .zip on this ticket, instead of attaching the patch.

I committed your other changes and they are available in the 0.1.8 release. thanks!

05/13/08 01:25:45 changed by devym

Please give also a look to the tool used by the RoundCube guys:

http://translator.roundcube.net

I find it very useful and easy to use.
I'm doing Italian translation just now. I will be your bug-hunter :)

05/13/08 15:15:03 changed by mauser

I attach plugin as a .zip file. Those who had problems with applying patch, please just unzip the archive in plugins/ directory.

I will add export feature tomorrow.

05/17/08 13:53:01 changed by mauser

new version with import/export feature,

unzip file TranslationsAdmin.zip in your plugins/ directory and activate plugin

05/18/08 15:33:28 changed by hass

Maybe overkill, but a very good tool http://drupal.org/project/l10n_server.

05/21/08 13:39:41 changed by maetrus

How to activate the new language? Is there an UI for change the language at runtime or have I to change config.inc.php by hand?

05/29/08 04:41:45 changed by matt

maetrus, at the moment you have to change the setting by hand. we need a UI to change this setting. but this is a different ticket (that you can create)

06/14/08 21:18:05 changed by Houbsi

Im new at piwik. im already there to improve the language german and french. but i like to do more. i study webdesign in belgium but my php knowledge isn't the best (Low Skill and learning). I learn fast. and i can work for the UI.

09/07/08 15:08:21 changed by Isb1009

Not working, see #344

10/10/08 15:07:09 changed by matt

  • milestone changed from Stable release to DigitalVibes.

Maintaining this plugin is now high priority.

(follow-up: ↓ 19 ) 10/11/08 18:46:17 changed by mauser

if you got problem with the plugin please update to current trunk version of Piwik

(in reply to: ↑ 18 ) 10/18/08 23:06:59 changed by wicked

Replying to mauser:

if you got problem with the plugin please update to current trunk version of Piwik

using trunk r640 + translationsAdmin from 10/11/08:
when updating translations using the translationAdmin + the filter by plugin option, all translations entries stored on the lines after those from the updated plugin will be erased. of course no issues when selecting '-- all translations --'

10/23/08 15:16:27 changed by mauser

  • attachment TranslationsAdmin.zip added.

working version with r640

10/23/08 15:17:11 changed by mauser

I made some minor modifications. It is working with r640 on my system.

11/04/08 16:55:58 changed by matt

just to let you know, we published a new version today: the 0.2.12 that includes the language drop down selector and lots lots of bug fixes. Hopefully the translator plugin is working on this version. good luck all translators! thank you for your great job :)

11/05/08 15:09:50 changed by Isb1009

It's not working with r685 (r686, version tag 0.2.16). When it's active, all the administration menus disappear.

PS: I've got a new version of the Catalan translation, which I sent to translations[at]piwik[dot]org on 29th Oct but hasn't been updated on SVN.

11/08/08 03:55:42 changed by wicked

working like a charm with 0.2.17 thanks