Michal Čihař - Blog Archives for Weblate

wlc 0.3

wlc 0.3, a command line utility for Weblate, has been just released. This is probably first release which is worth using so it's probably also worth of bigger announcement.

It is built on API introduced in Weblate 2.6 and still being in development. Several commands from wlc will not work properly if executed against Weblate 2.6, first fully supported version will be 2.7 (current git is okay as well, it is now running on both demo and hosting servers).

How to use it? First you will probably want to store the credentials, so that your requests are authenticated (you can do unauthenticated requests as well, but obviously only read only and on public objects), so lets create ~/.config/weblate:

[weblate]
url = https://hosted.weblate.org/api/

[keys]
https://hosted.weblate.org/api/ = APIKEY

Now you can do basic commands:

$ wlc show weblate/master/cs
...
last_author: Michal Čihař
last_change: 2016-05-13T15:59:25
revision: 62f038bb0bfe360494fb8dee30fd9d34133a8663
share_url: https://hosted.weblate.org/engage/weblate/cs/
total: 1361
total_words: 6144
translate_url: https://hosted.weblate.org/translate/weblate/master/cs/
translated: 1361
translated_percent: 100.0
translated_words: 6144
url: https://hosted.weblate.org/api/translations/weblate/master/cs/
web_url: https://hosted.weblate.org/projects/weblate/master/cs/

You can find more examples in wlc documentation.

Weblate 2.6

Going back to faster release cycle, Weblate 2.6 has been just released. There is improved support for Python 3 or brand new HTTP REST API.

Full list of changes for 2.6:

  • Fixed validation of subprojects with language filter.
  • Improved support for XLIFF files.
  • Fixed machine translation for non English sources.
  • Added REST API.
  • Django 1.10 compatibility.
  • Added categories to whiteboard messages.

If you are upgrading from older version, please follow our upgrading instructions.

You can find more information about Weblate on https://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. You can login there with demo account using demo password or register your own user. Weblate is also being used https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Aptoide, FreedomBox, Weblate itself and many other projects.

Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.

Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.

API for Weblate

The long requested feature for Weblate is here - it now has API which you can use to control it. It's scope is currently limited, but it will expand in future releases. The API is currently available in Git, deployed on both Demo server and Hosted Weblate, our hosted solution. It will be also part of 2.6 release, which should be released by end of April.

Anyway the API now provides basic operations up to translation level - you can not edit individual translations, handle suggestions or other advanced features. However what you can do includes:

  • Manipulating with the underlaying VCS repository (commit, push, pull, reset)
  • Download or upload translation files
  • Get information about translations, components, projects and languages
  • Lock or unlock components for translation

As you can see this really covers the basic operations which were most frequently requested, more will come in future. You can see more detailed the Weblate API documentation.

Weblate 2.5

After almost six months of development Weblate 2.5 has been released. It brings lot of improvements and it's quite hard to point few ones. The most important ones include support for Python 3, reports generators, placeables highlighting, extended keyboard shortcuts, configurable dashboard or group based ACLs.

Full list of changes for 2.5:

  • Fixed automatic translation for project owners.
  • Improved performance of commit and push operations.
  • New management command to add suggestions from command line.
  • Added support for merging comments on file upload.
  • Added support for some GNU extensions to C printf format.
  • Documentation improvements.
  • Added support for generating translator credits.
  • Added support for generating contributor stats.
  • Site wide search can search only in one language.
  • Improve quality checks for Armenian.
  • Support for starting translation components without existing translations.
  • Support for adding new transations in Qt TS.
  • Improved support for translating PHP files.
  • Performance improvements for quality checks.
  • Fixed sitewide search for failing checks.
  • Added option to specify source language.
  • Improved support for XLIFF files.
  • Extended list of options for import_project.
  • Improved targeting for whiteboard messages.
  • Support for automatic translation across projects.
  • Optimized fulltext search index.
  • Added management command for auto translation.
  • Added placeables highlighting.
  • Added keyboard shortcuts for placeables, checks and machine translations.
  • Improved translation locking.
  • Added quality check for AngularJS interpolation.
  • Added extensive group based ACLs.
  • Clarified terminology on strings needing review (formerly fuzzy).
  • Clarified terminology on strings needing action and not translated strings.
  • Support for Python 3.
  • Dropped support for Django 1.7.
  • Dropped dependency on msginit for creating new Gettext po files.
  • Added configurable dashboard views.
  • Improved notifications on parse erorrs.
  • Added option to import components with duplicate name to import_project.
  • Improved support for translating PHP files
  • Added XLIFF export for dictionary.
  • Added XLIFF and Gettext PO export for all translations.
  • Documentation improvements.
  • Added support for configurable automatic group assignments.
  • Improved adding of new translations.

If you are upgrading from older version, please follow our upgrading instructions.

You can find more information about Weblate on https://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. You can login there with demo account using demo password or register your own user. Weblate is also being used https://hosted.weblate.org/ as official translating service for phpMyAdmin, OsmAnd, Aptoide, FreedomBox, Weblate itself and many other projects.

Should you be looking for hosting of translations for your project, I'm happy to host them for you or help with setting it up on your infrastructure.

Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far! The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.

Weblate supports Python 3

During the last days I've completed quite long time challenge - make Weblate compatible with Python 3. It's probably still not in shape you would use it on production server, but it runs fine and the testsuite completes without errors.

As usual, the major obstacle are dependencies. The translate-toolkit doesn't support Python 3 in any released version, so you need latest Git snapshot. Another problematic bit is Mercurial, which will not support Python 3 in near future. But in case you need it, you can still install Python 2 version and use it from Weblate (it uses command line interface).

The porting was mostly dealing with encoding mess - in Python 2 you really didn't have to distinguish between binary and text data, while Python 3 quite enforces that. This turned out to be especially tricky with CSV files where csv module expects text streams in Python 3, while translate-toolkit CSV parser expects binary ones.

All this has one downside as well - the test matrix got bigger again, what makes the testsuite run longer with 5 workers available.

While doing these changes, I've also decided to drop support for Django 1.7, this will allow us to get rid of lot of deprecation warnings in Django 1.9 and prepare codebase for Django 1.10.

New projects on Hosted Weblate

I had some pile of hosting requests in queue since half of January and my recent talk on FOSDEM had some impact on requests for hosting translations as well, so it's about time to process them.

New kids on the block are:

Second round includes:

Unfortunately I had to reject some projects as well mostly due to lack of file format support. This is still the same topic - when translating project, please stick with some standard format. Preferably what is usual on your platform.

If you like this service, you can support it on Bountysource salt or Gratipay. There is also option for hosting translations of commercial products.

Going to FOSDEM

It has become almost tradition for me, so yes, I'm attending FOSDEM 2016. It's probably the best conference in Europe to meet other free software guys and that was always motivation for me to come - to see people I meet on mailing lists for rest of the year.

This time it will be slightly different for me - I will be giving talk there for first time. Originally I wanted to do lightning talk only, but in the end I got persuaded and it's full length talk now. It will be in the Coding for Language Communities devroom and you might guess from the devroom topic that it will be about Weblate.

Time for change

It has been seven years since I've joined SUSE (for second time, but that's different story). As everything has to come to the end, I've decided to make a change in my life and leave safety net of being employed and go for new experience with freelancer life.

This will give me more time to spend on free software projects where I'm involved. Of course I need to earn some money to live, so many decisions about where to spend my time will be backed by money...

First of all I will work on phpMyAdmin, where I was chosen as a contractor (of two for this year). This will be half time job for me and you will see weekly reports in my blog, similar to what Madhura is doing.

