Add chinese translation

Based on https://github.com/dyxang/Fantasy-Map-Generator-Chinese
This commit is contained in:
Blipz 2026-03-28 04:59:26 +01:00
parent 7eeb1f76c3
commit c5f1577c4b
12 changed files with 3359 additions and 980 deletions

View file

@ -234,10 +234,10 @@
.icon-temperature-low:before {content:'\f76b';} /* '' */
/* Amended FA icons */
.icon-sort-name-up:after {font-size:.9em;content:'\f15d';}
.icon-sort-name-down:after {font-size:.9em;content:'\f15e';}
.icon-sort-number-up:after {font-size:.9em;content:'\f162';}
.icon-sort-number-down:after {font-size:.9em;content:'\f163';}
.icon-sort-name-up:after {font-size:.9em;content:'\00a0\f15d';}
.icon-sort-name-down:after {font-size:.9em;content:'\00a0\f15e';}
.icon-sort-number-up:after {font-size:.9em;content:'\00a0\f162';}
.icon-sort-number-down:after {font-size:.9em;content:'\00a0\f163';}
/* Custom icons */
.icon-w:before {font-style:italic;content:'w:';}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

1620
public/locales/zh/lang.json Normal file

File diff suppressed because it is too large Load diff

View file

@ -523,8 +523,8 @@ function applyStoredOptions() {
if (stored("tooltipSize")) changeTooltipSize(stored("tooltipSize"));
if (stored("regions")) changeStatesNumber(stored("regions"));
if (stored("language")) changeLanguage(stored("language"));
else changeLanguage("en");
if (stored("language")) setLanguage(stored("language"));
else setLanguage("en");
uiSize.max = uiSize.max = getUImaxSize();
if (stored("uiSize")) changeUiSize(+stored("uiSize"));
@ -659,10 +659,15 @@ function changeEra() {
options.era = eraInput.value;
}
function changeLanguage(value) {
function setLanguage(value) {
options.language = value;
}
function changeLanguage(value) {
setLanguage(value);
changeLocale();
}
async function openTemplateSelectionDialog() {
const HeightmapSelectionDialog = await import("../dynamic/heightmap-selection.js?v=1.96.00");
HeightmapSelectionDialog.open();