{"name":"@vscode/l10n","version":"0.0.3","description":"A helper library to assist in localizing subprocesses spun up by VS Code extensions","author":{"name":"Microsoft Corporation"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/Microsoft/vscode-l10n.git"},"bugs":{"url":"https://github.com/Microsoft/vscode-l10n/issues"},"main":"dist/main.js","types":"dist/main.d.ts","devDependencies":{"@types/mocha":"^9.1.1","@types/mock-fs":"^4.13.1","@types/node":"^18.7.8","@typescript-eslint/eslint-plugin":"^4.28.0","@typescript-eslint/parser":"^4.28.0","esbuild":"^0.15.5","eslint":"^7.29.0","import-fresh":"^3.3.0","mocha":"^10.0.0","mock-fs":"^5.1.4","npm-dts":"^1.3.12","rimraf":"^3.0.2","ts-node":"^10.9.1"},"scripts":{"compile":"rimraf dist && tsc -noEmit && node .esbuild.config.js","lint":"eslint src --ext ts","watch":"node .esbuild.config.js --watch","test":"mocha","prepublishOnly":"npm run lint && npm run compile && npm run test"},"gitHead":"0af2c527aac1684d8ad8f197333fbc477686a8ab","homepage":"https://github.com/Microsoft/vscode-l10n#readme","_id":"@vscode/l10n@0.0.3","_nodeVersion":"16.14.2","_npmVersion":"8.17.0","dist":{"integrity":"sha512-bd87qMfNUXIb/YgxEE3atkwqICYM6w18gCnCU0qeBiiSriuPPohcPwMGJ8TQ4o3FLCUCUxsi6sP4tpBaiyTXnw==","shasum":"1824e7d497d97df5de882dcf256e53ef052f9379","tarball":"http://registry-npm.ywwl.com/@vscode/l10n/download/@vscode/l10n-0.0.3.tgz","fileCount":4,"unpackedSize":3808,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE+oIl+KdOCykYaBtMItxBAAEdVdnqClkZd1Ep3GKtgTAiBEi1lVJVKd6lr8cY3Drt8ZFpJW1Zw9hE4yNmCwSHNOPg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjMj9hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqobxAAoda2da5IVjuc8ZVsUo4cwl2nbjj4V8QwUNskvEoe6oz7BWQQ\r\nsDDNpzuXx89XSPVhl5OAP8xw/j+/cxCwcvi4f7+myj0bCBlsnCmUhxnTCOdI\r\niuFKs6Mg+jG0VDUuwPpEDY5f2sEJLpnzu2qXV0L1iMIYid45PXNPL3LBfTfN\r\nb+rjWIHPgUG9Ir1ISF7o9ERLklL8n80d7eX8ZfhH2JspX8dcXJXOEiWVOGny\r\nRy6xWX5tK8DpGdqdsVvN9+GsvjPPwCzEWgc1MM5+bBU93b5+nWAXuDQeRrpG\r\nYK2BvqiiGnI09HoiQujUlMAFa2BAgBdiOc19isPTorgQeDP2sYYRnjLfo7fl\r\n9Y3Esd8oJ6tYjgGjNzk0LqfNfk1M8IV6mAEa5+eLi2GM8uXeGhWV9ILg86O/\r\nmEXwHBvC8hiDtjeerC8cxmYE1HJdEFO7sdShsMDduMscCS8g+/5PEX9dgXKF\r\n4t4Ty4+IXNuAdp8Tc2BOl3Kpk+rmLi8/z14ZR2HUAIQj7b8YE1bJnzwNZ+MR\r\nL+JLJHYMAGuPJ4/OqOF8QJJ9Z/ujzuSkMhvlKqkKmBTZqjFVJrvs3VUgsU/l\r\nl6a+Dqmcj7txZ0P0dAr8vzOd2IfnUYBB9/aOyE0wIDOgDrEWGDfbwXQJ0pgw\r\nJ0LSbJkikJQBQUWQxhoAN2r+CxdP7iHBb6A=\r\n=4JOo\r\n-----END PGP SIGNATURE-----\r\n","size":1968,"noattachment":false,"key":"/@vscode/l10n/-/@vscode/l10n-0.0.3.tgz"},"_npmUser":{"name":"tylerl0706","email":"me@tylerleonhardt.com"},"directories":{},"maintainers":[{"name":"lszomoru","email":"lszomoru@microsoft.com"},{"name":"dbaeumer","email":"dirk.baeumer@gmail.com"},{"name":"lramos15","email":"lramos15@gmail.com"},{"name":"sbatten","email":"steven.m.batten@outlook.com"},{"name":"aweinand","email":"aweinand@microsoft.com"},{"name":"hticehurst","email":"hticehurst@microsoft.com"},{"name":"rchiodo","email":"rchiodo@microsoft.com"},{"name":"rebornix","email":"penn.lv@gmail.com"},{"name":"bpasero","email":"benjpas@microsoft.com"},{"name":"raymondzhao","email":"raymondzhao@microsoft.com"},{"name":"mistople","email":"ddossett@microsoft.com"},{"name":"kaimaetzel","email":"kamaet@microsoft.com"},{"name":"connor.peet","email":"connor@peet.io"},{"name":"roblourens","email":"roblourens@gmail.com"},{"name":"chrmarti","email":"chrmarti@microsoft.com"},{"name":"tyriar","email":"tyriar@tyriar.com"},{"name":"jrieken","email":"jrieken@microsoft.com"},{"name":"alexandrudima","email":"alexdima@microsoft.com"},{"name":"tylerl0706","email":"me@tylerleonhardt.com"},{"name":"deepak_robo","email":"hop2deep@gmail.com"},{"name":"aeschli","email":"martinae@microsoft.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/l10n_0.0.3_1664237408886_0.7955116724862352"},"_hasShrinkwrap":false,"readme":"# @vscode/l10n\n\nLibrary used for loading the translations into subprocesses of your extension. These usages also get picked up by [l10n-dev](https://github.com/microsoft/vscode-l10n/tree/main/l10n-dev) string extraction tooling.\n\n> **Note**\n>\n> You should _NOT_ use this library in your extension's main process. The translations are loaded into the main process by VS Code itself.\n\n## Usage\n\n```typescript\nimport * as l10n from '@vscode/l10n';\n\n// Load the translations for the current locale\nl10n.config({\n    contents: JSON.parse(process.env.BUNDLE_FROM_EXTENSION)\n});\n// or\nl10n.config({\n    fsPath: process.env.FSPATH_TO_BUNDLE_FROM_EXTENSION\n});\n// or (warning, this is async)\nawait l10n.config({\n    uri: JSON.parse(process.env.BUNDLE_URI_FROM_EXTENSION)\n});\n\n// returns the translated string or the original string if no translation is available\nl10n.t('Hello World');\n\n// supports arguments just like the vscode API\nl10n.t('Hello {0}', 'John');\n\n// supports comments for translators\nl10n.t({\n    message: 'Hello {0}',\n    args: ['John'],\n    comment: ['This is a comment']\n});\n```\n\nThe input for `l10n.config` pairs nicely with the `bundle` and `uri` properties on the `l10n` namespace that are provided by the [VS Code API](https://code.visualstudio.com/api/references/vscode-api#l10n).\nYou should send the value of one of these properties from your extension to your subprocess that is consuming `@vscode/l10n`.\n","publish_time":1664237409054,"_cnpm_publish_time":1664237409054,"dist-tags":{"latest":"0.0.18"}}