-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(project): implement i18next-parser-workspaces cli
- Loading branch information
1 parent
1df26b8
commit df4efb3
Showing
17 changed files
with
78 additions
and
113 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 |
---|---|---|
|
@@ -23,7 +23,7 @@ jobs: | |
git config --global user.email '[email protected]' | ||
git fetch origin ${{ github.ref_name }} | ||
git merge origin/${{ github.ref_name }} | ||
yarn && yarn i18next | ||
yarn && yarn workspace @jwp/ott-web run i18next | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }} | ||
|
||
|
This file was deleted.
Oops, something went wrong.
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,30 @@ | ||
const { readdirSync } = require('fs'); | ||
const { join } = require('path'); | ||
|
||
// i18next runs in the workspace root, so we need to make sure the locales path is correct | ||
const localesPath = join(__dirname, '/public/locales'); | ||
const localesEntries = readdirSync(localesPath, { withFileTypes: true }); | ||
const locales = localesEntries.filter((entry) => entry.isDirectory()).map((entry) => entry.name); | ||
|
||
module.exports = { | ||
contextSeparator: '_', | ||
createOldCatalogs: true, | ||
defaultNamespace: 'common', | ||
defaultValue: '', | ||
indentation: 2, | ||
keepRemoved: false, | ||
keySeparator: '.', | ||
lexers: { | ||
mjs: ['JavascriptLexer'], | ||
js: ['JavascriptLexer'], | ||
ts: ['JavascriptLexer'], | ||
jsx: ['JsxLexer'], | ||
tsx: ['JsxLexer'], | ||
default: ['JavascriptLexer'], | ||
}, | ||
lineEnding: 'auto', | ||
locales, | ||
namespaceSeparator: ':', | ||
output: join(localesPath, '$LOCALE/$NAMESPACE.json'), | ||
sort: true, | ||
}; |
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 |
---|---|---|
|
@@ -247,4 +247,4 @@ | |
"ye": "Yemen", | ||
"zm": "Zambia", | ||
"zw": "Zimbabwe" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -50,4 +50,4 @@ | |
"wv": "West Virginia", | ||
"wi": "Wisconsin", | ||
"wy": "Wyoming" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -247,4 +247,4 @@ | |
"ye": "Yemen", | ||
"zm": "Zambia", | ||
"zw": "Zimbabue" | ||
} | ||
} |
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 |
---|---|---|
|
@@ -50,4 +50,4 @@ | |
"wv": "Virginia Occidental", | ||
"wi": "Wisconsin", | ||
"wy": "Wyoming" | ||
} | ||
} |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// This file is generated, do not modify manually. | ||
// Run `$ yarn i18next` to update this file | ||
// This file is generated by i18next-parser-workspaces, do not modify manually. | ||
// Run `$ npx i18next-workspaces` to update this file | ||
|
||
export const NAMESPACES = ['account', 'common', 'country', 'demo', 'epg', 'error', 'menu', 'search', 'us_state', 'user', 'video']; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.