{"id":28466564,"url":"https://github.com/locize/vue-i18n-translation-parser","last_synced_at":"2025-06-18T17:34:24.056Z","repository":{"id":43434930,"uuid":"139182519","full_name":"locize/vue-i18n-translation-parser","owner":"locize","description":"parses vue-i18n translations to AST","archived":false,"fork":false,"pushed_at":"2024-10-31T06:15:07.000Z","size":545,"stargazers_count":4,"open_issues_count":6,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-13T23:02:15.823Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/locize.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":"2018-06-29T18:24:48.000Z","updated_at":"2024-10-31T06:15:05.000Z","dependencies_parsed_at":"2024-03-17T01:23:29.859Z","dependency_job_id":"91e5394e-38a9-462a-946d-adbc11e717ff","html_url":"https://github.com/locize/vue-i18n-translation-parser","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":0.2666666666666667,"last_synced_commit":"8778b338060f655a4d0e1d7c840760f0b2f884cc"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/locize/vue-i18n-translation-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Fvue-i18n-translation-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Fvue-i18n-translation-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Fvue-i18n-translation-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Fvue-i18n-translation-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/locize","download_url":"https://codeload.github.com/locize/vue-i18n-translation-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/locize%2Fvue-i18n-translation-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260598986,"owners_count":23034426,"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":[],"created_at":"2025-06-07T07:04:44.602Z","updated_at":"2025-06-18T17:34:24.047Z","avatar_url":"https://github.com/locize.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nThis is a module to parse an vue-i18n translation string into an AST and back to a string.\n\n# Getting started\n\nSource can be loaded via [npm](https://www.npmjs.com/package/vue-i18n-translation-parser) or downloaded from this repo.\n\n```\n# npm package\n$ npm install vue-i18n-translation-parser\n```\n\n# Sample\n\n```js\nimport { parse, stringify } from 'vue-i18n-translation-parser';\n\nconst AST = parse('\u003cdiv\u003etest\u003c/div\u003e');\n// will return\n/*\n[\n  {\n    \"type\": \"tag\",\n    \"name\": \"div\",\n    \"voidElement\": false,\n    \"attrs\": {},\n    \"children\": [\n      {\n        \"type\": \"text\",\n        \"content\": \"test\"\n      }\n    ]\n  }\n]\n*/\nstringify(AST); // -\u003e '\u003cdiv\u003etest\u003c/div\u003e'\n\nparse('test {{val}} text {{- encoded}} with {{val, format}} some $t{nesting} help');\n// will return\n/*\n[\n  {\n    \"type\": \"text\",\n    \"content\": \"test \"\n  },\n  {\n    \"type\": \"interpolation\",\n    \"raw\": \"{{val}}\",\n    \"prefix\": \"{{\",\n    \"suffix\": \"}}\",\n    \"content\": \"val\",\n    \"variable\": \"val\"\n  },\n  {\n    \"type\": \"text\",\n    \"content\": \" text \"\n  },\n  {\n    \"type\": \"interpolation_unescaped\",\n    \"raw\": \"{{- encoded}}\",\n    \"prefix\": \"{{-\",\n    \"suffix\": \"}}\",\n    \"content\": \" encoded\",\n    \"variable\": \"encoded\"\n  },\n  {\n    \"type\": \"text\",\n    \"content\": \" with \"\n  },\n  {\n    \"type\": \"interpolation\",\n    \"raw\": \"{{val, format}}\",\n    \"prefix\": \"{{\",\n    \"suffix\": \"}}\",\n    \"content\": \"val, format\",\n    \"variable\": \"val, format\"\n  },\n  {\n    \"type\": \"text\",\n    \"content\": \" some \"\n  },\n  {\n    \"type\": \"nesting\",\n    \"raw\": \"$t{nesting}\",\n    \"prefix\": \"$t{\",\n    \"suffix\": \"}\",\n    \"content\": \"nesting\",\n    \"variable\": \"nesting\"\n  },\n  {\n    \"type\": \"text\",\n    \"content\": \" help\"\n  }\n]\n*/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocize%2Fvue-i18n-translation-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flocize%2Fvue-i18n-translation-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flocize%2Fvue-i18n-translation-parser/lists"}