Git Product home page Git Product logo

openblock-l10n's Introduction

OpenBlock-l10n

Publish Npm Package

Translation of all OpenBlock projects is managed on the Transifex service: https://www.transifex.com/openblockcc/public/

This repository collects translations submitted to the OpenBlock projects on Transifex. Please do not submit PRs. If you would like to contribute translations, please sign up to translate on Transifex.

Using OpenBlock-l10n in development

Installation

npm install --save-dev openblock-l10n

Basic Use

import locales, {localeData, isRtl} from 'openblock-l10n';
import editorMessages from 'openblock-l10n/locales/editor-messages';
  • locales: currently supported locales for the OpenBlock project
  • isRtl: function that returns true if the locale is one that is written right-to-left
  • localeData: locale data for the supported locales, in the format accepted by addLocaleData required by react-intl
  • editorMessages: the actual message strings for all supported locales for a particular resource. editorMessages collects all the strings for the interface, extensions and paint-editor.

Useful Scripts

openblock-l10n provides:

  • build-i18n-src: script that uses babel and plugins to extract all FormattedMessage strings for translation. Combines the message from all the source files into one en.json
  • tx-push-src: script to push the en.json file to Transifex. Requires that the environment variable TX_TOKEN is set with a value that has developer access to the OpenBlock projects on Transifex (i.e. OpenBlock Team only)

Versioning

openblock-l10n uses semantic versioning - breaking changes will increment the major version number, and new features (e.g. a new language) will increment the minor version number. However, the patch number is actually a datetime string. That way it's easy to see how recently the translations were updated.

In general, changes that require a PR (new functionality, new language) should increment the minor version. Pulling new translations from Transifex is automated and will commit to master directly.

Deprecations

We are moving away from using the tx cli, so the .tx/config file will eventually be deprecated.

openblock-l10n's People

Contributors

adroitwhiz avatar alexisgoodfellow avatar benjiwheeler avatar chrisgarrity avatar cwillisf avatar dependabot[bot] avatar greenat92 avatar hyperobject avatar mzgoddard avatar nikhiljha avatar rschamp avatar seotts avatar thisandagain avatar zhengyangliu avatar

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.