{"id":14973378,"url":"https://github.com/tsvetomir/xlf-translate","last_synced_at":"2026-02-18T20:12:15.083Z","repository":{"id":16705954,"uuid":"80475212","full_name":"tsvetomir/xlf-translate","owner":"tsvetomir","description":"Populate XLIFF (.XLF) files with existing translations in Angular 2 apps","archived":false,"fork":false,"pushed_at":"2023-10-17T05:32:05.000Z","size":2182,"stargazers_count":5,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T06:40:20.886Z","etag":null,"topics":["angular","angular-2","i18n","language-files","translation","xlf"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/tsvetomir.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-01-30T23:42:25.000Z","updated_at":"2023-08-31T01:40:35.000Z","dependencies_parsed_at":"2024-06-21T15:34:43.580Z","dependency_job_id":"f8555323-c880-41a3-8281-d473c96bf7d4","html_url":"https://github.com/tsvetomir/xlf-translate","commit_stats":{"total_commits":41,"total_committers":5,"mean_commits":8.2,"dds":0.3414634146341463,"last_synced_commit":"3b78eb8cc1ee55b254399147789247c457578e88"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvetomir%2Fxlf-translate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvetomir%2Fxlf-translate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvetomir%2Fxlf-translate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsvetomir%2Fxlf-translate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsvetomir","download_url":"https://codeload.github.com/tsvetomir/xlf-translate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238418210,"owners_count":19468865,"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":["angular","angular-2","i18n","language-files","translation","xlf"],"created_at":"2024-09-24T13:48:38.239Z","updated_at":"2025-10-27T01:30:30.901Z","avatar_url":"https://github.com/tsvetomir.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/xlf-translate.svg)](https://badge.fury.io/js/xlf-translate)\n\n# xlf-translate\n\nPopulates translations in XLIFF (.xlf) message files. Specifically developed for [Angular i18n](https://angular.dev/guide/i18n) - enabled apps, but might work for others as well.\n\n## Description\n\nNormally, you'd localize an attribute using the following syntax:\n\n```html\n\u003cspan i18n=\"A hello world message for the localized component\"\u003eHello!\u003c/span\u003e\n```\n\nThis utility makes use of the optional meaning tag to associate the message with an unique key.\n```html\n\u003cspan i18n=\"localized.component.hello|A hello world message for the localized component\"\u003eHello!\u003c/span\u003e\n```\n\nThe key will be persisted in the messages file as a \"meaning\":\n```xml\n\u003ctrans-unit id=\"cb5fabf68b14f52c0d7cbc2b90393f8897310ba7\" datatype=\"html\"\u003e\n  \u003csource\u003eHello!\u003c/source\u003e\n  \u003ctarget/\u003e\n  \u003cnote priority=\"1\" from=\"description\"\u003eA hello world message for the localized component\u003c/note\u003e\n  \u003cnote priority=\"1\" from=\"meaning\"\u003elocalized.component.hello\u003c/note\u003e\n\u003c/trans-unit\u003e\n```\n\nThis utility will look up the keys in the supplied language file to provide the target translation.\n\n## Language Files\n\nThe language files contain translations corresponding to the keys in the description.\nFor example, the `localized.component.hello` key and its translation are represented as:\n\n```yaml\nlocalized:\n    component:\n        hello: Bonjour!\n```\n\n## Installation\n\n`npm install -g xlf-translate`\n\n## Usage\n\n`xlf-translate --lang-file sample/lang/fr.yml sample/messages.fr.xlf`\n\nThis will populate all empty target elements in the `messages.xlf` file with matching translations. Non-empty target elements will be skipped to avoid overwriting user translations.\n\n\u003e The messages file will be updated in place.\n\nYou can also force overwriting all translations, regardless if empty or not:\n\n`xlf-translate --force --lang-file sample/lang/fr.yml sample/messages.fr.xlf`\n\n## See Also\n\n* [Sample usage in an i18n Angular app](https://github.com/tsvetomir/angular-cli-i18n-sample)\n* [Angular - Internationalization (i18n)](https://angular.dev/guide/i18n)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsvetomir%2Fxlf-translate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsvetomir%2Fxlf-translate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsvetomir%2Fxlf-translate/lists"}