{"name":"@vscode/l10n","version":"0.0.13","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","sideEffects":false,"browser":{"./dist/main.js":"./dist/browser.js","./src/node/reader":"./src/browser/reader"},"types":"dist/main.d.ts","devDependencies":{"@microsoft/api-extractor":"^7.32.1","@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","http-proxy-agent":"^5.0.0","https-proxy-agent":"^5.0.1","import-fresh":"^3.3.0","mocha":"^10.0.0","mock-fs":"^5.1.4","request-light":"^0.6.0","rimraf":"^3.0.2","ts-node":"^10.9.1","typescript":"^4.7.4"},"scripts":{"clean":"rimraf dist && rimraf lib","compile":"npm run clean && tsc --emitDeclarationOnly --outDir lib && 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"},"homepage":"https://github.com/Microsoft/vscode-l10n#readme","_id":"@vscode/l10n@0.0.13","_integrity":"sha512-A3uY356uOU9nGa+TQIT/i3ziWUgJjVMUrGGXSrtRiTwklyCFjGVWIOHoEIHbJpiyhDkJd9kvIWUOfXK1IkK8XQ==","_resolved":"/mnt/vss/_work/1/l10n/vscode-l10n-0.0.13.tgz","_from":"file:vscode-l10n-0.0.13.tgz","_nodeVersion":"16.19.1","_npmVersion":"8.19.3","dist":{"integrity":"sha512-A3uY356uOU9nGa+TQIT/i3ziWUgJjVMUrGGXSrtRiTwklyCFjGVWIOHoEIHbJpiyhDkJd9kvIWUOfXK1IkK8XQ==","shasum":"f51ff130b8c98f189476c5f812d214b8efb09590","tarball":"http://registry-npm.ywwl.com/@vscode/l10n/download/@vscode/l10n-0.0.13.tgz","fileCount":6,"unpackedSize":55826,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCAdaPI6gs/25WLehXFFFY8bRx7tnfnYKyyAGTJFDyFGwIhAKJsvpkf3G0B0r8BDlp3gBV8mmsLa3RamzlwRWkzQYCZ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJxrlACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo7rRAAkev9fEIjJ1dDQMq6PiqiADe0sYs+gxTNovEyizueAmm7Y3K5\r\nVqKidCsNZWmeTwHtxTXN/kJH8gTiB7HzGIPJFW/XYuAHfv6uYishfKBsRIyn\r\nZntrmjUiWW9rZ2UlGKt3BsW6XEQdhr5Ym13qUwzLwB52c4lehz/g4bOZkdCk\r\njb/nRo8AxMr1aOI0IZUL017T2ZEXhHDq9MRxiSZ1xg077zFWgF/AofCCqJcy\r\nmRE5Yec8THfVt3WmT7Ab5/GX+A7n/hXTTSiMrf7+N2wIWmbpCYw7qzzTk/0I\r\nZIxP1sM+p7sK8VjBkM/kjNLcpWlH/+Ds+nXhhbhemPXqwP3gRflI9QahWmqT\r\nJUDk/3S15UUALYRFOZ6WitikrLtECpByMcIDdaKl7d3l9Fe89hZtH3UEQvG+\r\npDxrK5jUsOn/EkrIfJjiGF9drmgjscQEDP+0uo9JSFWdeu413KWd8xRr8jo7\r\nykDpRE/Azz4Qs5txAunfR9A8yCo9gT9FwQKivXq7pgYU7zN6niP/WbvjX9yV\r\nrDuBNm5GQYSag4VgW+4kjrlkzopC+f37kkMqzGvhbK18tHv4aIRJY6LIOzHP\r\nK1ZiYBJwA7eWLMD0EsPLvB5pa0JpJ3quxwX4UqB8ALRTVs4Fa/uJosAA9EYk\r\nMo/6DADlmBJs7E20k3N+dv26JWHkJZUylX4=\r\n=8my4\r\n-----END PGP SIGNATURE-----\r\n","size":14518,"noattachment":false,"key":"/@vscode/l10n/-/@vscode/l10n-0.0.13.tgz"},"_npmUser":{"name":"vscode-bot","email":"vscode-bot-npm@microsoft.com"},"directories":{},"maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"joaomoreno.ms","email":"joao.moreno@microsoft.com"},{"name":"sbatten","email":"steven.m.batten@outlook.com"},{"name":"alexandrudima","email":"alexdima@microsoft.com"},{"name":"lszomoru","email":"lszomoru@microsoft.com"},{"name":"kaimaetzel","email":"kamaet@microsoft.com"},{"name":"vscode-bot","email":"vscode-bot-npm@microsoft.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/l10n_0.0.13_1680284389375_0.5020222670682404"},"_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":1680284389587,"_cnpm_publish_time":1680284389587,"dist-tags":{"latest":"0.0.18"}}