mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 02:52:27 +08:00
client: Translate dark/light color theme groups
This commit is contained in:
parent
ae60f8c842
commit
cc0b3db424
@ -40,18 +40,19 @@ function readThemesFromFileSystem(path: string): ColorTheme[] {
|
||||
}
|
||||
|
||||
function groupThemesByLightOrDark(listOfThemes: ColorTheme[]) {
|
||||
const result: Record<string, ColorTheme[]> = {
|
||||
light: [],
|
||||
dark: []
|
||||
};
|
||||
const darkThemes = [];
|
||||
const lightThemes = [];
|
||||
|
||||
for (const theme of listOfThemes) {
|
||||
if (theme.title.includes("Dark")) {
|
||||
result.dark.push(theme);
|
||||
darkThemes.push(theme);
|
||||
} 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:"
|
||||
},
|
||||
"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:"
|
||||
},
|
||||
"code_block": {
|
||||
"theme_none": "Niciuna"
|
||||
"theme_none": "Niciuna",
|
||||
"theme_group_dark": "Teme întunecate",
|
||||
"theme_group_light": "Teme luminoase"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user