The WebTranslateIt Blog · Page 11

i18n news and Product Updates about WebTranslateIt · Page 11

Tip: Remove a label in batch

By Edouard on July 29, 2011

Project managers can remove a label applied to several strings in batch. This is useful to quickly remove a label which is no longer relevant.

To remove a label, click on “Filters”, then on the “Labels” button.

Click on a “delete” button to remove a label.

Tip: Quickly invert source and target locale

By Edouard on July 4, 2011

Click on the » symbol on Web Translate It’s translation interface to quickly invert the locales displayed in the translation interface.

Let’s switch from “English to French” to “French to English”:

I can now read the French copy and edit the English text.

New in Web Translate It: Translation validations

By Edouard on July 1, 2011

I just added translation validations checks to Web Translate It.

When translating software, language files often contain what we call “interpolated variables” among the text to translate. In this segment for instance:

%{person_name} could not be found.

%{person_name} is a variable. The text of the variable shouldn’t be translated and exactly match the source text, or it will break the software being translated. However it often happens that translators translate the variable.

By default, Web Translate It now checks whether the variables are matching and prevents the translator from saving a broken string.

If you are really sure of what you are doing, you can bypass this validation check by unticking the box.

Web Translate It currently recognizes the following variables: {variable}, ruby-style %{variable} or {{variable}}, and C-style variables such as %d or %s.

I hope you will find this improvement useful, translation validations was by far the most requested feature on Web Translate It.

Edit 01/08/2011: I released an improvement to this feature.

Downtime post-mortem: June 21st

By Edouard on June 21, 2011

At 07:11 AM GMT today Web Translate It wasn’t responding. I was immediately notified, woke up and noticed the server wasn’t reachable by any means.

I immediately reported back on Twitter and contacted our hosting company, DigitalOne in order to know if they were having issues.

The word from the hosting company was that the service disruption was due to a bug one of their core routers and they appeared to be working on it. In the meanwhile, I noticed that services such as Pinboard and Instapaper —which are both partially or fully hosted at the same ISP— were also having network issues.

Since the service wasn’t completely down, but continuously coming on and off-line, I decided against moving the service to the backup server, which is much weaker than the main server.

Around 10:30 AM GMT the service became online again and has been stable throughout the day. We suffered no data loss.

Right now the word is that the FBI raided our hosting company’s datacenter and pulled three racks of servers. Some servers were removed, others (such as Web Translate It’s) were temporarily disconnected.

I am really sorry for any and all problems this has caused. In the coming months I will take actions to make Web Translate It able to fail over more easily in such extraordinary events.

web_translate_it gem v1.8.1.2 released

By Edouard on June 20, 2011

I just released a new version of the web_translate_it gem, the synchronization tool for Web Translate It.

This release fixes 2 bugs happening when running wti under Microsoft Windows.

Here’s the changelog:

  • Bug fix: Disable colors when running under MS Windows. #58

  • Bug fix: Don’t verify SSL certificate when running under MS Windows. #57

Install or Upgrade

To install web_translate_it, please refer to the gem documentation.

To upgrade web_translate_it to its latest version, type in a terminal: gem install web_translate_it.

File encoding detection improvements

By Edouard on June 10, 2011

Today I released an update to Web Translate It to improve the file encoding detection.

Internally, Web Translate It use UTF-8, but we have to accept files of any file encoding. This is needed because while most files are UTF-8 encoded, Java .properties files are ISO 8859-1 encoded, while Apple .strings are sometimes UTF-16LE encoded. We also support uploading text files which can have any encoding.

Under the hood, Web Translate It detects your file’s encoding, saves it to database and converts your strings to UTF-8 before importing them to database. When you’ll download your translated file, Web Translate It will convert your strings back to your file original encoding.

In some rare cases, file imports were failing or strings were imported wrongly because Web Translate It wasn’t able to recognise your file encoding.

To remediate this issue, I improved the file encoding detection strategy. Here’s what Web Translate It does now:

  1. If your file contains a BOM, we’re sure that your file is encoded in UTF-8, UTF-16LE, UTF-16BE, UTF-32, etc.

  2. If your file doesn’t contain a BOM, it means that either your file is encoded in something else that UTF-something, but it could also mean it is a UTF-8 file without a BOM. So we scrub the content of your file and look for a hint. For instance, if your Gettext .po file contains in its header "Content-Type: text/plain; charset=UTF-8\n", then we assume your file is UTF-8 encoded.

  3. If we can’t find any indication of the encoding of your file, a character detection algorithm is used (we use rchardet). rchardet takes a sequence of bytes from your file (of unknown encoding), and attempts to determine the encoding so you we can read the text and import it to database.

  4. Finally, there is so much we can do. If rchardet couldn’t reliably detect your file encoding, then our fallback strategy is to assume you’re using UTF-8.

Detecting character encodings is tricky. If you’re having a character encoding problems when uploading a file to Web Translate It, please don’t hesitate to open a support ticket and we’ll work with you to correctly import your file.

Now testing: support for Microsoft Word .docx and Powerpoint .pptx

