forked from open-webui/open-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request open-webui#926 from asedmammad/feat/add-i18n
Add i18n
- Loading branch information
Showing
68 changed files
with
6,909 additions
and
808 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// i18next-parser.config.ts | ||
import { getLanguages } from './src/lib/i18n/index.ts'; | ||
|
||
const getLangCodes = async () => { | ||
const languages = await getLanguages(); | ||
return languages.map((l) => l.code); | ||
}; | ||
|
||
export default { | ||
contextSeparator: '_', | ||
createOldCatalogs: false, | ||
defaultNamespace: 'translation', | ||
defaultValue: '', | ||
indentation: 2, | ||
keepRemoved: false, | ||
keySeparator: false, | ||
lexers: { | ||
svelte: ['JavascriptLexer'], | ||
js: ['JavascriptLexer'], | ||
ts: ['JavascriptLexer'], | ||
|
||
default: ['JavascriptLexer'] | ||
}, | ||
lineEnding: 'auto', | ||
locales: await getLangCodes(), | ||
namespaceSeparator: false, | ||
output: 'src/lib/i18n/locales/$LOCALE/$NAMESPACE.json', | ||
pluralSeparator: '_', | ||
input: 'src/**/*.{js,svelte}', | ||
sort: true, | ||
verbose: true, | ||
failOnWarnings: false, | ||
failOnUpdate: false, | ||
customValueTemplate: null, | ||
resetDefaultValueLocale: null, | ||
i18nextOptions: null, | ||
yamlOptions: null | ||
}; |
Oops, something went wrong.