{"id":30792088,"url":"https://github.com/tolgee/tolgee-merge-namespaces","last_synced_at":"2025-09-05T15:37:12.285Z","repository":{"id":307314637,"uuid":"1029112588","full_name":"tolgee/tolgee-merge-namespaces","owner":"tolgee","description":"A tool that merges all exported namespaces into single file.","archived":false,"fork":false,"pushed_at":"2025-07-30T14:42:55.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-30T17:06:52.173Z","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/tolgee.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,"zenodo":null},"funding":{"github":["tolgee"]}},"created_at":"2025-07-30T14:39:36.000Z","updated_at":"2025-07-30T14:43:00.000Z","dependencies_parsed_at":"2025-07-30T17:07:18.014Z","dependency_job_id":"a33c2b74-697b-429c-903a-dd850485895f","html_url":"https://github.com/tolgee/tolgee-merge-namespaces","commit_stats":null,"previous_names":["tolgee/tolgee-merge-namespaces"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/tolgee/tolgee-merge-namespaces","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolgee%2Ftolgee-merge-namespaces","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolgee%2Ftolgee-merge-namespaces/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolgee%2Ftolgee-merge-namespaces/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolgee%2Ftolgee-merge-namespaces/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tolgee","download_url":"https://codeload.github.com/tolgee/tolgee-merge-namespaces/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tolgee%2Ftolgee-merge-namespaces/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273779164,"owners_count":25166736,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-09-05T15:37:07.210Z","updated_at":"2025-09-05T15:37:12.268Z","avatar_url":"https://github.com/tolgee.png","language":"JavaScript","funding_links":["https://github.com/sponsors/tolgee"],"categories":[],"sub_categories":[],"readme":"# tolgee-merge-namespaces\n\nA command-line tool to merge translations across namespaces in Tolgee i18n files.\n\n## Installation\n\nYou can install the package globally:\n\n```bash\nnpm install -g tolgee-merge-namespaces\n```\n\nOr use it directly with npx:\n\n```bash\nnpx tolgee-merge-namespaces\n```\n\n## Usage\n\n```bash\ntolgee-merge-namespaces [options]\n```\n\n### Options\n\n- `--dir, -d \u003cpath\u003e`: Specify the i18n directory (default: \"i18n\")\n- `--help, -h`: Show help message\n- `--version, -v`: Show version information\n\n## What it does\n\nThis tool helps you manage translations in Tolgee projects that use namespaces. It:\n\n1. Finds all language files in the i18n directory and its subdirectories\n2. Merges translations from namespace directories into the root language files\n3. When there are conflicts, it prioritizes translations from the root files\n4. Removes the namespace files after merging\n5. Removes empty namespace directories\n\n## Example\n\nSuppose you have the following structure:\n\n```\ni18n/\n  en.json\n  de.json\n  namespace1/\n    en.json\n    de.json\n  namespace2/\n    en.json\n```\n\nAfter running `tolgee-merge-namespaces`, all translations will be merged into the root files (`i18n/en.json` and `i18n/de.json`), and the namespace directories will be removed.\n\n## Testing locally\n\nTo test the package locally before publishing:\n\n1. Clone the repository\n2. Navigate to the project directory\n3. Run `npm link` to create a global symlink\n4. Now you can use `tolgee-merge-namespaces` command from anywhere\n\nTo unlink after testing:\n\n```bash\nnpm unlink -g tolgee-merge-namespaces\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolgee%2Ftolgee-merge-namespaces","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftolgee%2Ftolgee-merge-namespaces","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftolgee%2Ftolgee-merge-namespaces/lists"}