i18n: langnostic@0.0.5
This commit is contained in:
parent
87aaf941b9
commit
233fb80deb
|
|
@ -1,4 +1,53 @@
|
||||||
.DS_Store
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
.vscode
|
|
||||||
|
# dependencies
|
||||||
node_modules
|
node_modules
|
||||||
crowdin.yml
|
.pnp
|
||||||
|
.pnp.js
|
||||||
|
.yarn
|
||||||
|
|
||||||
|
# testing
|
||||||
|
coverage
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# next.js
|
||||||
|
.next/
|
||||||
|
out/
|
||||||
|
build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
*.pem
|
||||||
|
tmp
|
||||||
|
|
||||||
|
# debug
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
.pnpm-debug.log*
|
||||||
|
|
||||||
|
# local env files
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
|
||||||
|
# turbo
|
||||||
|
.turbo
|
||||||
|
|
||||||
|
# build
|
||||||
|
dist
|
||||||
|
|
||||||
|
# i18n
|
||||||
|
crowdin.yml
|
||||||
|
|
||||||
|
# angular
|
||||||
|
.angular
|
||||||
|
|
||||||
|
# env
|
||||||
|
.env
|
||||||
|
|
||||||
|
# langnostic
|
||||||
|
.langnostic
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,47 @@
|
||||||
|
import { ConfigType } from 'langnostic';
|
||||||
|
|
||||||
|
const config: ConfigType = {
|
||||||
|
ai: {
|
||||||
|
provider: 'google',
|
||||||
|
},
|
||||||
|
localeConfig: {
|
||||||
|
source: 'en-US',
|
||||||
|
target: ['zh-CN'],
|
||||||
|
},
|
||||||
|
groups: [
|
||||||
|
{
|
||||||
|
name: 'quiz',
|
||||||
|
plugin: 'mdx',
|
||||||
|
paths: [
|
||||||
|
{
|
||||||
|
source: './packages/quiz/**/en-US.mdx',
|
||||||
|
target: './packages/quiz/**/{locale}.mdx',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'guidebooks',
|
||||||
|
plugin: 'mdx',
|
||||||
|
paths: [
|
||||||
|
{
|
||||||
|
source: './packages/behavioral-interview-guidebook/**/en-US.mdx',
|
||||||
|
target: './packages/behavioral-interview-guidebook/**/{locale}.mdx',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: './packages/front-end-interview-guidebook/**/en-US.mdx',
|
||||||
|
target: './packages/front-end-interview-guidebook/**/{locale}.mdx',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: './packages/react-interview-playbook/**/en-US.mdx',
|
||||||
|
target: './packages/react-interview-playbook/**/{locale}.mdx',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
source: './packages/system-design/**/en-US.mdx',
|
||||||
|
target: './packages/system-design/**/{locale}.mdx',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
||||||
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
|
|
@ -1,12 +1,13 @@
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"format-mdx": "prettier --write \"packages/**/en-US.{md,mdx}\"",
|
"format-mdx": "prettier --write \"packages/**/en-US.{md,mdx}\"",
|
||||||
"i18n": "npm run i18n:download && npm run i18n:fix",
|
"i18n": "langnostic translate"
|
||||||
"i18n:download": "crowdin download",
|
},
|
||||||
"i18n:upload": "crowdin upload",
|
"dependencies": {
|
||||||
"i18n:fix": "find packages -type f -name '*.mdx' -exec sed -i '' -e 's/{\\/_/{\\/*/g' -e 's/_\\/}/\\*\\/}/g' {} +"
|
"langnostic": "^0.0.5"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"prettier": "^2.7.1"
|
"prettier": "^3.5.3",
|
||||||
|
"typescript": "^5.8.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue