{"repo":"oliviertassinari/i18n-extract","free":true,"listed":false,"github":"https://github.com/oliviertassinari/i18n-extract","clone":"git clone https://github.com/oliviertassinari/i18n-extract.git","description":"Manage localization with static analysis. :mag:","language":"JavaScript","stars":178,"topics":["i18n","localization","translation","es6","static-analysis"],"license":"MIT","category":"dev-tools","readme_excerpt":"i18n-extract Manage localization with static analysis. Installation The problem solved This module analyses code statically for key usages, such as i18n.t('some.key') , in order to: - Report keys that are missing - Report keys that are unused. - Report keys that are highly duplicated. E.g. This module works well in conjunction with: - polyglot.js ( marker: 'polyglot.t', ) - webpack and his localisation plugin: i18n-webpack-plugin ( marker: 'i18n', ) Supported keys - static: - string concatenation: - template string: - dynamic: - comment: API extractFromCode(code, [options]) Parse the code to extract the argument of calls of i18n( key ). - code should be a string. - Return an array containing keys used. Example extractFromFiles(files, [options]) Parse the files to extract the argument of calls of i18n( key ). - files can be either an array of strings or a string. You can also use a glob. - Return an array containing keys used in the source code. Example Options - marker : The name of the internationalized string marker function. Defaults to i18n . - keyLoc : An integer indicating the position of the key in the arguments. Defaults to 0 . Negative numbers, e.g., -1 , indicate a position relative to the end of the argument list. - parser : Enum indicate the parser to use, can be typescript or flow . Defaults to flow . - babelOptions : A Babel configuration object to allow applying custom transformations or plugins before scanning for i18n keys. Defaults to a config with all babyl","default_branch":null,"files":null,"tree":[],"storefront":"/r/oliviertassinari","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/oliviertassinari/i18n-extract/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}