Second priority will be Weblate, especially the hosting solution. I believe that this is something what can work quite well in the long term, but the tool needs some development to make it as great as I would like to have it. If you want me to extend hosting for free software projects, you can do it by money :-).

And nobody knows what projects come next. There is some work to be done on Gammu and Wammu, but given that I don't have any recent device to use it, it's sometimes hard to fix the bugs there. Of course this can change if I get some money to work on that.

PS: It's not that SUSE would be bad place to work. It's actually pretty great if you're looking for work with free software. You work there on free software, with great people and you get quite some freedom. As bonus once or twice in a year, there is Hackweek which you can spend on anything. And of course they have lot of open positions :-).

Weblate 2.4

Weblate 2.4 has been released today. It comes with extended support for various file formats, extended hook scripts, better keyboard shortcuts and dozen of bug fixes.

Full list of changes for 2.4:

  • Improved support for PHP files.
  • Ability to add ACL to anonymous user.
  • Improved configurability of import_project command.
  • Added CSV dump of history.
  • Avoid copy/paste errors with whitespace chars.
  • Added support for Bitbucket webhooks.
  • Tigher control on fuzzy strings on translation upload.
  • Several URLs have changed, you might have to update your bookmarks.
  • Hook scripts are executed with VCS root as current directory.
  • Hook scripts are executed with environment variables descriping current component.
  • Add management command to optimize fulltext index.
  • Added support for error reporting to Rollbar.
  • Projects now can have multiple owners.
  • Project owners can manage themselves.
  • Added support for javascript-format used in Gettext PO.
  • Support for adding new translations in XLIFF.
  • Improved file format autodetection.
  • Extended keyboard shortcuts.
  • Improved dictionary matching for several languages.
  • Improved layout of most of pages.
  • Support for adding words to dictionary while translating.
  • Added support for filtering languages to be managed by Weblate.
  • Added support for translating and importing CSV files.
  • Rewritten handling of static files.
  • Direct login/registration links to third party service if that's the only one.
  • Commit pending changes on account removal.
  • Add management command to change site name.
  • Add option to confiugure default committer.
  • Add hook after adding new translation.
  • Add option to specify multiple files to add to commit.

If you are upgrading from older version, please follow our upgrading instructions.

You can find more information about Weblate on http://weblate.org, the code is hosted on Github. If you are curious how it looks, you can try it out on demo server. You can login there with demo account using demo password or register your own user.

Weblate is also being used https://hosted.weblate.org/ as official translating service for phpMyAdmin, Gammu, Weblate itself and other projects.

If you are free software project which would like to use Weblate, I'm happy to help you with set up or even host Weblate for you.

Further development of Weblate would not be possible without people providing donations, thanks to everybody who have helped so far!

PS: The roadmap for next release is just being prepared, you can influence this by expressing support for individual issues either by comments or by providing bounty for them.

Weblate for translating everything

Weblate is not only useful for translating software, it can help in translating any content. Let's look where our users are using it.

Software translation is the most usual use case. This is actually where Weblate was used for first time and still provides great support for that. As an example (and oldest project hosted in Weblate) you can look at phpMyAdmin, where Weblate also helps to keep in sync translation for different maintenance branches. It can also help you in using same terminology in command line utility and graphical one like it is done in Gammu and Wammu translations.

Weblate also supports localization of mobile application. Android support was originally implemented for OsmAnd project, but now they also translate iOS application using Weblate.

Another use case is for translating documentation. You need to have some infrastructure to do, but there are several free software project to help here as well. For phpMyAdmin documentation or documentation for python module Odorik the Sphinx documentation generator is used, which has support for translation of the documentation. I've recently published quick howto for this setup. Another great tool for translating documentation is Publican, it is Docbook based tool and is used for translating The Debian Administrator's Handbook.

Last but not least, you can use Weblate to translate your website. For example website for Weblate itself is translated this way.

Did you miss your use case for Weblate? Please let me know.

PS: I've heard that one Linux distribution will start using Weblate soon.