{"id":19777506,"url":"https://github.com/ilib-js/ilib-loctool-salesforce-metaxml","last_synced_at":"2026-06-17T21:02:49.433Z","repository":{"id":45364388,"uuid":"301557398","full_name":"iLib-js/ilib-loctool-salesforce-metaxml","owner":"iLib-js","description":"Loctool plugin to read Salesforce -meta.xml files and write out translations ","archived":false,"fork":false,"pushed_at":"2023-09-25T14:41:33.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-04-29T22:17:58.634Z","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":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iLib-js.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}},"created_at":"2020-10-05T22:44:35.000Z","updated_at":"2021-12-17T17:58:33.000Z","dependencies_parsed_at":"2023-09-27T18:15:14.430Z","dependency_job_id":null,"html_url":"https://github.com/iLib-js/ilib-loctool-salesforce-metaxml","commit_stats":{"total_commits":42,"total_committers":3,"mean_commits":14.0,"dds":"0.16666666666666663","last_synced_commit":"7586f57a9af30f5c915f84fea0fe1a9f7403011c"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-loctool-salesforce-metaxml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-loctool-salesforce-metaxml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-loctool-salesforce-metaxml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iLib-js%2Filib-loctool-salesforce-metaxml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iLib-js","download_url":"https://codeload.github.com/iLib-js/ilib-loctool-salesforce-metaxml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241107734,"owners_count":19910975,"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":"2024-11-12T05:25:19.680Z","updated_at":"2025-10-18T20:49:16.093Z","avatar_url":"https://github.com/iLib-js.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\u003e :warning: **Deprecation Notice** :warning:\n\u003e This repository has been deprecated. Please use the corresponding package from the [iLib-js monorepo](https://github.com/iLib-js/ilib-mono) instead.\n\n# ilib-loctool-salesforce-metaxml\n\nLoctool plugin to read Salesforce -meta.xml files and write out translations.\n\nThe source file it is looking for is `**/translations/en_US.translation-meta.xml`\nwhich should be generated when you enable translation in the workbench. It writes out\ntranslated files in the same directory with the \"en_US\" replaced with the name of\nthe target locale. The dash in the standard BCP-47 locale name is replaced with an\nunderscore, because that is what Salesforce is expecting to find.\n\nThis plugin will also read other meta xml files in the project to find source strings\nthat may be missing in the translation-meta.xml file. The following meta xml file\ntypes are read:\n\n* app-meta.xml\n* customPermission-meta.xml\n* listView-meta.xml\n* field-meta.xml\n* labels-meta.xml\n* md-meta.xml\n* object-meta.xml\n* permissionset-meta.xml\n* quickAction-meta.xml\n* tab-meta.xml\n\nAll strings gleaned from those files are used to augment the strings found in the\ntranslations-meta.xml file with a source string.\n\n## Configuration\n\nThe plugin will look for the `xml` property within the `settings`\nof your `project.json` file. The following settings are\nused within the json property:\n\n- schemas: a string naming a directory full of JSON schema files, or\n  an array of strings naming some JSON schema files or directories to\n  load. If the XML file\n  does not fit any of the schema (ie. it does not validate according to\n  any one of the schema), then that file will be skipped and not localized.\n  Schemas files are discussed below.\n- resourceFile: a path name template specifying where the translation-meta.xml\n  for this salesforce app lives. Default is:\n  \"force-app/main/default/translations/[localeUnder].translation-meta.xml\"\n- mappings: a mapping between file matchers and an object that gives\n  info used to localize the files that match it. This allows different\n  meta xml files within the project to be processed with different schema.\n  This is mainly for meta xml file types that are not the standard ones\n  mentioned above.\n  The matchers are\n  a [micromatch-style string](https://www.npmjs.com/package/micromatch),\n  similar to the the `includes` and `excludes` section of a\n  `project.json` file. The value of that mapping is an object that\n  can contain the following properties:\n    - schema: schema to use with that matcher. The schema is\n      specified using the `$id` of one of the schemas loaded in the\n      `schemas` property above. The default schema is \"properties-schema\"\n      which is given in the previous section.\n\nExample configuration:\n\n```json\n    \"settings\": {\n        \"metaxml\": {\n            \"schemas\": \"./xml/schemas\",\n            \"resourceFile\": \"force-app/main/foo/translations/[localeUnder].translation-meta.xml\",\n            \"mappings\": {\n                \"**/*.page-meta.xml\": {\n                    \"schema\": \"my-page-meta-schema\"\n                }\n            }\n        }\n    }\n```\n\nIn the above example, any file named `*.page-meta.xml` will be parsed with the\n`my-page-meta-schema` schema found in the `xml/schemas` directory. (See the\ndocumentation of the (ilib-loctool-xml)[https://github.com/iLib-js/ilib-loctool-xml/blob/main/README.md]\nplugin for details on that.) The\nresources from that file will go to augment the source strings of the strings\nfound in the resource file translation meta xml.\n\nThe resource file will be written out to a file named\n`force-app/main/foo/translations/[localeUnder].translation-meta.xml`.\n\n## License\n\nThis plugin is license under Apache2. See the [LICENSE](./LICENSE)\nfile for more details.\n\n## Release Notes\n\n### v1.1.3\n\n- update dependencies\n- convert all unit tests from nodeunit to jest\n\n### v1.1.2\n\n- update dependencies\n\n### v1.1.1\n\n- fixed a bug where the xml schemas are not loaded properly on some versions\n  of nodejs\n- fixed a bug where source strings from various meta xml files cannot be added\n  to a translation source file for the locale en-US\n\n### v1.1.0\n\n- now uses ilib-loctool-xml plugin to parse various meta xml files to look for\n  source strings. These types are parsed automatically and their schema is\n  built-in to this plugin already.\n- added the ability to specify a resource file for output of the translations\n- added the ability to do mappings to read other types of meta xml that\n  are not the standard ones listed above\n- updated dependencies\n\n### v1.0.5\n\n- Fix a bug where the pseudo locales were not initialized properly.\n  This fix gets the right set of locales from the project settings to\n  see if any of them are pseudo locales.\n\n### 1.0.4\n\n- Apparently in Salesforce Portuguese has no default. This fix makes sure that\n  both pt-PT and pt-BR are fully specified with neither of them being the default\n  for \"pt\" by itself\n\n### 1.0.3\n\n- Fixed a problem with nb-NO and es-419 which Salesforce do not support\n    - mapped to \"no\" and \"es-MX\" respectively\n\n### 1.0.2\n\n- add the sflocales.json config file to the package\n\n### 1.0.1\n\n- Fixed a problem in the package.json where it was pointing to the wrong main file name\n- Fixed a problem where it was not handling the resource types properly\n    - previously, it used the \"flavor\" concept to differentiate between types,\n      but a flavor is associated with a whole file, not individual strings\n    - now uses a \"context\" which is associated with individual strings\n\n### 1.0.0\n\n- Initial version\n- Added support for classes, fields, and objects\n- writes out translation meta xml files\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filib-js%2Filib-loctool-salesforce-metaxml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filib-js%2Filib-loctool-salesforce-metaxml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filib-js%2Filib-loctool-salesforce-metaxml/lists"}