mirror of
https://github.com/zadam/trilium.git
synced 2025-11-05 04:45:47 +01:00
client: Translate dark/light color theme groups
This commit is contained in:
@@ -40,18 +40,19 @@ function readThemesFromFileSystem(path: string): ColorTheme[] {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function groupThemesByLightOrDark(listOfThemes: ColorTheme[]) {
|
function groupThemesByLightOrDark(listOfThemes: ColorTheme[]) {
|
||||||
const result: Record<string, ColorTheme[]> = {
|
const darkThemes = [];
|
||||||
light: [],
|
const lightThemes = [];
|
||||||
dark: []
|
|
||||||
};
|
|
||||||
|
|
||||||
for (const theme of listOfThemes) {
|
for (const theme of listOfThemes) {
|
||||||
if (theme.title.includes("Dark")) {
|
if (theme.title.includes("Dark")) {
|
||||||
result.dark.push(theme);
|
darkThemes.push(theme);
|
||||||
} else {
|
} else {
|
||||||
result.light.push(theme);
|
lightThemes.push(theme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
const output: Record<string, ColorTheme[]> = {};
|
||||||
|
output[t("code_block.theme_group_light")] = lightThemes;
|
||||||
|
output[t("code_block.theme_group_dark")] = darkThemes;
|
||||||
|
return output;
|
||||||
}
|
}
|
||||||
@@ -185,6 +185,8 @@
|
|||||||
"search_prefix": "Search:"
|
"search_prefix": "Search:"
|
||||||
},
|
},
|
||||||
"code_block": {
|
"code_block": {
|
||||||
"theme_none": "None"
|
"theme_none": "None",
|
||||||
|
"theme_group_light": "Light themes",
|
||||||
|
"theme_group_dark": "Dark themes"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,6 +185,8 @@
|
|||||||
"search_prefix": "Căutare:"
|
"search_prefix": "Căutare:"
|
||||||
},
|
},
|
||||||
"code_block": {
|
"code_block": {
|
||||||
"theme_none": "Niciuna"
|
"theme_none": "Niciuna",
|
||||||
|
"theme_group_dark": "Teme întunecate",
|
||||||
|
"theme_group_light": "Teme luminoase"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user