{"id":44617380,"url":"https://github.com/front/formatjs-utils","last_synced_at":"2026-02-14T13:12:03.891Z","repository":{"id":216811500,"uuid":"741608960","full_name":"front/formatjs-utils","owner":"front","description":"Collection of formatjs helpers for React projects","archived":false,"fork":false,"pushed_at":"2024-01-15T12:48:10.000Z","size":77,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-09-14T14:56:37.193Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/front.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-10T18:41:22.000Z","updated_at":"2025-02-05T23:10:18.000Z","dependencies_parsed_at":"2024-01-13T01:28:07.973Z","dependency_job_id":"7d975bb2-84b1-4fcd-bd9e-5c946f0b27a1","html_url":"https://github.com/front/formatjs-utils","commit_stats":null,"previous_names":["front/formatjs-utils"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/front/formatjs-utils","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/front%2Fformatjs-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/front%2Fformatjs-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/front%2Fformatjs-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/front%2Fformatjs-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/front","download_url":"https://codeload.github.com/front/formatjs-utils/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/front%2Fformatjs-utils/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29444144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T12:43:28.304Z","status":"ssl_error","status_checked_at":"2026-02-14T12:43:14.160Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-02-14T13:12:03.323Z","updated_at":"2026-02-14T13:12:03.885Z","avatar_url":"https://github.com/front.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @frontkom/formatjs-utils\n\n`formatjs-utils` is a versatile package providing a collection of tools designed to augment [FormatJS](https://formatjs.io/) utilities. The primary role of these tools centers on the extraction and compilation of translatable message strings, making this an essential addition to localization and internationalization workflows.\n\n## Installation\n\nUse the package manager [npm](https://www.npmjs.com/) to install @frontkom/formatjs-utils.\n\n```bash\nnpm install @frontkom/formatjs-utils\n```\n\n## Available Scripts\n\nThe package comes with the following scripts:\n\n1. `i18n-extract`: Extracts the translatable strings from your application.\n2. `i18n-compile`: Compiles these extracted strings back into JSON files.\n\nThese scripts can either be included into your `package.json`'s scripts section or can be used with `npm exec` directly.\n\n```bash\nnpm exec i18n-extract\nnpm exec i18n-compile\n```\n\n## Configuration\n\nThis package requires a specific configuration file `i18n.config.js` to be created in your project's root directory. This is to customize the utility to your project's specific needs. All the fields are optional.\n\n### Example `i18n.config.js`\n\n```js\nmodule.exports = {\n  languages: ['en', 'fr'],\n  sourceFiles: 'src/**/*.{ts,tsx,js,jsx}',\n  ignore: '**/*.d.ts',\n  targetFolder: 'src/lang',\n};\n```\n\n## Usage\n\nMake sure to add the scripts to your `package.json` in order to extract and compile the messages:\n\n```bash\n# Extract the messages\nnpm run i18n-extract\n\n# Compile the messages into JSON\nnpm run i18n-compile\n```\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffront%2Fformatjs-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffront%2Fformatjs-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffront%2Fformatjs-utils/lists"}