{"id":23749346,"url":"https://github.com/ukhan/yaml-locales-webpack-plugin","last_synced_at":"2026-05-10T03:45:20.711Z","repository":{"id":35087402,"uuid":"204983912","full_name":"ukhan/yaml-locales-webpack-plugin","owner":"ukhan","description":"Webpack plugin that generates Chrome extension i18n message.json files from one YAML file.","archived":false,"fork":false,"pushed_at":"2023-03-14T17:30:39.000Z","size":855,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T05:45:51.905Z","etag":null,"topics":["chrome-extension","i18n","webpack-plugin","yaml"],"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/ukhan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-28T17:11:37.000Z","updated_at":"2021-09-17T14:10:19.000Z","dependencies_parsed_at":"2023-01-15T13:34:32.234Z","dependency_job_id":null,"html_url":"https://github.com/ukhan/yaml-locales-webpack-plugin","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukhan%2Fyaml-locales-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukhan%2Fyaml-locales-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukhan%2Fyaml-locales-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ukhan%2Fyaml-locales-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ukhan","download_url":"https://codeload.github.com/ukhan/yaml-locales-webpack-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239908975,"owners_count":19716891,"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":["chrome-extension","i18n","webpack-plugin","yaml"],"created_at":"2024-12-31T15:18:10.329Z","updated_at":"2026-05-10T03:45:20.678Z","avatar_url":"https://github.com/ukhan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# YAML to Locales plugin for Webpack\n\nPlugin for Webpack, which creates localization files of Google Chrome extension from one YAML file.\n\n## Installation\n\n```bash\n# npm\nnpm install --save-dev yaml-locales-webpack-plugin\n\n# yarn\nyarn add --dev yaml-locales-webpack-plugin\n```\n\n## Usage\n\n**webpack.config.js (simple usage)**\n\n```javascript\nconst YamlLocalesWebpackPlugin = require('yaml-locales-webpack-plugin');\n\nmodule.exports = {\n  plugins: [new YamlLocalesWebpackPlugin()]\n};\n```\n\n**webpack.config.js (with beta build)**\n\n```javascript\nconst YamlLocalesWebpackPlugin = require('yaml-locales-webpack-plugin');\n\nmodule.exports = (env, argv) =\u003e {\n  plugins: [\n    new YamlLocalesWebpackPlugin({\n      messageAdditions: argv.beta\n        ? {\n            extName: ' (beta)',\n            extDescription: {\n              en: ' Beta version.',\n              uk: ' Бета версія.'\n            }\n          }\n        : {}\n    })\n  ];\n};\n```\n\n## Options\n\n```javascript\nnew YamlLocalesWebpackPlugin(options?: object)\n```\n\n| Name                     | Type       | Default                        | Description                                                     |\n| :----------------------- | :--------- | :----------------------------- | :-------------------------------------------------------------- |\n| `yamlFile`               | `string`   | `'./src/i18n-messages.yaml'`   | Path to the YAML file with translations                         |\n| `defaultLanguage`        | `string`   | `'en'`                         | Default language                                                |\n| `onlySupportedLanguages` | `boolean`  | `true`                         | Only [supported][langs] Chrome Web Store languages              |\n| `messageKeys`            | `string[]` | `['message', 'msg', 'm']`      | Keys in the YAML file to describe messages                      |\n| `descriptionKeys`        | `string[]` | `['description', 'desc', 'd']` | Keys in the YAML file for descriptions                          |\n| `messageAdditions`       | `Object`   | `{}`                           | Additions for messages (see example in [Usage](#Usage) section) |\n\n[langs]: https://developer.chrome.com/webstore/i18n#localeTable\n\n## Example of a YAML file\n\n```yaml\nkey_1: Message for key_1 (language-independent)\nkey_2:\n  message: Message for key_2 (language-independent)\n  description: Description for key_2 (language-independent)\nkey_3:\n  m: Message for key_3 (language-independent)\n  d: Description for key_3 (language-independent)\nkey_4:\n  en: Message for key_4 (EN)\n  ru: Сообщение для key_4 (RU)\n  uk: Повідомлення для key_4 (UK)\nkey_5:\n  en:\n    m: Message for key_5 (EN)\n    d: Description for key_5 (EN)\n  uk: Повідомлення для key_5 (UK)\nkey_6:\n  description: Description for key_6 (language-independent)\n  en: Message for key_6 (EN)\n  uk: Повідомлення для key_6 (UK)\nkey_7:\n  message: Message for key_6 (language-independent)\n  en:\n    description: Description for key_6 (EN)\n  uk:\n    description: Опис для key_6 (UK)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fukhan%2Fyaml-locales-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fukhan%2Fyaml-locales-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fukhan%2Fyaml-locales-webpack-plugin/lists"}