{"id":19294027,"url":"https://github.com/siposdani87/i18nature-cli","last_synced_at":"2026-01-05T03:32:37.972Z","repository":{"id":45658828,"uuid":"419512082","full_name":"siposdani87/i18nature-cli","owner":"siposdani87","description":"This CLI helps to initialize, upload and download your translation files on I18Nature localization cloud. Generate project_api_key to add access to the project via CLI. You can handle multiple translation files in one project.","archived":false,"fork":false,"pushed_at":"2024-07-19T15:26:46.000Z","size":459,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T18:34:32.717Z","etag":null,"topics":["cli","i18n","i18nature","internationalization","l10n","localization","translation"],"latest_commit_sha":null,"homepage":"https://i18nature.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siposdani87.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-20T22:50:17.000Z","updated_at":"2024-07-19T12:51:45.000Z","dependencies_parsed_at":"2024-07-19T17:30:13.719Z","dependency_job_id":"b69ee024-6905-4cf5-9220-49feb1b331db","html_url":"https://github.com/siposdani87/i18nature-cli","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siposdani87%2Fi18nature-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siposdani87%2Fi18nature-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siposdani87%2Fi18nature-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siposdani87%2Fi18nature-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siposdani87","download_url":"https://codeload.github.com/siposdani87/i18nature-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244767894,"owners_count":20507138,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","i18n","i18nature","internationalization","l10n","localization","translation"],"created_at":"2024-11-09T22:36:56.313Z","updated_at":"2026-01-05T03:32:37.967Z","avatar_url":"https://github.com/siposdani87.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# I18Nature-CLI\n\n[![Version](https://img.shields.io/npm/v/i18nature-cli.svg?style=square)](https://www.npmjs.com/package/i18nature-cli)\n[![Download](https://img.shields.io/npm/dt/i18nature-cli.svg?style=square)](https://www.npmjs.com/package/i18nature-cli)\n[![License](https://img.shields.io/npm/l/i18nature-cli.svg?style=square)](./LICENSE)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=siposdani87_i18nature-cli\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=siposdani87_i18nature-cli)\n\nCommand-line tool to initialize, upload and download translation files to I18Nature localization platform ([https://i18nature.com](https://i18nature.com)).\n\n## Usage\n\nThere is a variety of ways to use/install. The quickest way is:\n\n```bash\nnpm install -g i18nature-cli\n\ni18nature --help\n```\n\n### How to install/run using `npm`\n\n#### Using `npm`\n\n```bash\n# Via npm init\nnpm init i18nature-cli --help\n\n# Via npx\nnpx i18nature-cli --help\n\n# Install globally\nnpm install -g i18nature-cli\n\ni18nature --help\n```\n\n## Command line arguments\n\n```bash\nCommand-line tool of I18Nature localization tool.\n\nUsage: i18nature \u003ccmd\u003e [args]\n\nCommands:\n  i18nature init [project_api_key]  Create .i18naturerc.json file.\n  i18nature upload                  Upload translation files.\n  i18nature download                Download translation files.\n\nOptions:\n  -h, --help                   Show help                               [boolean]\n      --version                Show version number                     [boolean]\n  -v, --verbose                Run with verbose logging                [boolean]\n  -y, --yes                    Skip prompts                            [boolean]\n      --debug                  Debug mode                              [boolean]\n      --overwriteTranslations  Overwrite translation files on upload   [boolean]\n\nfor more information, find our website at https://i18nature.com\n```\n\n## Creating a config file for I18Nature project\n\nWhen creating a config file, you may provide or generate a `api_key` of your project from [I18Nature](https://i18nature.com). With CLI, you can initialize `.i18naturerc.json` config file. This file contains your list of your translation files. The translation file has many properties like (`id, name, filename, extension, locales, default_locale, wrapper_key, directory`).\n\n🔴 **IMPORTANT**: You can use `%language` and `%locale` placeholder keys in `filename, wrapper_key, directory` properties.\n\n🔴 **SECURITY**: Add `.i18naturerc.json` to your `.gitignore` file to avoid accidentally committing your API key to version control.\n\n```gitignore\n# .gitignore\n.i18naturerc.json\n```\n\nSupported locales: ['sq-AL', 'ar-DZ', 'ar-BH', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-OM', 'ar-QA', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-AE', 'ar-YE', 'be-BY', 'bn-IN', 'bn-BD', 'bg-BG', 'ca-ES', 'zh-CN', 'zh-HK', 'zh-SG', 'zh-TW', 'hr-HR', 'cs-CZ', 'da-DK', 'nl-BE', 'nl-NL', 'en-AU', 'en-CA', 'en-IN', 'en-IE', 'en-MT', 'en-NZ', 'en-PH', 'en-SG', 'en-ZA', 'en-GB', 'en-US', 'et-EE', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-FR', 'fr-LU', 'fr-CH', 'de-AT', 'de-DE', 'de-LU', 'de-CH', 'el-CY', 'el-GR', 'iw-IL', 'hi-IN', 'hu-HU', 'is-IS', 'in-ID', 'ga-IE', 'it-IT', 'it-CH', 'ja-JP', 'ko-KR', 'lv-LV', 'lt-LT', 'mk-MK', 'ms-MY', 'mt-MT', 'no-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ro-RO', 'ru-RU', 'sr-BA', 'sr-ME', 'sr-CS', 'sr-RS', 'sk-SK', 'sl-SI', 'es-AR', 'es-BO', 'es-CL', 'es-CO', 'es-CR', 'es-DO', 'es-EC', 'es-SV', 'es-GT', 'es-HN', 'es-MX', 'es-NI', 'es-PA', 'es-PY', 'es-PE', 'es-PR', 'es-ES', 'es-US', 'es-UY', 'es-VE', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA', 'vi-VN']\n\n### Translation file properties\n\n| Property         | Type      | Description      |\n| ---------------- | --------- | ---------------- |\n| id **            | String    | unique identifier of translation file from i18nature |\n| name *           | String    | your translation file short description |\n| filename *       | String    | name of the file |\n| extension *      | String    | eg.: json, yml, yaml, toml, arb, po, xml, strings, ini, properties |\n| locales *        | String[]  | list of locales like ['en-GB', 'hu-HU'] |\n| default_locale * | String    | default locale e.g.: 'en-GB' |\n| wrapper_key      | String    | first key in content of translation file e.g.: %language or %locale |\n| directory *      | String    | relative path to translation files |\n\n**not required for first upload, but required for upload and download actions\n\n*required properties\n\n### Locale directory hierarchy\n\n⚠️ **WARNING**: You can use `language` (en) and `locale` (en-GB) placeholder keys in directory, filename as well.\n\nExample project structure in this repository:\n\n```text\n    exammple/\n      i18n/\n        en/\n          common.json\n        hu/\n          common.json\n      locales/\n        base_en-GB.yml\n        base_hu-HU.yml\n      ...\n    .i18naturerc.json\n    ...\n```\n\nExample .i18naturerc.json for example directories\n\n```json\n{\n    \"version\": 1,\n    \"project_api_key\": \"API_KEY\",\n    \"translation_files\": [\n        {\n            \"name\": \"Base\",\n            \"filename\": \"base_%locale\",\n            \"extension\": \"yml\",\n            \"wrapper_key\": \"%language\",\n            \"locales\": [\"en-GB\", \"hu-HU\"],\n            \"default_locale\": \"en-GB\",\n            \"directory\": \"example/locales\"\n        },\n        {\n            \"name\": \"Common\",\n            \"filename\": \"common\",\n            \"extension\": \"json\",\n            \"locales\": [\"en-GB\", \"hu-HU\"],\n            \"default_locale\": \"en-GB\",\n            \"directory\": \"example/i18n/%language/\"\n        }\n    ]\n}\n```\n\nCreate config file will copy the content to your project directory, and modify the `.i18naturerc.json` in the root folder.\n\nSee this [repository](https://github.com/siposdani87/i18nature-cli) for a complete example.\n\n## License\n\n[ISC](./LICENSE)\n\n## Developer\n\n[Dániel Sipos](https://siposdani87.com)\n\n## Sponsors\n\nThis project is generously supported by [TrophyMap](https://trophymap.org), [I18Nature](https://i18nature.com), and several other amazing organizations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiposdani87%2Fi18nature-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiposdani87%2Fi18nature-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiposdani87%2Fi18nature-cli/lists"}