{"id":23962973,"url":"https://github.com/alexandretrichot/formatjs-message-extractor","last_synced_at":"2026-05-06T15:38:46.426Z","repository":{"id":65523145,"uuid":"472270469","full_name":"alexandretrichot/formatjs-message-extractor","owner":"alexandretrichot","description":"Extract your messages defined in your React app and auto merge existing translations for defined locales.","archived":false,"fork":false,"pushed_at":"2022-03-21T11:11:40.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-25T00:55:55.195Z","etag":null,"topics":["cli","format","formatjs","i18n","internationalization","intl","locale","localization","react","react-intl","reactjs","translation"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alexandretrichot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-03-21T09:37:26.000Z","updated_at":"2022-06-13T20:26:51.000Z","dependencies_parsed_at":"2023-01-27T05:55:13.994Z","dependency_job_id":null,"html_url":"https://github.com/alexandretrichot/formatjs-message-extractor","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandretrichot%2Fformatjs-message-extractor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandretrichot%2Fformatjs-message-extractor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandretrichot%2Fformatjs-message-extractor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alexandretrichot%2Fformatjs-message-extractor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alexandretrichot","download_url":"https://codeload.github.com/alexandretrichot/formatjs-message-extractor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240483762,"owners_count":19808636,"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","format","formatjs","i18n","internationalization","intl","locale","localization","react","react-intl","reactjs","translation"],"created_at":"2025-01-06T20:58:41.831Z","updated_at":"2026-05-06T15:38:41.398Z","avatar_url":"https://github.com/alexandretrichot.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# formatjs-message-extractor\n\n\u003e Extract your messages defined in your React app and auto merge existing translations for defined locales.\n\n## Install\n\nFirst, add this package as development dependency :\n\n```shell\n$ yarn add -D formatjs-message-extractor\n```\n\nThen, add this following line in `\"scripts\"` in your *package.json* file.\n\n```json\n\"intl\": \"formatjs-message-extractor src/lang -l en,fr\"\n```\n\nThis will create a *src/lang* directory with a json file for each locale specified by the `-l` option.\n\n```\nsrc/lang\n├── en.json\n└── fr.json\n```\n\nLater, when you have added other messages in your code, this same command will add the missing keys in the existing files and will delete the keys of the messages that no longer exist in your code.\n\n## Options\n\nA few options are available :\n\n### `-l, --locales`\n\nThis allows you to choose the languages to be translated.\n\nFor example, the command: \n\n```shell\n$ formatjs-message-extractor src/lang -l en,de,it\n```\nwill create three locales files: *en.json*, *de.json* and *it.json*.\n\n### `-d, --defaultLocale`\n\nThis define the locale used in default messages in your code.\n\nBy default this is set on `en`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandretrichot%2Fformatjs-message-extractor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexandretrichot%2Fformatjs-message-extractor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexandretrichot%2Fformatjs-message-extractor/lists"}