{"_id":"@codingame/json-schema-l10n","_rev":"2-02a1386b390784c8d95e6c788148306c","name":"@codingame/json-schema-l10n","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.2":{"name":"@codingame/json-schema-l10n","version":"1.0.2","_id":"@codingame/json-schema-l10n@1.0.2","maintainers":[{"name":"codingame_team","email":"developers@codingame.com"},{"name":"nantoniazzi","email":"nicolas@codingame.com"},{"name":"samuel.olivier","email":"samuel@coderpad.io"},{"name":"maximecg","email":"maxime@codingame.com"},{"name":"beli4l","email":"vetter.valentin@gmail.com"},{"name":"nonofr","email":"loic@codingame.com"}],"homepage":"https://github.com/CodinGame/json-schema-l10n#readme","bugs":{"url":"https://github.com/CodinGame/json-schema-l10n/issues"},"dist":{"shasum":"d8f133bcdc36c3984f0d9cf2ef274a554178d9de","tarball":"https://registry.npmjs.org/@codingame/json-schema-l10n/-/json-schema-l10n-1.0.2.tgz","fileCount":20,"integrity":"sha512-ShsoxfFRQASqv58++vqN19JnHxAF9r+0W5a7PyVQo3vgpqgKx2b3/3gYXlxKTt3BVJhOU1ZMWEP7wbL/H+uHmA==","signatures":[{"sig":"MEQCIFyG6GSqXnOxVU+b7JXe6rRJEEiVRyQWdbJpU6dPRcIiAiAL8y9UaV1N9afw3EYvLAANjfwycgLMXhu6cFl+wn5cUw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":19093},"main":"dist/index.js","types":"dist/index.d.ts","volta":{"npm":"10.4.0","node":"20.10.0"},"module":"dist/index.js","gitHead":"dcd0bec7e4c4a483aa4215c7940ffdf2cd023389","private":false,"release":{"extends":"@codingame/semantic-release-config-github"},"scripts":{"lint":"eslint --ext .ts,.tsx src/","test":"jest","build":"npm run lint && npm run compile","compile":"tsc"},"_npmUser":{"name":"codingame_team","email":"developers@codingame.com"},"repository":{"url":"git+https://github.com/CodinGame/json-schema-l10n.git","type":"git"},"_npmVersion":"10.4.0","description":"Tool to handle localization in JSON schema","directories":{},"_nodeVersion":"20.10.0","dependencies":{"json-schema":"^0.4.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"8.56.0","ts-jest":"^29.1.2","typescript":"5.3.3","@types/jest":"^29.5.12","@types/react":"18.2.55","@types/vscode":"^1.86.0","@commitlint/cli":"^18.6.1","@types/react-dom":"^18.2.19","@types/deep-equal":"^1.0.4","eslint-plugin-node":"11.1.0","@codingame/tsconfig":"^1.1.1","eslint-plugin-react":"7.33.2","eslint-plugin-import":"2.29.1","@types/lodash.debounce":"^4.0.9","eslint-config-standard":"17.1.0","@codingame/eslint-config":"^1.1.10","@typescript-eslint/parser":"7.0.1","eslint-plugin-react-hooks":"4.6.0","eslint-config-standard-jsx":"11.0.0","eslint-plugin-unused-imports":"3.1.0","@codingame/eslint-config-react":"^1.0.2","@typescript-eslint/eslint-plugin":"7.0.1","@codingame/commitlint-config-codingame":"^1.0.10","@codingame/semantic-release-config-github":"^1.0.0","conventional-changelog-conventionalcommits":"^7.0.2"},"moduleResolution":"node","peerDependencies":{"react":">=16.0.0"},"_npmOperationalInternal":{"tmp":"tmp/json-schema-l10n_1.0.2_1707928399571_0.8397104898662517","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-02-14T16:33:19.463Z","modified":"2025-07-15T14:00:01.371Z","1.0.2":"2024-02-14T16:33:19.730Z"},"bugs":{"url":"https://github.com/CodinGame/json-schema-l10n/issues"},"homepage":"https://github.com/CodinGame/json-schema-l10n#readme","repository":{"url":"git+https://github.com/CodinGame/json-schema-l10n.git","type":"git"},"description":"Tool to handle localization in JSON schema","maintainers":[{"email":"loic@codingame.com","name":"nonofr"},{"email":"samuel@coderpad.io","name":"samuel.olivier"},{"email":"nicolas@codingame.com","name":"nantoniazzi"},{"email":"maxime@codingame.com","name":"maximecg"},{"email":"developers@codingame.com","name":"codingame_team"}],"readme":"# json-schema-l10n\n\nThis library uses `JSONSchema6` from the library `json-schema`.\n\nIt adds a localization object for the description of the JSON schema.\n\n## Installation\n\n```npm\nnpm install @codingame/json-schema-l10n\n```\n\n## Implementation\n\n### Types\n\nThe implemented types are:\n\n- `Descriptions`: an object that stores the localized descriptions by locale\n- `LocalizedJSONSchema`: an interface that extends `JSONSchema6` with localized descriptions added\n\n### Functions\n\nThe implemented functions are:\n\n- `getLocalizedDescription`:\n  - takes in parameters a schema with localized descriptions and the locale for which we want the description (default value is `'en'`)\n  - returns the description for the wanted locale, or `undefined` if not found\n- `renderJsonSchema`:\n  - takes in parameters the locale for which we want the description and a schema with localized descriptions\n  - returns the `JSONSchema6` equivalent with the selected locale\n","readmeFilename":"README.md"}