By Edouard on June 8, 2011

Web Translate It works pretty well to translate software language files. Could it translate documents too?

Web Translate It now supports for 2 new file formats: Microsoft Word .docx and Powerpoint .pptx. Note that we currently don’t support the older Microsoft Word .doc and Powerpoint .ppt.

The biggest challenge for supporting these files is to minimise the amount of Open XML’s infamous “tag soup”. Web Translate It does a pretty good job at keeping this markup code out of your way.

For instance, here’s what a .docx file might look like in a word processor:

The underlying code generated by Microsoft Word looks like this:

And this is the same paragraph imported in Web Translate It:

Web Translate It removes unnecessary markup tags and “folds” complex and untranslatable markup tags into smaller tags.

We’re currently testing these new file formats. If you notice anything strange when translating these files, please open a support ticket and I will investigate and sort you out.

Web Translate It now supports more than 20 different file formats. If you’d like to use a file format Web Translate It doesn’t support yet, open a support ticket and let me know.

web_translate_it gem v1.8.1.0 released

By Edouard on June 8, 2011

I just released a new version of the web_translate_it gem. Get it while it’s hot!

Here’s the changelog:

  • Bug fix: translation.yml file wasn’t created on new projects.
  • New: Gracefully quit on interrupt.
  • New command: wti match. Displays files matching with the File Manager.
  • Improved help commands.
  • Upgrade multipart-post dependency.
  • Replace rainbow dependency by ansi, which can also format columns.

Display of commands such as wti pull or wti push are now organized better.

The new command wti match allows you to see how the files are matched between your local computer and the File Manager.

Install or Upgrade

To install web_translate_it, please refer to the gem documentation.

To upgrade web_translate_it to its latest version, type in a terminal: gem install web_translate_it.

Improvements to the translation interface’s pagination

By Edouard on June 6, 2011

Pagination is essential for web applications to provide faster page load times when displaying large data sets. However, classic pagination (using “previous page” - “next page” links) is a poor solution to remediate this technical limitation: it requires the user to click a button to request the next page, and then wait until the page loads. It feels awkward, especially when it makes the user wait for the page to load to pursue her work.

To palliate this inconvenience, Web Translate It’s translation interface use “infinite scrolling”. It is a pagination technique to serve users the next pages without needing to click on a pagination link: the more you scroll down, the more content magically streams in at the bottom of the page.

This is the best kind of pagination: it allows translators to focus on translating instead of focusing on manipulating a translation tool.

Despite this obvious advantage, this technique also has one major inconvenience: it is impossible to restore a position in the list, since the user doesn’t know where she is in the list. This makes sharing a link in the translation interface with a collaborator pretty difficult.

Endless scroll with stateful position

Thankfully technology improve and modern web browser such as Google Chrome, Firefox 4 or Safari 5 have implemented the new HTML5 history API, which allows websites to update the current URL without reloading a page. The translation interface now use this technique on available browsers to dynamically update the URL when you select a string in the interface. This way, you can link and refer to a specific position in the list of strings.

Here’s a live example: https://webtranslateit.com/en/projects/406-Web-Translate-It/locales/en..fr/strings?current_id=140420

Scrolling upwards

Since we’re now able to recover any position in the translation interface, I also added the ability to scroll up to load strings positioned upwards.

So wherever you are in the list, you can scroll up and down, just like if the list of strings wasn’t paginated at all.

I hope you will find this improvement useful. Thank you for using Web Translate It.

web_translate_it gem v1.8.0.1 released

By Edouard on June 1, 2011

I just released a new version of the web_translate_it gem, which fixes a SSL certificate verification bug happening on Ubuntu systems.

Install or Upgrade

To install web_translate_it, please refer to the gem documentation.

To upgrade web_translate_it to its latest version, type in a terminal: gem install web_translate_it.

Web Translate It’s backup strategy

By Edouard on May 31, 2011

Web Translate It hosts your data both on database and file system. We’ve almost 2,000 users, and host over 3.8 million translations, a bit more than 50,000 files and over 350,000 labels. We’re a small website hosting a lot of data to say the least.

Data loss is the worst thing that could happen to our service. It should be hard to lose data and easy to recover it.

Here’s a quick overview of what we currently do to backup your data.

Live streaming replication

First of all, we have a live database replication set up between our production server and a back-end server. The second a string is saved on the main server, it is copied over on another server. The servers are hosted on different datacenters and use different networks: the former is based in the United States while the latter is hosted in the United Kingdom.

Should the main server fail or be unreachable, we can start over the service on a new server in a matter of minutes.

Database images

Secondly, we create images (or dumps) of the production database 4 times a day, and we store backups at multiple locations: on the production server, on the backup server and on Amazon S3. We keep 12 backups on our servers and 6 backups on Amazon S3.

Additionally, every working day I download the latest database image and test re-importing it on my computer to make sure these images are actually working.

Snapshots are great to recover from a disaster, but there’s a maximum potential data loss of 6 hours.

New: Language files backup and versioning

Finally, and this is new as of this week: we backup your language files to a git repository every 5 minutes. This repository is pulled every 5 minutes by 2 different servers.

