All Projects → RL10N → msgtools

RL10N / msgtools

Licence: other
Tools for Developing Diagnostic Messages

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to msgtools

Weblate
Web based localization tool with tight version control integration.
Stars: ✭ 2,719 (+15005.56%)
Mutual labels:  i18n, internationalization, localization, l10n, gettext
Node Gettext
A JavaScript implementation of gettext, a localization framework.
Stars: ✭ 175 (+872.22%)
Mutual labels:  i18n, internationalization, localization, l10n, gettext
stone.js
gettext-like client-side Javascript Internationalization Library
Stars: ✭ 20 (+11.11%)
Mutual labels:  i18n, internationalization, localization, l10n, gettext
Laravel Js Localization
🌐 Convert your Laravel messages and consume them in the front-end!
Stars: ✭ 451 (+2405.56%)
Mutual labels:  i18n, internationalization, localization, l10n
labels
Bolt Labels extension - Translatable labels for Bolt
Stars: ✭ 18 (+0%)
Mutual labels:  i18n, internationalization, localization, l10n
Mojito
An automation platform that enables continuous localization.
Stars: ✭ 256 (+1322.22%)
Mutual labels:  i18n, internationalization, localization, l10n
rosetta
A blazing fast internationalization (i18n) library for Crystal with compile-time key lookup.
Stars: ✭ 23 (+27.78%)
Mutual labels:  i18n, internationalization, localization, l10n
Redux React I18n
An i18n solution for React/Redux and React Native projects
Stars: ✭ 64 (+255.56%)
Mutual labels:  i18n, internationalization, localization, l10n
Fluent Rs
Rust implementation of Project Fluent
Stars: ✭ 503 (+2694.44%)
Mutual labels:  i18n, internationalization, localization, l10n
Serge
Continuous localization platform
Stars: ✭ 212 (+1077.78%)
Mutual labels:  i18n, internationalization, localization, l10n
Pseudo Localization
Dynamic pseudo-localization in the browser and nodejs
Stars: ✭ 109 (+505.56%)
Mutual labels:  i18n, internationalization, localization, l10n
i18n
Package i18n is for app Internationalization and Localization.
Stars: ✭ 79 (+338.89%)
Mutual labels:  i18n, internationalization, localization, l10n
Keys Translations Manager
KTM, a locale management web app built on MERN stack, lets you manage and control locales in one place. It's particularly useful for someone who needs to manage multiple internationalization/localization projects.
Stars: ✭ 81 (+350%)
Mutual labels:  i18n, internationalization, localization, l10n
React Native Globalize
Internationalization (i18n) for React Native
Stars: ✭ 246 (+1266.67%)
Mutual labels:  i18n, internationalization, localization, l10n
Gotext
Go (Golang) GNU gettext utilities package
Stars: ✭ 292 (+1522.22%)
Mutual labels:  i18n, internationalization, l10n, gettext
python-fluent
Python implementation of Project Fluent
Stars: ✭ 142 (+688.89%)
Mutual labels:  i18n, internationalization, localization, l10n
Fluent.js
JavaScript implementation of Project Fluent
Stars: ✭ 622 (+3355.56%)
Mutual labels:  i18n, internationalization, localization, l10n
Angular-Gulp-Boilerplate
Clean but full-featured AngularJS boilerplate using Gulp workflow and best practices
Stars: ✭ 30 (+66.67%)
Mutual labels:  i18n, internationalization, localization, l10n
gettext-extractor
A flexible and powerful Gettext message extractor with support for JavaScript, TypeScript, JSX and HTML.
Stars: ✭ 82 (+355.56%)
Mutual labels:  i18n, l10n, po-files, gettext
Locale2
💪 Try as hard as possible to detect the client's language tag ("locale") in node or the browser. Browserify and Webpack friendly!
Stars: ✭ 65 (+261.11%)
Mutual labels:  i18n, internationalization, localization, l10n

Tools for Developing Diagnostic Messages

RL10N Lion

msgtools implements a number of utilities for developing and maintaining error, warning, and other messages in R packages, including checking for consistency across messages, spell-checking messages, and building message translations into various languages for purposes of localization. The package is designed to enhance devtools.

Building and updating message translation files

msgtools provides a simplified workflow for creating, maintaining, and updating translations of messages in both R and C code that improve upon those available in the tools package. For some context on message localization in R, see "R Administration" and "Translating R Messages, R >=3.0.0"). A list of "translation teams" is available from https://developer.r-project.org/TranslationTeams.html.

R has reasonably sophisticated built-in internationalization (i18n) features. All calls to message(), warning(), stop(), gettext(), ngettext(), and gettextf() are passed through a C-level functionality that translates the contained messages into the user's local language (if the translations are available).

To begin localization (l10n) of messages, a package developer simply needs to (1) write translations for these messages using a standardized file format and (2) install the translations into their package. Localization traditionally requires the manual creation of a .pot ("portable object template") file using the xgettext command line utility and the generation of language-specific .po ("portable object") translation files that specify the translation of each message string into the target language.

The .pot/.po file format is fairly straightforward, simply containing a series of messages and their translations, plus some metadata:

#: lib/error.c:116
msgid "Unknown system error"
msgstr "Error desconegut del sistema"

(The R source contains a number of examples of translations, for example in the base package.)

msgtools negates the need to directly call the command-line utilities or interact with .pot/.po files by relying on R representations of templates and translations (provided by poio). This makes it possible to programmatically create, modify, and install translations, thus eliminating the need to manually open each translation file in a text editor.

A basic msgtools workflow is as follows:

library("msgtools")

# setup package for localization
use_localization()

# create Spanish translation
es <- make_translation("es", translator = "Some Translator <[email protected]")
write_translation(es)

## edit translations manually!

# check translation files for errors
check_translations()

# install translations
install_translations()

At this point, you still have to manually edit the the .po translation files created by make_translation() using either a text editor or the lightweight edit_translation() function. If you change your package code, you need to update the template file and each of the translation files to ensure they contain any new or modified messages. The easiest way to do this is:

sync_translations()

# translate, again!

# re-install
install_translations()

A vignette included in the package provides a fully documented workflow using a simple example package.

Requirements and Installation

CRAN Version Downloads Travis-CI Build Status codecov.io

The development version can be installed directly from GitHub using ghit:

if (!require('ghit')) {
    install.packages('ghit')
    library('ghit')
}
install_github('RL10N/msgtools')

msgtools will eventually be available on CRAN, so that it can be installed using:

install.packages('msgtools')

Note that msgtools also has one system requirement (i.e., software that must be installed separately from R). Specifically, the package requires GNU gettext-tools. Windows binaries can be installed using the install_gettext() function or by downloading binaries directly from http://www.stats.ox.ac.uk/pub/Rtools/goodies/gettext-tools.zip or https://github.com/mlocati/gettext-iconv-windows.

Acknowledgements

The development of msgtools was generously supported by The R Consortium through an award to Richie Cotton and Thomas Leeper.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].