work on identical keys

This commit is contained in:
caranicas 2022-09-19 10:57:31 -04:00
parent 330fa10935
commit 8777e65996
4 changed files with 55 additions and 2 deletions

View File

@ -1,10 +1,12 @@
{ {
"root": true, "root": true,
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser",
"plugins": ["i18n-json"],
"extends": [ "extends": [
"eslint:recommended", "eslint:recommended",
"plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended",
"plugin:i18next/recommended" "plugin:i18next/recommended",
"plugin:i18n-json/recommended"
], ],
"rules": { "rules": {
"@typescript-eslint/ban-ts-comment": "off", "@typescript-eslint/ban-ts-comment": "off",
@ -12,5 +14,17 @@
"prefer-const": "off", "prefer-const": "off",
"no-debugger": "warn", "no-debugger": "warn",
"i18next/no-literal-string": "warn" "i18next/no-literal-string": "warn"
// "i18n-json/identical-keys": [
// "error",
// {
// "filePath": {
// "home.json/": "./Translation/locales/en/home.json"
// }
// }
// ],
// "i18n-json/valid-message-syntax": [
// "error",
// { "syntax": "non-empty-string" }
// ]
} }
} }

View File

@ -1,5 +1,6 @@
import i18n from "i18next"; import i18n from "i18next";
import translation from "./en.json"; // this should be updated to an interface
import translation from "./locales/en/home.json";
import { initReactI18next } from "react-i18next"; import { initReactI18next } from "react-i18next";
export const resources = { export const resources = {

View File

@ -0,0 +1,38 @@
{
"title": "Stable Diffusion UI",
"description": "",
"navbar": {
},
"land-cre": {
},
"land-pre": {
},
"home": {
},
"in-paint": {
},
"settings": {
},
"tags": {
},
"preview-prompt": {
},
"current-task": "",
"recent-create": "",
"popup": {
},
"history": {
},
"advanced-settings": {
},
"storage": {
},
"import": {
},
"about": ""
}