These backups don’t include comments, labels, or string statuses, but allows to recover strings and translations of your file from 5 minutes ago, one week ago, one month ago… Should you need a backup of your file, it is possible to recover it, so don’t hesitate to open a ticket on our support website.

As the service grows, this is important to constantly refine our backup strategy. More and more users rely on Web Translate It, so it is important to be more and more reliable.

In the future I will work on saving the whole project under the XLIFF format. This should include string statuses, comments, tags as well as the translations.

web_translate_it gem v1.8.0.0 released

By Edouard on May 31, 2011

I just released a new version of the web_translate_it gem, which includes important performance improvements and a few minor bugs fixes.

Downloading and uploading your language files is noticeably faster with this version (especially if you have a lot of files to sync).

Here’s the changelog:

  • New: Faster file transfers using KeepAlive’d connection.

  • New: Verify SSL certificate on connection.

  • Fix: More detailed error messages on unconfigured projects. Ticket #56

  • Fix: wti init now checks if the configuration file is writable. Ticket #35

  • Remove rake tasks. Rake tasks were removed as it is preferred and more performant to sync your project using the wti executable. Should you want the rake tasks back on your project, see how to add them in your project on the wiki.

Install or Upgrade

To install web_translate_it, please refer to the gem documentation.

To upgrade web_translate_it to its latest version, type in a terminal: gem install web_translate_it.

System update

By Edouard on May 30, 2011

Here’s a quick update regarding Web Translate It’s system.

Last week we successfully upgraded the service to ruby 1.9.2, a newer version of the programming language we use. We were previously using a tuned REE 1.8.7.

This new version greatly improves the service performance and pages load significantly faster.

We’re working on this upgrade since about four months now, and we’re stocked to finally release it.

Tip: Counting words

By Edouard on May 20, 2011

When you get your project translated you’ll need to count words. Web Translate It has nice statistics for your project over time. You can get them on the “Locale and Statistics” page.

Click here to view more

But what if you need to get a word count for a subset of strings? For instance, the word count for a specific file in your project, or for the strings added last week? No problem.

On the translation interface, filter strings by chosen parameters: file, label, category, date added. Then mouse over the string reporting: a tooltip will display the word count for the strings you selected.

Tip: Quickly lookup word definitions

By Edouard on May 19, 2011

Here’s a quick tip: on Web Translate It’s translation interface, you can get a definition very quickly: select any word with the mouse, and hit the D key (a keyboard shortcut for Define).

It will open the dictionary and lookup a definition and translation for you.

Remember, you can view all of Web Translate It’s keyboard shortcuts by clicking on the “keyboard shortcuts available” link on the translation interface.

New in Web Translate It: Dictionary

By Edouard on May 11, 2011

Web Translate It now integrates a dictionary.

It is very easy to use: in the toolbar at the bottom of your browser window, click on “dictionary lookup”.

Type a term to lookup and you will see translations into the language you are translating to, without leaving the current page.

I added dictionaries for Arabic, Chinese, Croatian, English, Finish, French, German, Greek, Hebrew, Italian, Korean, Portuguese, Russian, Serbian and Spanish.

You can also view definitions for a term by clicking on “definitions”.

I hope you will find this new feature useful. I am looking forward to hear your questions or feedback on the support site.

New in Web Translate It: Improved text helper

By Edouard on May 9, 2011

I just updated Web Translate It’s text helper, which should be of great help when translating code in software.

The new text helper highlights variables in red. Variables shouldn’t be changed by translators by all means. Web Translate It currently detects 4 kind of variables: {variable}, ruby-style %{variable} or{{variable}}, and C-style variables such as %d or %s.

HTML code is displayed in light grey. This code shouldn’t be translated and be copy/pasted as is. Text to translate within HTML code is now highlighted in green.

I hope this improvement will make it easier to translate your projects.

web_translate_it gem v1.7.3.1 released

By Edouard on May 6, 2011

I just released a new version of the web_translate_it gem, which fixes two minor bugs.

Here’s the changelog:

  • Fix: Broken links on wti server.

  • Fix: Avoid crashes on blank checksums (ticket #53). This bug could happen when the file checksum is not yet calculated by WTI server, typically when doing a wti push then a wti pull too quickly.

  • Update Sinatra to 1.2.6.

Install or Upgrade

To install web_translate_it, please refer to the gem documentation.

To upgrade web_translate_it to its latest version, type in a terminal: gem install web_translate_it.

New in Web Translate It: Support for PHP array files

By Edouard on May 5, 2011

Web Translate It now supports PHP array files. These language files are often used in place of Gettext to localize PHP applications.

The files should look like so:

 <?php
$LANG = array(
    'January' => 'January',
    '_February' => 'February',
    '_March' => 'March',
    '_April' => 'April',
    '_May' => 'May',
    '_June' => 'June',
    '_July' => 'July',
    '_August' => 'August',
    '_September' => 'September',
    '_October' => 'October',
    '_November' => 'November',
    '_December' => 'December',
);?>