{"id":16548153,"url":"https://github.com/dgraham/eslint-plugin-i18n-text","last_synced_at":"2025-03-21T10:31:54.232Z","repository":{"id":55880140,"uuid":"116442015","full_name":"dgraham/eslint-plugin-i18n-text","owner":"dgraham","description":"Disallow English text in string literals.","archived":false,"fork":false,"pushed_at":"2020-12-09T21:52:54.000Z","size":130,"stargazers_count":9,"open_issues_count":5,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T23:52:59.596Z","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/dgraham.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}},"created_at":"2018-01-06T00:59:23.000Z","updated_at":"2024-07-29T15:48:00.000Z","dependencies_parsed_at":"2022-08-15T08:30:55.164Z","dependency_job_id":null,"html_url":"https://github.com/dgraham/eslint-plugin-i18n-text","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgraham%2Feslint-plugin-i18n-text","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgraham%2Feslint-plugin-i18n-text/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgraham%2Feslint-plugin-i18n-text/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dgraham%2Feslint-plugin-i18n-text/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dgraham","download_url":"https://codeload.github.com/dgraham/eslint-plugin-i18n-text/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244777938,"owners_count":20508817,"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-10-11T19:25:10.343Z","updated_at":"2025-03-21T10:31:53.899Z","avatar_url":"https://github.com/dgraham.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eslint-plugin-i18n-text\n\nDisallow English text in string literals.\n\nEmbedding messages in JavaScript files prevents them from being translated into\nother languages. An alternative is to embed the translated text in the markup\nand find it with JavaScript.\n\n```html\n\u003cdiv class=\"js-message\" data-success-message=\"It works!\"\u003e…\u003c/div\u003e\n```\n\n```js\nconst el = document.querySelector('.js-message')\nel.textContent = el.getAttribute('data-success-message')\n```\n\nThis pattern allows the web framework that's generating the markup to use\nits translation library to insert the appropriate translated text.\n\n## Installation\n\nYou'll first need to install [ESLint](http://eslint.org):\n\n```\n$ npm install eslint --save-dev\n```\n\nNext, install `eslint-plugin-i18n-text`:\n\n```\n$ npm install eslint-plugin-i18n-text --save-dev\n```\n\n**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-i18n-text` globally.\n\n## Usage\n\nAdd `i18n-text` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:\n\n```json\n{\n  \"plugins\": [\n    \"i18n-text\"\n  ],\n  \"rules\": {\n    \"i18n-text/no-en\": 2\n  }\n}\n```\n\n## Development\n\n```\nnpm install\nnpm test\n```\n\n## License\n\nDistributed under the MIT license. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgraham%2Feslint-plugin-i18n-text","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdgraham%2Feslint-plugin-i18n-text","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdgraham%2Feslint-plugin-i18n-text/lists"}