-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change: Use a new translations extraction tooling
The old tooling was a bit *hackish* and used a babel plugin internally. Because this tool needed also babel plugins from the deprecated create-react-app project it got replaced with i18next-parser.
- Loading branch information
1 parent
341793b
commit fce7b58
Showing
4 changed files
with
1,831 additions
and
294 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* SPDX-FileCopyrightText: 2025 Greenbone AG | ||
* | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
|
||
const jsLexer = [{lexer: 'JavascriptLexer', functions: ['_', '_l']}]; | ||
const jsxLexer = [{lexer: 'JsxLexer', functions: ['_', '_l']}]; | ||
|
||
export default { | ||
contextSeparator: null, | ||
defaultNamespace: 'gsa', | ||
input: ['src/**/*.js', 'src/**/*.jsx', 'src/**/*.ts', 'src/**/*.tsx'], | ||
keepRemoved: false, | ||
keySeparator: false, | ||
lexers: { | ||
mjs: jsLexer, | ||
js: jsLexer, | ||
ts: jsLexer, | ||
jsx: jsxLexer, | ||
tsx: jsxLexer, | ||
|
||
default: jsLexer, | ||
}, | ||
locales: ['de', 'zh_TW', 'zh_CN'], | ||
namespaceSeparator: false, | ||
output: 'public/locales/gsa-$LOCALE.json', | ||
pluralSeparator: false, | ||
resetDefaultValueLocale: 'en', | ||
sort: true, | ||
}; |
Oops, something went wrong.