GithubHelp home page GithubHelp logo

bertware / betrains.qml Goto Github PK

View Code? Open in Web Editor NEW

This project forked from irail/betrains.qml

0.0 3.0 0.0 704 KB

BeTrains defines itself as “A handy mobile application for the Belgian train users. It lets you plan your trips very quickly and makes it possible to share messages with other users for a happy travel.”

Home Page: www.betrains.com

License: GNU General Public License v3.0

Prolog 9.14% C++ 27.85% TypeScript 36.58% JavaScript 26.43%

betrains.qml's Introduction

Translations

The application can be easily be translated into other languages. Here's how we handle those translations.

Files and Folders

BeTrains.pro

The main project file takes care of generating .qm files from the source .ts files. It is mostly automated.

BeTrains.qrc

This resource file must be updated whenever a new translation is added. Please note that files must end with .qm, not .ts.

<qresource prefix="/i18n">
    <file alias="BeTrains.en.qm">i18n/BeTrains.en.qm</file>
    <file alias="BeTrains.nl.qm">i18n/BeTrains.nl.qm</file>
</qresource>

i18n/

This directory contains all translations. Filenames must adhere to this format:

BeTrains.xx_YY.ts or BeTrains.xx.ts

Source file

i18n/BeTrains.en.ts is a treated in a special way. It is used as the source for all other translations. Whenever a string in the code is change this file must be updated to reflect those changes. Usually, this can be accomplished by running lupdate, after which the file can get pushed to Transifex (see below).

Syncing with Transifex

We are using http://transifex.net as a frontend for translating the client, use the "transifex client":http://help.transifex.net/features/client/index.html to fetch new translations from transifex.

Pushing new source strings

  1. lupdate -no-obsolete -pro BeTrains.pro -ts i18n/BeTrains.en.ts
  2. Fill in plural forms (use Qt Linquist, or manually edit numerus="yes" entries)
  3. tx push -s

Fetching new translations

  1. tx pull -a
  2. Update BeTrains.qrc
  3. git add new translations from i18n/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.