{"_id":"@carforyou/i18n","_rev":"8-b22c7b152be3686fca3afa5a2460e6bb","name":"@carforyou/i18n","dist-tags":{"init2":"1.0.1-init2-b5b7ca3256185c52f89fbf5c23b2d963953d6388.1","optional-scope":"1.0.2-optional-scope-3a6c2c455c6228aa9b2aaef93824852cd44c5866.1","talamcol-props-with-children":"1.0.3-talamcol-props-with-children-87435ec0de13c64977169a03ec1f376e50d57fa9.1","latest":"1.0.3"},"versions":{"1.0.0":{"name":"@carforyou/i18n","version":"1.0.0","author":{"name":"CAR FOR YOU"},"license":"MIT","_id":"@carforyou/i18n@1.0.0","maintainers":[{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},{"name":"lkappeler","email":"me@lnk.codes"}],"homepage":"https://github.com/carforyou/i18n-pkg#readme","bugs":{"url":"https://github.com/carforyou/carforyou-i18n-pkg/issues"},"dist":{"shasum":"2df14e25e1e160eef25557dd518d8673823d3f84","tarball":"https://registry.npmjs.org/@carforyou/i18n/-/i18n-1.0.0.tgz","fileCount":29,"integrity":"sha512-WnXeyKVcUHVq2VaeL5STUjXIB+F3knUyeQuYCselOTM6id0RZscFv3C/a4NZjYwNWwvdGcBB9FPrpDUpSqXntQ==","signatures":[{"sig":"MEQCIHOxuJoQwXtMeEF62PcRyNjf4izG4RzYpw285TFE1rCNAiAfHXe6EyzpIfFdDpl3nlivnivm/+1ZPyo7rESyBXhPNQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24510,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC3vtCRA9TVsSAnZWagAAHRIP+waEYeHyNAxDQ5lhMPYj\nndEE1NPwN0XwPNzaybmEceZLNjqHJR+YRBQVgVO5ifBdrItbEEp2J5gJlmOg\nMqdYptwRRx73SY6N5kI9U4apwbxXx5h4fJqQ0VfDzt1qNE9upOnTHthYuMAF\noEsyc3jOEswfBu55OaFhzeR4s1qbJ5K4f6eJZnX4E3MxDEDyAq7R490jaITg\n72hVd3+Xh8ZVbUd8JLEC+keKg1CoMdSZR/kQysxwX6lS7pf29EmhDQLLArHD\nboTAYKcGw5EBhPJ3xVuXHK5qrQxp7ZJpaMdqdObV1Qj/mDV9woJ/GJoE/z24\nROOa6m/eCZajZ4Er3kmauE7EHi2stp0MMuUtBlhvpjztfsmDUgtcdy9spe4X\n9wg63YFcGW5cVszmJ7yVvrfomRaMtNKyMFmefR9A7fz0gZYkrOAvAWkwWXOz\nPToPgf/TFD2eUvxMuqBchTjKPf/zHR7kunx9yRrXSuZMHKBDf12yXnCrovhQ\no5an/GL3xeAqDyXp4v2M45i3Sx9cVxsOmOIiw7WkSrGedrd/mkW7GmKapTai\nhQfJRDrR8qbBwwJYo2Vvniyg6TAVyUibgQRveWxqDkrLMUNJNWkAz1zKlQo5\nxBk9SYIeT090M1NM47ln09kKvPe76sdxtmfDc89R8+CkubX5dJpPjiQhFfvW\nx1va\r\n=K498\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./pkg/cjs/index.js","types":"./pkg/types/index.d.ts","module":"./pkg/esm/index.js","gitHead":"c2ac15d2c007426c9cb90263a95495a025a52c66","scripts":{"lint":"eslint --ext ts,js,tsx,jsx,json .","test":"jest","build":"rimraf pkg && rollup -c && tsc --outDir pkg/types --emitDeclarationOnly --declaration","format":"npm run lint -- --fix","version":"npm run build","typecheck":"tsc --noEmit","test:debug":"node --inspect-brk --inspect=127.0.0.1:9229 ./node_modules/jest/bin/jest.js --runInBand"},"_npmUser":{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},"repository":{"url":"git+https://github.com/carforyou/carforyou-i18n-pkg.git","type":"git"},"_npmVersion":"8.3.2","description":"Shared I18n setup for Next.js applications","directories":{},"sideEffects":false,"_nodeVersion":"16.14.0","dependencies":{"rosetta":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.5.1","rimraf":"3.0.2","rollup":"2.63.0","ts-jest":"27.1.3","typescript":"4.5.5","@types/jest":"27.4.0","@types/node":"16.11.24","@types/react":"17.0.39","semantic-release":"19.0.2","@testing-library/react":"12.1.2","@rollup/plugin-commonjs":"21.0.1","@carforyou/eslint-config":"4.0.10","@rollup/plugin-typescript":"8.3.0","@rollup/plugin-node-resolve":"13.1.3"},"peerDependencies":{"react":">=17.0.0","react-dom":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/i18n_1.0.0_1644919789533_0.7261091239074509","host":"s3://npm-registry-packages"},"deprecated":"Platform was closed down and no longer maintained. Check @smg-automotive/i18n-pkg as replacement"},"1.0.1-init2-b5b7ca3256185c52f89fbf5c23b2d963953d6388.1":{"name":"@carforyou/i18n","version":"1.0.1-init2-b5b7ca3256185c52f89fbf5c23b2d963953d6388.1","author":{"name":"CAR FOR YOU"},"license":"MIT","_id":"@carforyou/i18n@1.0.1-init2-b5b7ca3256185c52f89fbf5c23b2d963953d6388.1","maintainers":[{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},{"name":"lkappeler","email":"me@lnk.codes"}],"homepage":"https://github.com/carforyou/i18n-pkg#readme","bugs":{"url":"https://github.com/carforyou/carforyou-i18n-pkg/issues"},"dist":{"shasum":"d7eccee0dfe655493b45372df95fef77c5117d01","tarball":"https://registry.npmjs.org/@carforyou/i18n/-/i18n-1.0.1-init2-b5b7ca3256185c52f89fbf5c23b2d963953d6388.1.tgz","fileCount":29,"integrity":"sha512-8Mhk+GkX6xCGdCyVzzuhqs2WqGLQyfoUq/Q8+P8OazBAYebsjvHP1I4osZo8HOUKB3apERG3THg2v3vmbwA1XA==","signatures":[{"sig":"MEUCIB2n22T8EHpRLPYmIG25dE0lfpxjqz1BxYpO5EEjFzt5AiEA6GrvGRz39yik9coFw4Dct6R+EbpYU4Wg5J2nzZGfIEM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24956,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC5cDCRA9TVsSAnZWagAAz3sP/1ubcPCgCSAE71X8gCri\nru0k8zoeR9wrs1Z0OL7viZ0Vt6mVBsSBDHMXcvazFjvTXO892W9Irp8HoDod\njHBuKzP6r+2UcGm+TfotUwr9ylmRJSjZD8/+AlHypixK8wfjsWgaXKeprbkN\nZg30nYDYfg3mi6kT0RlIPQzP35weaabQ6muC9X+Feni662zM48mozh70XqsZ\nPTWBiFIC8+iYXGuN+RoEB2S81wveBU5eDHziS8K4dIrrLCuAAOAmfAYK+iBP\nbx4S3jBGmjC015mof2KrAV3uv6bPaffwhJVWGk8OYrjTWsKlIcP1YZ63V+Xw\nXm4keQm42zGsdaiA0ugupy9G1APP5qyU1UDIWE9LhyXz4X7VjIzmTEBF3zh3\nT1j4+B8ePDF7NsrytRUcxau8d7ya7j2+Mx238zPToKbxEs15eTZ1YPQArBei\nIfAbUqrcRrkl6vDc8oaTw6v+/HWuPna794P08bLa1A/kw3xj646QZYkUkYwr\nWOGPJKl0eyBabdS+FIkGbeAg45VSnkBilltid5qDAW9i93OTa/FuyrfJ9A/Z\nujP/OQBURTnciHrnNpbRnu2jdJQ3r/wGVEQHEJH0KiZKiGNtl13s2mpCrTHT\nd6jMwuSJIrGsNhkv5BcZR7wkWUjDjNm4srj66W0ONFkBG+q/r1NuigwRUTcI\n+sdI\r\n=yFlv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./pkg/cjs/index.js","types":"./pkg/types/index.d.ts","module":"./pkg/esm/index.js","readme":"# CAR FOR YOU I18n\n\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nShared I18n setup for Next.js applications\n\n## Usage\n```\nnpm install @carforyou/i18n\n```\n\nNext.js/webpack config:\n```\nif (options.dev) {\n  config.resolve.alias.rosetta = \"rosetta/debug\"\n}\n```\n\nTo mock `useI18n` in tests, add the following to a setup file. This can also be used inline in tests.\n```\njest.mock(\"@carforyou/i18n\", () => {\n  const original = jest.requireActual(\"@carforyou/i18n\")\n  return {\n    ...original,\n    useI18n: jest.fn().mockReturnValue({\n      t: jest.fn((key) => key),\n      language: \"en\"\n    }),\n  }\n})\n```\n\nIn your project (preferrably server-side) pass the traslation files to the `I18nProvider`:\n```\nimport { getDictionary, I18nProvider, useI18n } from \"@carforyou/i18n\"\n\nimport dictIT from \"~/locales/it/app.json\"\nimport dictFR from \"~/locales/fr/app.json\"\nimport dictEN from \"~/locales/en/app.json\"\nimport dictDE from \"~/locales/de/app.json\"\n\nconst dictionaries = {\n  de: dictDE,\n  fr: dictFR,\n  it: dictIT,\n  en: dictEN,\n}\n\nconst onMissingTranslation = (error) => {\n  if (typeof window !== \"undefined\") {\n    import(\"~/lib/sentry\").then((module) => {\n      const Sentry = module.default\n      Sentry.captureException(error)\n    })\n  }\n}\n\nconst lngDict = await getDictionary({\n  language,\n  dictionaries,\n  dictionaryScopes: [\"requiredScope\", \"sharedScope\"],\n})\n\nconst Component = () => {\n  const { t, language } = useI18n()\n\n  return `${t(\"foo.bar\")} ${language}`\n}\n\n<I18nProvider lngDict={lngDict} language={\"en\"} onMissingTranslation={onMissingTranslation}>\n  <Component />\n</I18nProvider>\n```\n\n## Development\n```\nnpm run build\n```\n\nYou can link your local npm package to integrate it with any local project:\n```\ncd carforyou-i18n-pkg\nnpm run build\n\ncd carforyou-listings-web\nnpm link ../carforyou-i18n-pkg\n```\n\n## Release a new version\n\nNew versions are released on the ci using semantic-release as soon as you merge into master. Please\nmake sure your merge commit message adheres to the corresponding conventions.\n\n\n## Circle CI\n\nYou will need to enable the repository in circle CI ui to be able to build it.\n\nFor slack notifications to work you will need to provide the token in circle settings.\n","gitHead":"b5b7ca3256185c52f89fbf5c23b2d963953d6388","scripts":{"lint":"eslint --ext ts,js,tsx,jsx,json .","test":"jest","build":"rimraf pkg && rollup -c && tsc --outDir pkg/types --emitDeclarationOnly --declaration","format":"npm run lint -- --fix","version":"npm run build","typecheck":"tsc --noEmit","test:debug":"node --inspect-brk --inspect=127.0.0.1:9229 ./node_modules/jest/bin/jest.js --runInBand"},"_npmUser":{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},"repository":{"url":"git+https://github.com/carforyou/carforyou-i18n-pkg.git","type":"git"},"_npmVersion":"8.3.2","description":"Shared I18n setup for Next.js applications","directories":{},"sideEffects":false,"_nodeVersion":"16.14.0","dependencies":{"rosetta":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.5.1","rimraf":"3.0.2","rollup":"2.63.0","ts-jest":"27.1.3","typescript":"4.5.5","@types/jest":"27.4.0","@types/node":"16.11.24","@types/react":"17.0.39","semantic-release":"19.0.2","@testing-library/react":"12.1.2","@rollup/plugin-commonjs":"21.0.1","@carforyou/eslint-config":"4.0.10","@rollup/plugin-typescript":"8.3.0","@rollup/plugin-node-resolve":"13.1.3"},"peerDependencies":{"react":">=17.0.0","react-dom":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/i18n_1.0.1-init2-b5b7ca3256185c52f89fbf5c23b2d963953d6388.1_1644926723245_0.5918975921960237","host":"s3://npm-registry-packages"},"deprecated":"Platform was closed down and no longer maintained. Check @smg-automotive/i18n-pkg as replacement"},"1.0.1":{"name":"@carforyou/i18n","version":"1.0.1","author":{"name":"CAR FOR YOU"},"license":"MIT","_id":"@carforyou/i18n@1.0.1","maintainers":[{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},{"name":"lkappeler","email":"me@lnk.codes"}],"homepage":"https://github.com/carforyou/i18n-pkg#readme","bugs":{"url":"https://github.com/carforyou/carforyou-i18n-pkg/issues"},"dist":{"shasum":"530e4e17d806f395beddf7bf48450585e43ab49c","tarball":"https://registry.npmjs.org/@carforyou/i18n/-/i18n-1.0.1.tgz","fileCount":29,"integrity":"sha512-UbTXJxqU9V4UwYxM/8bR3l67QGXHu+Zw8zGD0EFNk68pMc5AywocrzzdCttN9rqkCitamWMBYR7/UtJhJ3nI2g==","signatures":[{"sig":"MEUCIQCzuher7qQ71u53WpouJC+vHvC85hrlbpre9f2KtkjswwIgSPeT5BYj/bDx32t4aTVzkSo2g0DzLJQJw1k6twRP7Tc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24907,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiC700CRA9TVsSAnZWagAAwTYP/jFV/gpd0AnikXzeSPiP\nxRCYFd284qmjudInR4Mannte4iBaBDRpBGedCSXrIuonzISeU8GJJFMs/g/b\nrxD4xcSLQo1VFy2vDYUj25oGFvRbA5DEMfNTa2XlrFwbz6LYq1W+/z2nXqZ+\n5aiIHCL8kifGb4mj6ozMY6hewnR3Md7i/guRIpdvOs50x7Dx+RwycsoYk2yc\nTobCBDsOXIBTJvvPTRHPlmCcl4AeQXx5gdvH9ul3xKfXrRtT/tYGUBmigkrX\njPUxiR13GNpbWYNkkDkILO67+C9B3xD7Nz9wDEvRuhutE+ntDwPxs0KKcL0K\nGAIMKdPe2XvENfm5KjyLwEw0TycZU/U6PqrAEfY97RVITiIF92p+KV5vm1gb\ncYTlNwkYI52k7mWrko1sZPMnvYs53SXMI3/1SZVvLCSNhQloQnhq2uZ+RDUh\n3enrK3ePVHSAUmZGAXSU2UnGIYyJVO/o/GDG1/JZKgWXSbtNrUoGDeWEvBkj\nRxXV07yyum8daHEt+mOpPNQUjd/eS0QFOhvXnHG5mu0svr4ye4WYDZFLmS7g\nn3wTbDZ/7FmVk4ts0m1ZudYuJ4Q62is4Fri1XrBC2x2ir+HrfClct52zKkzX\ntt1U0xf4MiPHgANnFS+MxkWg3exogqx1plMY0wfyl+VBwTLlCZH4PwEkpcRI\n1Eff\r\n=eWL6\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./pkg/cjs/index.js","types":"./pkg/types/index.d.ts","module":"./pkg/esm/index.js","gitHead":"aec21d1854186bda38709318043cae381f3013f6","scripts":{"lint":"eslint --ext ts,js,tsx,jsx,json .","test":"jest","build":"rimraf pkg && rollup -c && tsc --outDir pkg/types --emitDeclarationOnly --declaration","format":"npm run lint -- --fix","version":"npm run build","typecheck":"tsc --noEmit","test:debug":"node --inspect-brk --inspect=127.0.0.1:9229 ./node_modules/jest/bin/jest.js --runInBand"},"_npmUser":{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},"repository":{"url":"git+https://github.com/carforyou/carforyou-i18n-pkg.git","type":"git"},"_npmVersion":"8.3.2","description":"Shared I18n setup for Next.js applications","directories":{},"sideEffects":false,"_nodeVersion":"16.14.0","dependencies":{"rosetta":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.5.1","rimraf":"3.0.2","rollup":"2.63.0","ts-jest":"27.1.3","typescript":"4.5.5","@types/jest":"27.4.0","@types/node":"16.11.24","@types/react":"17.0.39","semantic-release":"19.0.2","@testing-library/react":"12.1.2","@rollup/plugin-commonjs":"21.0.1","@carforyou/eslint-config":"4.0.10","@rollup/plugin-typescript":"8.3.0","@rollup/plugin-node-resolve":"13.1.3"},"peerDependencies":{"react":">=17.0.0","react-dom":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/i18n_1.0.1_1644936499929_0.4516280455665789","host":"s3://npm-registry-packages"},"deprecated":"Platform was closed down and no longer maintained. Check @smg-automotive/i18n-pkg as replacement"},"1.0.2-optional-scope-3a6c2c455c6228aa9b2aaef93824852cd44c5866.1":{"name":"@carforyou/i18n","version":"1.0.2-optional-scope-3a6c2c455c6228aa9b2aaef93824852cd44c5866.1","author":{"name":"CAR FOR YOU"},"license":"MIT","_id":"@carforyou/i18n@1.0.2-optional-scope-3a6c2c455c6228aa9b2aaef93824852cd44c5866.1","maintainers":[{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},{"name":"lkappeler","email":"me@lnk.codes"}],"homepage":"https://github.com/carforyou/i18n-pkg#readme","bugs":{"url":"https://github.com/carforyou/carforyou-i18n-pkg/issues"},"dist":{"shasum":"13041461c68261d646e13b36a7de3b7c1e8820f6","tarball":"https://registry.npmjs.org/@carforyou/i18n/-/i18n-1.0.2-optional-scope-3a6c2c455c6228aa9b2aaef93824852cd44c5866.1.tgz","fileCount":29,"integrity":"sha512-EYR2a93cKtNOfDcgcEvT5IAQQk+vER1iDCFflMIbNw+5siiTKAgTBPPPSOo4PcJkfX3SpwG/MIMJ3T816b3A1w==","signatures":[{"sig":"MEQCIG9OpGhFXx5whWA/TWSXpVVh9mvo9fl9P1jYy6qqKuaOAiBwdqtlVE3bXbe9zOvkMn+xyYW0+sLRtV9ZpQ++jQ21Yw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24966,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDf6KACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoKhRAAlKfk7zl0pfyCsdJvgOha6UE7JJlGNFckQWRkFVYNxSp34pMG\r\n4xaTzlyUhm/K2BJBSP3vaKF0u5J7LOaUnFIuwsTJs3VEbRty1oO10L6uiZhF\r\nzLLUEeCd2bvQ4N643gNRM4R21FmOPMdqe7mSdsUYJQL0Kbt5z+lq6CY/xaaP\r\njZ5f84RIllB7ua+k2e1VWVbiZCZcn/ARwgNCUuoaURr0xD2tJZonDQ52etu/\r\nn4pqEgtFmFuGX5xPR4Gt1wXNRlXmPYGFGtqpHmL+pG/+CZSAWZY5MZm+3ybB\r\nKZw6X3CIg4Fe/cY7jamwqyj84tjsV28NOFk8vRZE2B1I3gzljyKEqvYOZ29b\r\npFG+qLs52RM88pF7n0bqkMRr3zoWvUMuacrfqyc+JEDG/s5uhZa2FBBQ/2td\r\n2LwcfXCbBjpRtAhPR7q7ymJ45MnpBcuXmKYzWC5DmjnnRkH7IggE+7SJZkLR\r\nSM4MaRS+RAV+jyktNObferPXfREn2+ho2wXlsRPt5JiNdA80kPeYDpgnnCnz\r\nurDUu5rrMsFXB+FCeo84waG0FIbcOIU6+sqt9sd1s0CnF5rmFs4mmOyuq1B+\r\nqw5HjZX6RZ3jUpHNRt1+81x2NdSDPxzvw+ixAnBPuP3etwvC5CSIBDIHHT+u\r\nuMLbXd1xIw/660ozliTElEzIL6cwKCHZHkA=\r\n=K59k\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./pkg/cjs/index.js","types":"./pkg/types/index.d.ts","module":"./pkg/esm/index.js","readme":"# CAR FOR YOU I18n\n\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nShared I18n setup for Next.js applications\n\n## Usage\n```\nnpm install @carforyou/i18n\n```\n\nNext.js/webpack config:\n```\nif (options.dev) {\n  config.resolve.alias.rosetta = \"rosetta/debug\"\n}\n```\n\nTo mock `useI18n` in tests, add the following to a setup file. This can also be used inline in tests.\n```\njest.mock(\"@carforyou/i18n\", () => {\n  const original = jest.requireActual(\"@carforyou/i18n\")\n  return {\n    ...original,\n    useI18n: jest.fn().mockReturnValue({\n      t: jest.fn((key) => key),\n      language: \"en\"\n    }),\n  }\n})\n```\n\nIn your project (preferrably server-side) pass the traslation files to the `I18nProvider`:\n```\nimport { getDictionary, I18nProvider, useI18n } from \"@carforyou/i18n\"\n\nimport dictIT from \"~/locales/it/app.json\"\nimport dictFR from \"~/locales/fr/app.json\"\nimport dictEN from \"~/locales/en/app.json\"\nimport dictDE from \"~/locales/de/app.json\"\n\nconst dictionaries = {\n  de: dictDE,\n  fr: dictFR,\n  it: dictIT,\n  en: dictEN,\n}\n\nconst onMissingTranslation = (error) => {\n  if (typeof window !== \"undefined\") {\n    import(\"~/lib/sentry\").then((module) => {\n      const Sentry = module.default\n      Sentry.captureException(error)\n    })\n  }\n}\n\nconst lngDict = await getDictionary({\n  language,\n  dictionaries,\n  dictionaryScopes: [\"requiredScope\", \"sharedScope\"],\n})\n\nconst Component = () => {\n  const { t, language } = useI18n()\n\n  return `${t(\"foo.bar\")} ${language}`\n}\n\n<I18nProvider lngDict={lngDict} language={\"en\"} onMissingTranslation={onMissingTranslation}>\n  <Component />\n</I18nProvider>\n```\n\n## Development\n```\nnpm run build\n```\n\nYou can link your local npm package to integrate it with any local project:\n```\ncd carforyou-i18n-pkg\nnpm run build\n\ncd carforyou-listings-web\nnpm link ../carforyou-i18n-pkg\n```\n\n## Release a new version\n\nNew versions are released on the ci using semantic-release as soon as you merge into master. Please\nmake sure your merge commit message adheres to the corresponding conventions.\n\n\n## Circle CI\n\nYou will need to enable the repository in circle CI ui to be able to build it.\n\nFor slack notifications to work you will need to provide the token in circle settings.\n","gitHead":"3a6c2c455c6228aa9b2aaef93824852cd44c5866","scripts":{"lint":"eslint --ext ts,js,tsx,jsx,json .","test":"jest","build":"rimraf pkg && rollup -c && tsc --outDir pkg/types --emitDeclarationOnly --declaration","format":"npm run lint -- --fix","version":"npm run build","typecheck":"tsc --noEmit","test:debug":"node --inspect-brk --inspect=127.0.0.1:9229 ./node_modules/jest/bin/jest.js --runInBand"},"_npmUser":{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},"repository":{"url":"git+https://github.com/carforyou/carforyou-i18n-pkg.git","type":"git"},"_npmVersion":"8.3.2","description":"Shared I18n setup for Next.js applications","directories":{},"sideEffects":false,"_nodeVersion":"16.14.0","dependencies":{"rosetta":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.5.1","rimraf":"3.0.2","rollup":"2.63.0","ts-jest":"27.1.3","typescript":"4.5.5","@types/jest":"27.4.0","@types/node":"16.11.24","@types/react":"17.0.39","semantic-release":"19.0.2","@testing-library/react":"12.1.2","@rollup/plugin-commonjs":"21.0.1","@carforyou/eslint-config":"4.0.11","@rollup/plugin-typescript":"8.3.0","@rollup/plugin-node-resolve":"13.1.3"},"peerDependencies":{"react":">=17.0.0","react-dom":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/i18n_1.0.2-optional-scope-3a6c2c455c6228aa9b2aaef93824852cd44c5866.1_1645084298741_0.14993674456351203","host":"s3://npm-registry-packages"},"deprecated":"Platform was closed down and no longer maintained. Check @smg-automotive/i18n-pkg as replacement"},"1.0.2":{"name":"@carforyou/i18n","version":"1.0.2","author":{"name":"CAR FOR YOU"},"license":"MIT","_id":"@carforyou/i18n@1.0.2","maintainers":[{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},{"name":"lkappeler","email":"me@lnk.codes"}],"homepage":"https://github.com/carforyou/i18n-pkg#readme","bugs":{"url":"https://github.com/carforyou/carforyou-i18n-pkg/issues"},"dist":{"shasum":"5f287f317429d54cf6e695a96163b86179d26da7","tarball":"https://registry.npmjs.org/@carforyou/i18n/-/i18n-1.0.2.tgz","fileCount":29,"integrity":"sha512-su0SfdBxM8KVX5+IS9lBUrxTn7brIJL5FDZe6u0mkw0cM+hF0OcCz4Q1TT4YUyFY5m3L5mlfsYRWqCGLfHqsww==","signatures":[{"sig":"MEYCIQDZoWJjrVKPKXX16yb7v163k38N5MlMIRhiGB7Ng8jtqAIhAL4vtlyJsuAU1Ey5ZfJOGdPR3jbqSivIS28SEHOoDPaQ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":24908,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiDf75ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo2Mg/9Fbu/x1ljEyXZtJhRIQux/WwPyq5f7c5F7VMFnrm8OXItvycd\r\nc9sT/AtaV1jkGVjFOtD8vV+m2VFcgimAP0NFecp4Mfdm/MbQWdLmBf1VcDbJ\r\nZEn23GURtePmqWN1/BslWqpr0pmnW3kKPMRbkOYO14Om+1rooxwL2d8xr+TH\r\nmj79pW6H29ZiXa+oEGRU/iV9Cu5m97NQnL6l0MjApHzSxR1w5/DyRNVZnkpr\r\nzO2FmaL0luRXrWKQHqnaLtTgLkYCBAqVGCqiJKei0dZtTQsbwMU23cGNlfkM\r\nK8m7cQpbAsrMihUbaoxZv61SwV4b7a3VIS0+2+p3D3vIQMClKAE52F+4nIO9\r\n17qtFO7ilYy9kYPD7vZL/y00qY5i6uVlG/AHPjJBr6IZhutaxY3bC8eGCWsI\r\n1YNpZXGBzc+vCg3M2jUORGYm1r95LZbRB5nlqNlQ7ULnyujYVpcN/Pg++9e8\r\n9Ti5U5vbjDIsphJpse9gdYGvtZfDp9rXxuN9RB/Kp6WDHBJNuFFfXHWkpB6A\r\nC9wsgaJSnWxBIxi1EYtkDB4TgDgQ8ccPYc+7/XAWTXVkQjXLWCSOC34OxLFj\r\nmse+SYGitLVa1uWniP/CYx8UHfeyPWxxAzg2P+gzB/iuBT1YXaVWKuFTBhzP\r\nOscOmIJo+CRxQFmXco6n1F5tPHU9zciFJtk=\r\n=M+ak\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./pkg/cjs/index.js","types":"./pkg/types/index.d.ts","module":"./pkg/esm/index.js","gitHead":"ddb6ac9a2ec3ef0ac994c59d8880ec1586bf5435","scripts":{"lint":"eslint --ext ts,js,tsx,jsx,json .","test":"jest","build":"rimraf pkg && rollup -c && tsc --outDir pkg/types --emitDeclarationOnly --declaration","format":"npm run lint -- --fix","version":"npm run build","typecheck":"tsc --noEmit","test:debug":"node --inspect-brk --inspect=127.0.0.1:9229 ./node_modules/jest/bin/jest.js --runInBand"},"_npmUser":{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},"repository":{"url":"git+https://github.com/carforyou/carforyou-i18n-pkg.git","type":"git"},"_npmVersion":"8.3.2","description":"Shared I18n setup for Next.js applications","directories":{},"sideEffects":false,"_nodeVersion":"16.14.0","dependencies":{"rosetta":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.5.1","rimraf":"3.0.2","rollup":"2.63.0","ts-jest":"27.1.3","typescript":"4.5.5","@types/jest":"27.4.0","@types/node":"16.11.24","@types/react":"17.0.39","semantic-release":"19.0.2","@testing-library/react":"12.1.2","@rollup/plugin-commonjs":"21.0.1","@carforyou/eslint-config":"4.0.11","@rollup/plugin-typescript":"8.3.0","@rollup/plugin-node-resolve":"13.1.3"},"peerDependencies":{"react":">=17.0.0","react-dom":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/i18n_1.0.2_1645084409133_0.8275726034645203","host":"s3://npm-registry-packages"},"deprecated":"Platform was closed down and no longer maintained. Check @smg-automotive/i18n-pkg as replacement"},"1.0.3-talamcol-props-with-children-87435ec0de13c64977169a03ec1f376e50d57fa9.1":{"name":"@carforyou/i18n","version":"1.0.3-talamcol-props-with-children-87435ec0de13c64977169a03ec1f376e50d57fa9.1","author":{"name":"CAR FOR YOU"},"license":"MIT","_id":"@carforyou/i18n@1.0.3-talamcol-props-with-children-87435ec0de13c64977169a03ec1f376e50d57fa9.1","maintainers":[{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},{"name":"lkappeler","email":"me@lnk.codes"}],"homepage":"https://github.com/carforyou/i18n-pkg#readme","bugs":{"url":"https://github.com/carforyou/carforyou-i18n-pkg/issues"},"dist":{"shasum":"19d34d379fe28df6c2e2be0de4e59e1542401907","tarball":"https://registry.npmjs.org/@carforyou/i18n/-/i18n-1.0.3-talamcol-props-with-children-87435ec0de13c64977169a03ec1f376e50d57fa9.1.tgz","fileCount":29,"integrity":"sha512-FQCjWfum7IKEN3/2SbrShK024LvGiXE9VYe2EE5B0rxnUdtamQ1jsbHndyz4SNirdZhz+aM9Ae7ONmuMpetxMA==","signatures":[{"sig":"MEYCIQDTjKFS2Ei9sFOKzgO4ziVyLT1P8/DrPV7Z9CaZAVW/8gIhAOrZqTlxbMN0w8guA4xi6Ic6HJkWorpg34k6EWUlWvaw","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25838,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil2K+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq6jA/8CW8XOyCUd18e+8ihHik0bvMafMteWUP5Ut/fm+BVRmLgILAs\r\nMptpRfaM/mHwyfUk6q/zv7APqHEmuFwW8vS10Ftop6HowcSV4TC0ipmyqzCx\r\nyQLJG+SWzwOh7xw7H6X1O/ljQ/jmaa8Gay+TwGd8MkJmPNWeVxeGr4Iz5dvr\r\n/Jy6pjSUTa2oZZRjZtMdLE+WQUxvSavz6KA+ghr/fXyAMGAgmeHfiwEBjgLI\r\nh0X1ce6O2jG+TP9WtweXiBxaEbwIKSk4H/PYjs6rqxSVsry2DVml8jIE40U4\r\nBrA0886IkDckXwUoJ40e9Rm9IGG473vf5OHz9ipvLb7FzlyQfcUYnK3/s+DA\r\n6s+cs/VaTKtQeJ7qyI8DxE2zIiSQ7jEy44/GP9RzSlAy1Zui+BS+jJCKdW+F\r\nTohE2sO0LBaBRwJUMPqVPTnsWmI9+oeYjr3WAP02y+XgUCgAhFYjohYbo01w\r\nVVg3iwkF2XiB6fyKaci6TqC6pq1BfiaBJjl8elU8cBrzfNuogfjV7C+iXScL\r\nwIjdq4Ws9LvT78whDIW1By+PNI52xXCPJgJG2VYVcGcINTsZRwIGwpGMuOax\r\n4KVDF1z4ixg64EEjNbWvAjd+Dn+ZXt7IbmJ1b8bi9+YWxItA8FcC7tREk/1J\r\nmfwF4uGl4GhLiBn5vb/sSl2DXgQIeYWP3i0=\r\n=Fvsv\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./pkg/cjs/index.js","types":"./pkg/types/index.d.ts","module":"./pkg/esm/index.js","readme":"# CAR FOR YOU I18n\n\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nShared I18n setup for Next.js applications\n\n## Usage\n```\nnpm install @carforyou/i18n\n```\n\nNext.js/webpack config:\n```\nif (options.dev) {\n  config.resolve.alias.rosetta = \"rosetta/debug\"\n}\n```\n\nTo mock `useI18n` in tests, add the following to a setup file. This can also be used inline in tests.\n```\njest.mock(\"@carforyou/i18n\", () => {\n  const original = jest.requireActual(\"@carforyou/i18n\")\n  return {\n    ...original,\n    useI18n: jest.fn().mockReturnValue({\n      t: jest.fn((key) => key),\n      language: \"en\"\n    }),\n  }\n})\n```\n\nIn your project (preferrably server-side) pass the traslation files to the `I18nProvider`:\n```\nimport { getDictionary, I18nProvider, useI18n } from \"@carforyou/i18n\"\n\nimport dictIT from \"~/locales/it/app.json\"\nimport dictFR from \"~/locales/fr/app.json\"\nimport dictEN from \"~/locales/en/app.json\"\nimport dictDE from \"~/locales/de/app.json\"\n\nconst dictionaries = {\n  de: dictDE,\n  fr: dictFR,\n  it: dictIT,\n  en: dictEN,\n}\n\nconst onMissingTranslation = (error) => {\n  if (typeof window !== \"undefined\") {\n    import(\"~/lib/sentry\").then((module) => {\n      const Sentry = module.default\n      Sentry.captureException(error)\n    })\n  }\n}\n\nconst lngDict = await getDictionary({\n  language,\n  dictionaries,\n  dictionaryScopes: [\"requiredScope\", \"sharedScope\"],\n})\n\nconst Component = () => {\n  const { t, language } = useI18n()\n\n  return `${t(\"foo.bar\")} ${language}`\n}\n\n<I18nProvider lngDict={lngDict} language={\"en\"} onMissingTranslation={onMissingTranslation}>\n  <Component />\n</I18nProvider>\n```\n\n## Development\n```\nnpm run build\n```\n\nYou can link your local npm package to integrate it with any local project:\n```\ncd carforyou-i18n-pkg\nnpm run build\n\ncd carforyou-listings-web\nnpm link ../carforyou-i18n-pkg\n```\n\n## Release a new version\n\nNew versions are released on the ci using semantic-release as soon as you merge into master. Please\nmake sure your merge commit message adheres to the corresponding conventions.\n\n\n## Circle CI\n\nYou will need to enable the repository in circle CI ui to be able to build it.\n\nFor slack notifications to work you will need to provide the token in circle settings.\n","gitHead":"87435ec0de13c64977169a03ec1f376e50d57fa9","scripts":{"lint":"eslint --ext ts,js,tsx,jsx,json .","test":"jest","build":"rimraf pkg && rollup -c && tsc --outDir pkg/types --emitDeclarationOnly --declaration","format":"npm run lint -- --fix","version":"npm run build","typecheck":"tsc --noEmit","test:debug":"node --inspect-brk --inspect=127.0.0.1:9229 ./node_modules/jest/bin/jest.js --runInBand"},"_npmUser":{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},"repository":{"url":"git+https://github.com/carforyou/carforyou-i18n-pkg.git","type":"git"},"_npmVersion":"8.3.2","description":"Shared I18n setup for Next.js applications","directories":{},"sideEffects":false,"_nodeVersion":"16.15.0","dependencies":{"rosetta":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"27.5.1","rimraf":"3.0.2","rollup":"2.70.1","ts-jest":"27.1.5","typescript":"4.5.5","@types/jest":"27.4.1","@types/node":"16.11.36","@types/react":"17.0.45","semantic-release":"19.0.2","@testing-library/react":"12.1.5","@rollup/plugin-commonjs":"21.1.0","@carforyou/eslint-config":"4.0.22","@rollup/plugin-typescript":"8.3.2","@rollup/plugin-node-resolve":"13.3.0"},"peerDependencies":{"react":">=17.0.0","react-dom":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/i18n_1.0.3-talamcol-props-with-children-87435ec0de13c64977169a03ec1f376e50d57fa9.1_1654088382334_0.22398623485124403","host":"s3://npm-registry-packages"},"deprecated":"Platform was closed down and no longer maintained. Check @smg-automotive/i18n-pkg as replacement"},"1.0.3":{"name":"@carforyou/i18n","version":"1.0.3","author":{"name":"CAR FOR YOU"},"license":"MIT","_id":"@carforyou/i18n@1.0.3","maintainers":[{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},{"name":"lkappeler","email":"me@lnk.codes"}],"homepage":"https://github.com/carforyou/i18n-pkg#readme","bugs":{"url":"https://github.com/carforyou/carforyou-i18n-pkg/issues"},"dist":{"shasum":"16f4cd92189ea4f5caaac1887348902afd963aeb","tarball":"https://registry.npmjs.org/@carforyou/i18n/-/i18n-1.0.3.tgz","fileCount":29,"integrity":"sha512-JbN0eZevjEWSIqmN+66CYWf/7aPHnNKLydT1oXJ8e86PbGXX4H6THXWO9Ilyt8f9DXJ0Dr+kG0zdNPm9EgrTTQ==","signatures":[{"sig":"MEUCIQDRx2WNqnGp7dfRLRqu5uvjiWt60zlDj947dG48YSVacgIgFEWDhqJxfI6n9IxRsm+u/9+mr7lPFAExmSl9eSY3sBI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25766,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJil2g9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrrJA/5AdolmhlGrVn9XbxspaIN7SIE4nXl438pM86rUKI5Z/WfCU/5\r\n1nUD+NuR7Tjw1GhihDmvF3e8bIj/KzFXOXrM2+/gGfTrR1v4qYju8CIFxaFw\r\nemwNmuGjvYoItaQVPahvgw7r47W11pUmgr8V2MVboGVzN2+zobLOIOXDlGga\r\nrRMSJgm1Kw5i5ykOEnheN0SJIPPeodrmbeHXRmxpco6ZmZHUV8GALi00QIzi\r\nSj2Zj0nJ8vHa6vKVGrZ5hDtuxg4U3tBJy3ZT0SLFBqEEm4uzv9LS2yV2D+Ss\r\nudTiL+Qe3nTscoz9Hv7VZiA02JMkFL7o0UPOKp5WR5G3lMnfE083oGW1GQ5Q\r\nTpzip8cTO+5v0JEbYWvNmwhLnopsgNCRMyxZTwjLC2tKHZfsvKyQx2ywQOeL\r\n5xEOzzIbShuVepcaBBkZFWADXwpsaaaIHE/TTGwIZ+dOumZ/p9UnZySK/ldZ\r\nPJJMVjYNzcJGInrv7vrC52WnFdixRnmb9oX76Cn8B+jGWAVNfB5cqc4vLjUS\r\n4iCpnridgwaFTmq14eyiFWhRcPMQVW2rWONfdWjKbS77RbWPBGAFtUCROJJf\r\nRAfN6ArB0rFsMJe/1jewIaL1HJ6qZH8QrHf3vX98q1cbL0c9JA/CWgQt0Wqt\r\n4ByF1oKGCSKjn2r9Ac1F+++IZxItdhtmeT8=\r\n=1Emh\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./pkg/cjs/index.js","types":"./pkg/types/index.d.ts","module":"./pkg/esm/index.js","gitHead":"10da607dc41ad1033008a29afcfcb8b0926a6b13","scripts":{"lint":"eslint --ext ts,js,tsx,jsx,json .","test":"jest","build":"rimraf pkg && rollup -c && tsc --outDir pkg/types --emitDeclarationOnly --declaration","format":"npm run lint -- --fix","version":"npm run build","typecheck":"tsc --noEmit","test:debug":"node --inspect-brk --inspect=127.0.0.1:9229 ./node_modules/jest/bin/jest.js --runInBand"},"_npmUser":{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},"repository":{"url":"git+https://github.com/carforyou/carforyou-i18n-pkg.git","type":"git"},"_npmVersion":"8.3.2","description":"Shared I18n setup for Next.js applications","directories":{},"sideEffects":false,"_nodeVersion":"16.15.0","dependencies":{"rosetta":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"27.5.1","rimraf":"3.0.2","rollup":"2.70.1","ts-jest":"27.1.5","typescript":"4.5.5","@types/jest":"27.4.1","@types/node":"16.11.36","@types/react":"17.0.45","semantic-release":"19.0.2","@testing-library/react":"12.1.5","@rollup/plugin-commonjs":"21.1.0","@carforyou/eslint-config":"4.0.22","@rollup/plugin-typescript":"8.3.2","@rollup/plugin-node-resolve":"13.3.0"},"peerDependencies":{"react":">=17.0.0","react-dom":">=17.0.0"},"_npmOperationalInternal":{"tmp":"tmp/i18n_1.0.3_1654089789128_0.5236777269477237","host":"s3://npm-registry-packages"},"deprecated":"Platform was closed down and no longer maintained. Check @smg-automotive/i18n-pkg as replacement"}},"time":{"created":"2022-02-15T10:09:49.408Z","modified":"2024-11-18T11:16:22.835Z","1.0.0":"2022-02-15T10:09:49.882Z","1.0.1-init2-b5b7ca3256185c52f89fbf5c23b2d963953d6388.1":"2022-02-15T12:05:23.422Z","1.0.1":"2022-02-15T14:48:20.093Z","1.0.2-optional-scope-3a6c2c455c6228aa9b2aaef93824852cd44c5866.1":"2022-02-17T07:51:38.939Z","1.0.2":"2022-02-17T07:53:29.289Z","1.0.3-talamcol-props-with-children-87435ec0de13c64977169a03ec1f376e50d57fa9.1":"2022-06-01T12:59:42.461Z","1.0.3":"2022-06-01T13:23:09.278Z"},"bugs":{"url":"https://github.com/carforyou/carforyou-i18n-pkg/issues"},"author":{"name":"CAR FOR YOU"},"license":"MIT","homepage":"https://github.com/carforyou/i18n-pkg#readme","repository":{"url":"git+https://github.com/carforyou/carforyou-i18n-pkg.git","type":"git"},"description":"Shared I18n setup for Next.js applications","maintainers":[{"name":"carforyou-engineering","email":"engineering@carforyou.ch"},{"name":"lkappeler","email":"me@lnk.codes"}],"readme":"# CAR FOR YOU I18n\n\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n\nShared I18n setup for Next.js applications\n\n## Usage\n```\nnpm install @carforyou/i18n\n```\n\nNext.js/webpack config:\n```\nif (options.dev) {\n  config.resolve.alias.rosetta = \"rosetta/debug\"\n}\n```\n\nTo mock `useI18n` in tests, add the following to a setup file. This can also be used inline in tests.\n```\njest.mock(\"@carforyou/i18n\", () => {\n  const original = jest.requireActual(\"@carforyou/i18n\")\n  return {\n    ...original,\n    useI18n: jest.fn().mockReturnValue({\n      t: jest.fn((key) => key),\n      language: \"en\"\n    }),\n  }\n})\n```\n\nIn your project (preferrably server-side) pass the traslation files to the `I18nProvider`:\n```\nimport { getDictionary, I18nProvider, useI18n } from \"@carforyou/i18n\"\n\nimport dictIT from \"~/locales/it/app.json\"\nimport dictFR from \"~/locales/fr/app.json\"\nimport dictEN from \"~/locales/en/app.json\"\nimport dictDE from \"~/locales/de/app.json\"\n\nconst dictionaries = {\n  de: dictDE,\n  fr: dictFR,\n  it: dictIT,\n  en: dictEN,\n}\n\nconst onMissingTranslation = (error) => {\n  if (typeof window !== \"undefined\") {\n    import(\"~/lib/sentry\").then((module) => {\n      const Sentry = module.default\n      Sentry.captureException(error)\n    })\n  }\n}\n\nconst lngDict = await getDictionary({\n  language,\n  dictionaries,\n  dictionaryScopes: [\"requiredScope\", \"sharedScope\"],\n})\n\nconst Component = () => {\n  const { t, language } = useI18n()\n\n  return `${t(\"foo.bar\")} ${language}`\n}\n\n<I18nProvider lngDict={lngDict} language={\"en\"} onMissingTranslation={onMissingTranslation}>\n  <Component />\n</I18nProvider>\n```\n\n## Development\n```\nnpm run build\n```\n\nYou can link your local npm package to integrate it with any local project:\n```\ncd carforyou-i18n-pkg\nnpm run build\n\ncd carforyou-listings-web\nnpm link ../carforyou-i18n-pkg\n```\n\n## Release a new version\n\nNew versions are released on the ci using semantic-release as soon as you merge into master. Please\nmake sure your merge commit message adheres to the corresponding conventions.\n\n\n## Circle CI\n\nYou will need to enable the repository in circle CI ui to be able to build it.\n\nFor slack notifications to work you will need to provide the token in circle settings.\n","readmeFilename":"README.md"}