Syncing your resource files with the lingohub CLI client

By using lingohub you’re providing your translators with a sophisticated editor for your resource files. Now they have the chance to edit these files presented in a human-readable format.
lingohub will ensure that they cannot break anything by accident and that they know how to encode characters correctly in ISO-8859-1.

Let us assume a very common case: you forgot to upload the latest version of your resource files currently in development (i.e. your translators were translating the old stuff), or you forgot to download the files from lingohub and to push them to your repository.
You released a new version of your software and 17 of your 18 localizations are not fully translated, although the translators finished their work. Now don’t panic, lingohub has got your back.

How lingohub can help you solve this problem

How to import/export the files at the right time as part of your build process? Well, one option is to use our github integration. Every push to your repository will automatically trigger a new resource file import. lingohub will always be synced to your development branch. However, a lot of our users do not use Github. That’s why we provide you with a second option, the “lingohub CLI client”.

lingohub CLI client help


lingohub CLI client help

Prerequisites

Our CLI client is written in Ruby. In order to install it, follow these steps:

  • install Ruby (follow the instructions for your platform)
  • run “gem install lingohub” in your terminal to install our CLI client

Getting started

“lingohub help” will show you all available actions you can now perform with the CLI client. At first you have to give the client your credentials, to determine as which user the client will connect to lingohub. Please do this with “lingohub login”. Now please enter your email and password that you are using to log in to lingohub.com.

You can leave the password blank if you prefer to use the API Token for the connection. It can be found under your authentication settings:


Now you can use every client command on the projects where you have the appropriate permissions.

Pushing files to lingohub

With “lingohub resource:up <file1> <file2> … –locale <iso2_code> –project <name>” you can now import the latest resource files into your lingohub project. The locale parameter is optional and only needed if it is not possible to determine the ISO2 code from the file name.

You can write a shell script for example that imports all your files to lingohub. This script can be run manually, on a timed basis or as commit hook of your SCM, so lingohub will always be up to date with your development branch.

Retrieving files from lingohub

For retrieval, you can use
“resource:down –locale <iso2_code> –all –directory <path> –project <name>”
to download the newest files from lingohub.

We do this on a daily basis, just to feel great about knowing that our translators already translated phrases that we’ve pushed to development just the day before.

What else can you do with the lingohub CLI client?

  • list your projects
  • create a new project
  • rename a project
  • manage your collaborators
  • manage invitations

I hope you liked the introduction to our CLI client and will find it useful to integrate our application in your build process. If you have some more ideas on how we could improve the client or if you have questions, please feel free to contact us or leave a comment.

BaRuCo – Barcelona Ruby Conference


Last weekend I had the great chance to be part of BaRuco. A Ruby conference in sunny Barcelona. Believe it or not, it was my first time visiting this great city.

BaRuCo, organized by :codegram, was a fine Ruby conference with a bunch of great talks. The agenda was quite dense. 8 talks per day. Maybe a bit too dense but I will talk about that later.

Cosmo Caixa

First of all I really want to thank the organizers for choosing the venue: Cosmo Caixa, a technology museum, is a great place to stay for two days. Actually it is a kind of museum I have never seen before. Cosmo Caixa exhibition is quite unstructured with no real topic and it is a good thing. If you visit Barcelona you have to visit this place!

Talks

There are some talks I like to mention:

PROGRAMMING WORKOUT, BY MICHAŁ TASZYCKI

Michal talked about the passion to continuous learning. How you keep your fire burning to improve yourself and stay focused. Plus some tricks to set your goals wisely.

TRACING YOUR WAY THROUGH RUBY, BY ELISE HUARD

A great talk about using dtrace and how to probe your Ruby application if anything else does not give you that granular level of insight. Aaron Patterson already added dtrace probes to MRI, but we have to wait for Ruby 2.0.

RUBYMOTION FOR FASTER CLIENT/SERVER DEVELOPMENT, BY RANDALL THOMAS & TAMMER SALEH

The two guys of Thunderbolt Labs gave a good insight to using RubyMotion in client projects. RubyMotion promises to develop iOS application in Ruby. The presentation included information how RubyMotion development differs from your known Ruby development (eg. you cannot use require and gems).

IT’S NOT HOW GOOD YOUR APP IS, IT’S HOW GOOD YOU WANT IT TO BE, BY JOSH KALDERIMIS

If you have never seen Josh on stage – go for it!
This talk explained how the guys of Travis CI use several techniques to monitor what’s going on in their application. Ranging from using ActiveSupport Notifications to add custom log entries. Papertrail to aggregate and browse their logs. Josh told me that his talk will be online soon.

Seen crititical

As I mentioned the schedule was quite dense, hence most of the time was spent sitting in the Auditorium. But besides listening to great talks, most of us who attend at a conference want to use some time to meet other developers. Chat about what you do and how you enjoy it. There was no real chance to skip a talk in advance to prolong a nice chat you just started during the short coffee break. The space outside of the auditorium was shut off for the “real” guests of the museum, so everyone automatically moved in again.

See you there next year!

 

 

The Importance of an API

I have worked on many software projects over the last couple of years. One aspect that became more and more important is an API (Application Programming Interface). A decade ago an API was just classes/interfaces that a developer could use to interact with a library/framework, mostly in the same language. As systems became more and more complex and diverse, SOAP quickly rose as a defacto standard in the Java/.NET community to communicate between systems. However, once again Ruby on Rails showed that things don’t need to be complicated to be useful, and it integrated parts of Roy Fielding’s dissertation of a Restful approach (REST). Since then, REST has become the standard for nearly every Web application. Many standard apps build REST APIs that allow users and developers to integrate with their services. Twitter is a prime example that creates and builds value with such an approach.

We here at linguist strongly believe that creating a vibrant community is a key factor for our success. That is why we offer an API right from the beginning. The API supports many different actions like uploading/downloading resources, creating projects, inviting new collaborators, listing collaborators…You can find a full listing in our API overview. The documentation covers all necessary information about the entry points and shows how to use the API. We planned the API with your needs and requirements in mind, and it’s now up to you to let us know what’s missing and what can be improved. If you have trouble using the API or have ideas or questions, simply create a ticket on our support page.

I’m totally excited about linguist and can’t wait to implement all those awesome features you come up with! Happy translating.

Further readings on good REST APIs: