mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-04-04 22:47:23 +02:00
Add chinese translation
Based on https://github.com/dyxang/Fantasy-Map-Generator-Chinese
This commit is contained in:
parent
7eeb1f76c3
commit
c5f1577c4b
12 changed files with 3359 additions and 980 deletions
|
|
@ -8,7 +8,7 @@ const HTMLPlugin: Plugin = {
|
|||
const content = await readFile("src/index.html", "utf-8");
|
||||
const matches = content.matchAll(/data-(?:html|text|tip)="([^"]+)"/g);
|
||||
for (const match of matches) {
|
||||
const key = match[1];
|
||||
const key = match[1].replace(/"/g, '"');
|
||||
keys.set(key, {key, defaultValue: key});
|
||||
}
|
||||
}
|
||||
|
|
@ -17,13 +17,15 @@ const HTMLPlugin: Plugin = {
|
|||
export default defineConfig({
|
||||
locales: [
|
||||
"en",
|
||||
"fr"
|
||||
"fr",
|
||||
"zh"
|
||||
],
|
||||
extract: {
|
||||
input: "src/**/*.{js,ts}",
|
||||
output: "public/locales/{{language}}/{{namespace}}.json",
|
||||
defaultNS: "lang",
|
||||
keySeparator: false
|
||||
keySeparator: "::",
|
||||
nsSeparator: false,
|
||||
},
|
||||
plugins: [
|
||||
HTMLPlugin
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue