Do we need an API?

The title says all.
I’ve spent some time to create an API for the WTS.
In fact for now it’s a only a very simple API with a few Endpoints

Here is what we have:

  • api/login
    to authenticate the user (we use JSON Web Tokens)
  • api/projects/me
    Endpoint that shows all projects of the user (owner as well as maintainer)

    Sample json response (shortened)

    {
       "data":[
          ...    
          {
             "project_id":4986,
             "name":"Video DownloadHelper",
             "slug":"3910-video-downloadhelper",
             "release_date":null,
             "created":{
                "date":"2016-01-29 22:28:06.000000",
                "timezone_type":3,
                "timezone":"UTC"
             },
             "updated":{
                "date":"2016-03-16 12:01:21.000000",
                "timezone_type":3,
                "timezone":"UTC"
             }
          }
          ...
       ]
    }
    
  • api/projects/{id}
    Endpoint that shows detailed info about a project, the maintainers, the locales with status, translators and so on.

    Sample json response (shortened)

    {
       "project":{
          "name":"Video DownloadHelper",
          "id":4986,
          "version":"5.5.0bz3",
          "created_at":"2016-01-29 22:28:06",
          "updated_at":"2016-03-16 12:01:21",
          "source_locale":{
             "name":"American English (United States)",
             "code":"en-US"
          },
          "num_of_files":1,
          "num_of_strings":538,
          "num_of_subs":0,
          "translated_in_percent":43.09,
          "maintainers":[
             {
                "name":"mig",
                "id":3910
             },
             {
                "name":"Fenian",
                "id":1
             }
          ],
          "locales":[
             {
                "name":"Arabic",
                "code":"ar",
                "open":0,
                "active":1,
                "status":"",
                "num_of_translated_strings":0,
                "num_of_translated_subs":0,
                "translated_in_percent":0,
                "translators":[
                   {
                      "name":"xx1429xx",
                      "id":13165,
                      "credits_to":""
                   },
                   {
                      "name":"GroupTT.com",
                      "id":15469,
                      "credits_to":"TT International Group (www.GroupTT.com)"
                   },
                   {
                      "name":"w.grouptt.com",
                      "id":15586,
                      "credits_to":""
                   },
                   {
                      "name":"ibraheem_alex",
                      "id":17989,
                      "credits_to":"Ibrahim Saed [ibraheem5000@gmail.com]"
                   }
                ],
                "created_at":"2016-01-29 22:28:06",
                "updated_at":"2016-03-16 12:01:21"
             },
             {
                "name":"Bulgarian",
                "code":"bg",
                "open":0,
                "active":1,
                "status":"",
                "num_of_translated_strings":524,
                "num_of_translated_subs":0,
                "translated_in_percent":97.4,
                "translators":[
                   {
                      "name":"Jeka",
                      "id":20111,
                      "credits_to":""
                   },
                   {
                      "name":"Kiril Yordanov Kirilov",
                      "id":20256,
                      "credits_to":""
                   }
                ],
                "created_at":"2016-01-29 22:28:06",
                "updated_at":"2016-03-16 12:01:21"
             },
             ... 
             {
                "name":"Chinese (Taiwan)",
                "code":"zh-TW",
                "open":0,
                "active":1,
                "status":"",
                "num_of_translated_strings":538,
                "num_of_translated_subs":0,
                "translated_in_percent":100,
                "translators":[
                   {
                      "name":"babeldown",
                      "id":15049,
                      "credits_to":"James (Silencer)"
                   },
                   {
                      "name":"2424724",
                      "id":20182,
                      "credits_to":""
                   },
                   {
                      "name":"FrankW",
                      "id":20199,
                      "credits_to":"Frank Wang"
                   }
                ],
                "created_at":"2016-01-29 22:28:06",
                "updated_at":"2016-03-16 12:01:21"
             }
          ]
       }
    }
    

What I’m thinking about:

  • Endpoints to update/create/delete/download files
  • Endpoints to list/get/create/delete/update strings
  • Endpoints to create/delete(?) translations

But I’m not an Add-On developer.
I don’t know what kinds of Endpoints are useful for an Add-On developers or not.
So this is also an appeal for help.
Let me know what you think and what you need.

Thanks

Posted in Tech Room!, WTS (Web Translation System) | Comments Off on Do we need an API?

More info about the WTS code on GitHub

  • Clone the repository: git clone https://github.com/BabelZilla/WTS.git wts/
  • cd wts/
  • run composer update
  • Get a cup of coffee while composer installs the dependencies

Your folder structure should now be similar to the one below:

|-htdocs
|-wts
|—app
|—–classes
|—–cldr_cache
|—–commands
|—–config
|—–controllers
|—–database
|—–lang
|—–models
|—–other
|—–start
|—–storage
|—–tests
|—–views
|—bootstrap
|—public
|—–packages
|—–themes
|——-babelzilla
|——-installer
|—vendor

Things that needs to be done before you start the installer:

Change permissions  of the storage & config folder (webserver needs write access)
Copy the content of the public folder to your webroot (e.g. htdocs, you can change this in bootstrap/path.php)

Create the following folders (webserver needs write access)

|-upload
|—temp
|-uploads
|—projects
|—repos

You can change the paths in config/wts.php

If you prefer another folder structure: Don’t forget to change the paths in index.php

 

Now you’re ready to run the install script:

http://www.yourdomain.com/install

install1install2
install3install4
install5

Enjoy the many built-in bugs 😉

 

Posted in Localization, WTS (Web Translation System) | Comments Off on More info about the WTS code on GitHub

BabelZilla next WTS code is on GitHub

Our next WTS standalone version in progress is yours, fork it on GitHub!

You are welcome to hack on it (javaScript and PHP, mainly) and help improve our translation system for next missions such as supporting webapps translation…

(more to come soon)

Posted in Extensions around the world | Comments Off on BabelZilla next WTS code is on GitHub

Middle-Eastern Translators Needed

The BabelZilla community relies on volunteers to localize Firefox addons into a multitude of languages. (as well as Thunderbird, SeaMonkey, and other Mozilla applications) But, people have lives to live, and there are always new and updated addons in need of locales. At the moment, there are quite a few addons in need of skilled translators to join the team. Anyone can speak up and volunteer to help make more addons available in their own language.

In particular, BabelZilla seems to be lacking any currently active translators for Middle-Eastern languages: Arabic, Hebrew, and Persian (Farsi). This is of particular concern because this means that we don’t have anyone to translate into any right-to-left (RTL) locales.

Programmers tend to forget that while most languages have text progress in a left-to-right (LTR) order, the direction is rather arbitrary. Properly handling RTL locales takes a little bit extra work (not much) and often has a list of quirks that need to be addressed. Under an RTL locale the whole Firefox application is mirrored; everything that was on the right is now on the left, and vice versa. Text flows in the opposite direction, unless there’s LTR text mixed in, at which point it can get complicated sometimes. Parenthesis and other punctuation can get mixed up if not properly handled, so a little extra testing and work is generally required to make sure everything runs smoothly.

If you are bilingual in both English and Arabic, Hebrew, or Persian (Farsi), there are plenty of addons that could use your help. In fact, we’d more than welcome any new translators for any language. Volunteer today!

Posted in Localization, Mozilla | Tagged , , , , | 2 Comments

Testing your translation made much easier

Here on BabelZilla we have always tried to make extensions translation as easy as possible for translators, that is make them focus only on what they are excellent at, which is: translating.
So we have provided online tools to avoid them fumbling in code, extract files, manage an editor with required settings before coming to translation. That is the way we can welcome non-tech contributors from around the world.

But there was still a missing step in the process: testing one’s translation is one compulsory step for any good translator, and what looks trivial for developers was not for translators:

  • download and un-pack the original xpi
  • download and insert one’s locale files in the appropriate directory
  • update the chrome.manifest with the appropriate line
  • re-pack the xpi and install

Now we can provide a quicker and uncomplicated two-step process

  1. Download the already localized xpi including your translations
  2. Install and test the extension in your language

Where to get it

Very simple. Once logged and on your translation page for one extension, click on the dedicated button and you can download the xpi ready for testing with your own language.

localized_addon

(Click to enlarge)

menuitem_localized_extension

What is to be known about it

  • The localized extension gets a new GUID:
    extensionname.localized.languagename.@babelzilla.org
    (e.g. reminderfox.localized.de@babelzilla.org)
    The localized build is identical to the original .xpi, only the localized files, install.rdf (without updateURL) and chrome.manifest are newly created by the WTS.
    It is a build for testing purpose only.
  • Your localized xpi name is unique:
    bz-localized.languagename.date/timestamp.name_of_the_uploaded.xpi
    e.g. the name of the localized .xpi for German would be:
    bz-localized.de.24-10-2013_191532.reminderfox214beta_20131019_1316.xpi
  • Missing strings are replaced by en-US strings.
    It means you can test your WIP, fix typos and draft translations, test again and iterate until you or your reviewer (recommended) is OK for pushing the status to released.
  • It should work for most extensions except for some very old ones.
  • Note that this feature does NOT (yet) work with restartless add-ons!
  • Enjoy, and tell us if any issues when using.

Posted in Extensions around the world, WTS (Web Translation System) | Comments Off on Testing your translation made much easier

Beta.Babelzilla.org welcomes translators

Hello, fellow babelzillians!

The time has come for the new Translation Board, and we’re happy to present you one.

Welcome beta.babelzilla.org. It serves the same goal as the old one – to localize Mozilla extensions, but it is prettier, faster and fancier to use. It is easier to look for a project, easier to see language status and, of course, do actual translating. And after you have done translating, it even allows you to grab the repacked XPI package for immediate testing!

Let’s quickly go through other notable bugfixes over the older system:

  • It does not have issues with DTD import and export, entities stay entities. But if you mean to have real tags in your DTD – so be it, we won’t get in your way.
  • Both .properties and .DTD files are parsed for comments, and those comments are displayed in the online editor. Which is quite pretty, btw.
  • It does not have a limit on the number of translators and coordinators in the team.
  • No locale code duplication. “pl” translators should not clash with “pl-PL” ones.

And besides being fun for translators, it has tons of goodies for project owners!

It allows a project owner to edit pretty much everything himself: assign and resign people, add and remove resources. And also customize his project’s page with a pretty icon up to 64x64px. Speaking of data access, we have kept previous functionality, you can still get ZIPs of all locales, URLs are:

  • http://beta.babelzilla.org/projects/p/PROJECT/download/replaced/
    (missing entities replaced with en-US)
  • http://beta.babelzilla.org/projects/p/PROJECT/download/empty/
    (missing entities set to “”)
  • http://beta.babelzilla.org/projects/p/PROJECT/download/skipped/
    (missing entities not present at all)

On top of that, we’re providing you with command-line access:

First step is to install our client, with

pip install git+https://github.com/tymofij/transifex-client.git@adofex#egg=transifex-client

then you would have access to the tx command utility. Let’s use it to grab our project

tx init --host=http://beta.babelzilla.org

(you will be prompted for username and password, but only once. They will go to ~/.transifexrc)

Then let’s initialize our project structure:

tx set --auto-remote http://beta.babelzilla.org/projects/p/PROJECT/ --file-filter="/%(name)s"

file-filter is customizable, you can have it “locale//%(name)s” or something of course.

And here the fun begins! We can pull source files with

tx pull -s

all translation with

tx pull -a

or just one with

tx pull -l LANG_CODE

While pulling you can specify

--mode=skipped

(empty, replaced – default) to your liking.
After you have done some editing, you can send changes to the server.
Source:

tx push -s

Translations:

tx push -t

One translation:

tx push -t -l LANG_CODE

So, if you have modified your source file, you do not need to come to the site and upload a new ZIP or XPI – you can do it with one “tx push -s”. And, if you have added/removed entities, “tx pull -a” will update your translation files accordingly. Though, occasionally, you might want to upload an XPI with just English or with stripped strings to the server — to let translators have proper repacks.

Migration status

We currently hand-migrated some popular addons there (Greasemonkey, Firebug, DownloadHelper), and will proceed with migrating the rest automatically soon, after having your feedback. If you are an addon developer eager to try things out – ping us, we will migrate you too.

All the teams and user accounts were migrated as well, so, please, if you had a Babelzilla account before, do not register, just reset your password and get instant access to the projects and teams you had before.

Have fun translating!

Open-Source

Unlike the previous Translation board, the new Babelzilla relies on the opensource core of the Transifex system and Django technology, so you’re welcome to submit patches and suggestions on GitHub. You can drop bugs and requests. Detailed instructions and (client) usage examples are also available there. You can help make the system better!

Thanks

I would like to thank Zbigniew Braniecki for his help and Silme library. Wladimir Palant for his patches and input. I am sorry that my past irresponsibleness led him to pick another system. Axel Grube helped a lot with beta-testing and Goofy was always an inspiration 🙂

Posted in Extensions around the world, Localization, Mozilla | 12 Comments

Checking accesskeys with Transvision on ver. 1.7

As a localizer you know that choosing/testing/checking accesskeys is both necessary (see why in this simple tutorial for accesskeys) and some kind of nightmare.
To ease part of the problem, here is now an interesting new feature in Transvision that can help l10n teams to check their work.
First go to your now familiar Transvision and click on the link on bottom of the page.

You play a bit with dropdown menus selecting your lang and channel, then bang your wrong accesskeys (if any) are displayed

ak checking for Polish
In this example you can see on last line that there is no “o” character in string “WyÅ›lij dźwiÄ™k…” so the shortcut is broken.
As usual, learn more on Pascal’s changelog and let us know any feedback or request on Transvision.

Posted in Extensions around the world, Localization | Tagged , , | Comments Off on Checking accesskeys with Transvision on ver. 1.7

Addons metrics over the world

If you are interested in Addons, you will surely praise Kálmán Kéménczy for the nice work he has done localizing metrics for addons as can be seen on this Hungarian community page.
A first set of 20 languages has already been released and is available for communication and marketing purpose. Here is a taste of the Fula version:Fullah version for addons metrics
…but if ever you would like your language to join, just hop on this online doc and fill your column!

Thanks Kálmán, Reps and localizers community who contributed!

Posted in AMO, Extensions around the world | Comments Off on Addons metrics over the world

Transvision comparison feature makes l10n QA easier

Transvision is now on 1.6 version owing to the great work of Pascal Chevrel. Among various useful and interesting new features and fixes you can browse in the changelog, there is a smart comparison tool that can ease QA work for Mozilla localization teams. Now our localizer heroes have to manage three branches (Nightly-Aurora-Beta) and it is quite a job to maintain all in tune. So they may need to keep an eye on what should be pushed onto the next branch without forgetting any bit.
The idea is to offer a side-by-side display of two release channels and view what the differences are.
Of course first thing is to pick one’s language and choose two channels among central/aurora/beta/release with the little dropdown menus.
Then bang! here we have useful dump.

As you can see on this screenshot you can spot:

  • Minor typos fixed on one channel but not on the other one
  • Original (English) string pushed on a locale channel
  • Missing translations on one channel

Also you may notice the ellipsis char … is duly detected and highlighted in grey. This is just one more little feature that can help you finetune your localization.
Discover and enjoy everything Transvision has to offer, share your experience and wishlist, hack Transvision on github!

Posted in Localization, Mozilla | Tagged , , , | Comments Off on Transvision comparison feature makes l10n QA easier

Mozillian Localizers: Enjoy Transvision 1.2

If you are indulging in localization for Mozilla, you can’t ignore Transvision glossary. We have already introduced it here and there when it was just surfacing courtesy of our friend Philippe Dessante, long-time Mozilla volunteer contributor.
Here are very good news! Development has now been taken over by Pascal Chevrel, well-known Web localization lead as Mozilla employee, who devotes his free time on Mozilla volunteer community he comes from and still feels he is part of. Thanks Pascal!
We are glad you can enjoy a 1.2 version with lots of code and usability improvements that make Transvision a more efficient tool for translation and proofreading.
Complete changelog is yours but the best thing to do is to test and enjoy it.
* Change your bookmark for this new URL:
http://transvision.mozfr.org/
(note that your search language is automatically matching your browser useragent language)
* Fork your own Transvision and contribute to development on github:
https://github.com/mozfr/transvision

More fixes and changes are cooking, stay tuned.

Posted in Extensions around the world | Comments Off on Mozillian Localizers: Enjoy Transvision 1.2