Skip to content

florianldt/jerome

Repository files navigation

Jerome

Build Status NPM Version NPM Downloads Install Size

Auto-localization for iOS.

Read the Caveats section to learn about the currently supported translations.

Installation

npm install -g @florianldt/jerome

or can be executed directly using npx:

npx @florianldt/jerome --help

Jerome uses Papago to manage translations. To use Jerome, you should first create a new application on the Naver Developer Portal: https://developers.naver.com/products/papago/nmt/nmt.md

Jerome uses cosmiconfig to manage its configuration file.

Create the configuration file where the package is located. if you use npm install -g @florianldt/jerome, that should be under ~.

ex: ~/.jeromerc.json

{
    "X_NAVER_CLIENT_ID": "<Your app Client ID>",
    "X_NAVER_CLIENT_SECRET": "<Your app Client Secret>"
}

Usage

Usage: jerome [options]

Auto localization for iOS.

Options:
  -v, --version         output the version number
  -i, --input <path>    the base .strings file to translate
  -s, --source <local>  the local of the base .strings file (choices: "ko", "en", "zh-CN", "zh-TW", "es", "fr", "vi", "th", "id")
  -t, --target <local>  the local to translate to (choices: "ko", "en", "zh-CN", "zh-TW", "es", "fr", "vi", "th", "id")
  -o, --output <path>   the directory to output the translated file
  -h, --help            display help for command

Example calls:
  $ jerome --input ~/Localizable.strings --source ko --target en
  $ jerome -i ~/Localizable.strings -s ko -t en
  $ jerome --help
  $ jerome --version

Example

Example

Caveats

Papago only provides limited supported languages and the processing limit is 10,000 characters/day.

To improve translation speed, expressions are bundled together by sets of up to 5,000 characters, separated by \n\n. If your localization file already uses \n\n, issues will occur.

TODO

  • Add the option to use either Papago or Google Translate

  • Add the possibility to translate multiple languages at the same time. ex: --source ko --target en,fr

  • Add an optional flag to specify the output location

  • Enable auto-translation for android and more...

Why Jerome?

I have been living abroad for quite some time now. I experienced many local services whose applications are only available in the local language. For visitors and expats, many of those services cannot be used without the help of a native. I am not here talking about the dynamic content of the application (posts, articles, shopping items, ...) but more about the static content like buttons, settings, and more.

Translating an app to one or more languages accurately is a daunting and costly task. My objective with Jerome is for everyone to automatically localize its application instantly and for free to improve their application accessibility for people who cannot speak the local language, using the power of computing translators.

Some people may argue that computing translators are sometimes not accurate and may cause more harm than good. From my experience, computing translators have made huge progress over the years, and an inaccurate translation is still 100x better than looking at a word in a language you don't know, and perhaps even worst, in an unknown alphabet.

Also, for people and organizations localizing their services on their own, using Jerome can greatly improve speed as computing translators are quite accurate most of the time so translations can just be verified and inaccuracy fixed.

And why the name?

Saint Jerome is known to be the first formal translator. He translated the Bible from Hebrew & Greek into Vulgar Latin around 400 A.D. Saint Jerome is considered the patron saint of translators, librarians, and encyclopedists.

Contributions

If you are interested to contribute for the application, do not hesitate.

Any contribution is welcome.

Support

If you are willing to contact me, you can either create an issue here or find me on Twitter (@florianldt).