Skip to content

Commit

Permalink
fix(i18n): fix missing comma and unnecessary semicolon
Browse files Browse the repository at this point in the history
Fixes missing comma and unnecessary semicolon in the i18n translation file.

The changes include:
- Removed unnecessary semicolon at the end of the file.
- Added missing comma after the 'AI-Assistant Development' translation key.

This commit resolves the issue of incorrect syntax in the i18n translation file, ensuring proper functionality and readability.
  • Loading branch information
phodal committed Feb 2, 2024
1 parent 9fcbb5a commit eb69428
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 24 deletions.
51 changes: 35 additions & 16 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
// Configuration for JavaScript files
"extends": [
"airbnb-base",
"next/core-web-vitals", // Needed to avoid warning in next.js build: 'The Next.js plugin was not detected in your ESLint configuration'
"next/core-web-vitals",
// Needed to avoid warning in next.js build: 'The Next.js plugin was not detected in your ESLint configuration'
"plugin:prettier/recommended"
],
"rules": {
Expand All @@ -17,7 +18,10 @@
"overrides": [
// Configuration for TypeScript files
{
"files": ["**/*.ts", "**/*.tsx"],
"files": [
"**/*.ts",
"**/*.tsx"
],
"plugins": [
"@typescript-eslint",
"unused-imports",
Expand All @@ -41,29 +45,44 @@
"endOfLine": "auto"
}
],
"react/destructuring-assignment": "off", // Vscode doesn't support automatically destructuring, it's a pain to add a new variable
"react/require-default-props": "off", // Allow non-defined react props as undefined
"react/jsx-props-no-spreading": "off", // _app.tsx uses spread operator and also, react-hook-form
"react-hooks/exhaustive-deps": "off", // Incorrectly report needed dependency with Next.js router
"@next/next/no-img-element": "off", // We currently not using next/image because it isn't supported with SSG mode
"@next/next/link-passhref": "off", // Only needed when the child of Link wraps an <a> tag
"@typescript-eslint/comma-dangle": "off", // Avoid conflict rule between Eslint and Prettier
"@typescript-eslint/consistent-type-imports": "error", // Ensure `import type` is used when it's necessary
"react/destructuring-assignment": "off",
// Vscode doesn't support automatically destructuring, it's a pain to add a new variable
"react/require-default-props": "off",
// Allow non-defined react props as undefined
"react/jsx-props-no-spreading": "off",
// _app.tsx uses spread operator and also, react-hook-form
"react-hooks/exhaustive-deps": "off",
// Incorrectly report needed dependency with Next.js router
"@next/next/no-img-element": "off",
// We currently not using next/image because it isn't supported with SSG mode
"@next/next/link-passhref": "off",
// Only needed when the child of Link wraps an <a> tag
"@typescript-eslint/comma-dangle": "off",
// Avoid conflict rule between Eslint and Prettier
"@typescript-eslint/consistent-type-imports": "error",
// Ensure `import type` is used when it's necessary
"no-restricted-syntax": [
"error",
"ForInStatement",
"LabeledStatement",
"WithStatement"
], // Overrides Airbnb configuration and enable no-restricted-syntax
"import/prefer-default-export": "off", // Named export is easier to refactor automatically
"tailwindcss/no-custom-classname": "off", // Disabled otherwise nightmare to allow each custom tailwind classes
"simple-import-sort/imports": "error", // Import configuration for `eslint-plugin-simple-import-sort`
"simple-import-sort/exports": "error", // Export configuration for `eslint-plugin-simple-import-sort`
],
// Overrides Airbnb configuration and enable no-restricted-syntax
"import/prefer-default-export": "off",
// Named export is easier to refactor automatically
"tailwindcss/no-custom-classname": "off",
// Disabled otherwise nightmare to allow each custom tailwind classes
"simple-import-sort/imports": "error",
// Import configuration for `eslint-plugin-simple-import-sort`
"simple-import-sort/exports": "error",
// Export configuration for `eslint-plugin-simple-import-sort`
"@typescript-eslint/no-unused-vars": "off",
"unused-imports/no-unused-imports": "error",
"unused-imports/no-unused-vars": [
"error",
{ "argsIgnorePattern": "^_" }
{
"argsIgnorePattern": "^_"
}
]
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/i18n/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ const resources = {
// 构建下一代软件生成式应用开发范式
'Build NG AI4SE': '构建下一代软件生成式应用开发范式',
// AI 编码助手
'AI-Assistant Development': 'AI 编码助手',
},
'AI-Assistant Development': 'AI 编码助手'
}
},
'en-US': {
translation: {
Expand All @@ -26,9 +26,9 @@ const resources = {
'Download White Paper': 'Download White Paper of UnitMesh Technology',
'E2E open source AI4SDLC': 'End-to-end open source AI4SDLC',
'Build NG AI4SE': 'Build next-gen AI4SDLC',
'AI-Assistant Development': 'AI-Assistant Development',
},
},
'AI-Assistant Development': 'AI-Assistant Development'
}
}
};

i18n
Expand All @@ -44,13 +44,13 @@ i18n
// if you're using a language detector, do not define the lng option

interpolation: {
escapeValue: false, // react already safes from xss
},
escapeValue: false // react already safes from xss
}
},
(err) => {
if (err) return console.log('something went wrong loading', err);
console.log('i18n loaded successfully');
},
}
);

export default i18n;

0 comments on commit eb69428

Please sign in to comment.