{"name":"@vscode/l10n","version":"0.0.6","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":{"@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","import-fresh":"^3.3.0","mocha":"^10.0.0","mock-fs":"^5.1.4","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.6","_integrity":"sha512-67dICn5IGL5+sD6jpcYxnf18uniZGzmAKtXqHMUMUksP+ALv+87Odtp0v0jEp3qmBPyCis4aU6/c/rkalNgANA==","_resolved":"/mnt/vss/_work/1/l10n/vscode-l10n-0.0.6.tgz","_from":"file:vscode-l10n-0.0.6.tgz","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-67dICn5IGL5+sD6jpcYxnf18uniZGzmAKtXqHMUMUksP+ALv+87Odtp0v0jEp3qmBPyCis4aU6/c/rkalNgANA==","shasum":"a66c63e14e60d5dcbd2069e379e908731ae61bf1","tarball":"http://registry-npm.ywwl.com/@vscode/l10n/download/@vscode/l10n-0.0.6.tgz","fileCount":5,"unpackedSize":7107,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHVcSMh69CBXFOsM3wxpLv1KtFFQKyopxKwPSCP0pbWsAiEA7i8los5v0YC37Bc1ZJOumw5gloQQdyfusOPJC1gyoI0="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYu6JACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqH2Q/5AJx4maxd/q8jeelLQMc5+5mh7902chqrLymeAo/N/YnQ7FpL\r\naS/y5hzgKC7sUWDhoNnPsnMmraF/WOeyre5McdKmi0zhh0+ASp9BzpcISyvk\r\ni+dnZ8ivpBbFQOevdvIFAJTJHdPQDhxm4hqwoD4koQcpI8IQ2L7Z7uMlS075\r\nPByCgxFnzVIPcLKwz5S+mnMu0Z2hCfFXTkom/3LrOIrmEAu8zXypYQgxypZg\r\nL7RjhldUy/7Tyo1as2HGrvpi4moBZ6EqlLdiuHasUJf+SCb6Dvdddf2b/RR0\r\n7EqvHtZVJsz3A8R/qu07PkAkPk16uL4NrJYhL2v2N3v4RtdNykb4y5WwdJWr\r\nxgdE84F+qM2ogHnjQWDlwPD921FrUFvPt4iy1ck+Y6/XOWTxXYfWhQUF35ik\r\n47yvu0nzXgtV9nGCpxktbBK8EcYJZ1Vcy+YJefZNQZs/czXw83UUGw/4EuRt\r\nZ7pr5h1803u6GsbqMh7OY9kdDr/VTSLmS9HQcKwaFUbJUSEhnN0gml1kBKwm\r\naDxvGrd7soegjCuA1ql/9ujdmPtRT+S6rEUm/r3JJKJ6kFDGgMRp9IOaROnE\r\nrrVEn4M8lO5uEr6AD+6LL7TF9ck8v+CgByVDnKAJorqPWvilD+slcie0HOke\r\nIa+kZKdcGyMqArWiQp0ZOmjM9U1/q2E7e5g=\r\n=v3RR\r\n-----END PGP SIGNATURE-----\r\n","size":2795,"noattachment":false,"key":"/@vscode/l10n/-/@vscode/l10n-0.0.6.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.6_1667427977307_0.9673529547731139"},"_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":1667427977448,"_cnpm_publish_time":1667427977448,"dist-tags":{"latest":"0.0.18"}}