client: Translate dark/light color theme groups

This commit is contained in:
Elian Doran 2024-10-31 21:00:48 +02:00
parent ae60f8c842
commit cc0b3db424
No known key found for this signature in database
3 changed files with 14 additions and 9 deletions

View File

@ -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;
}

View File

@ -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"
}
}

View File

@ -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"
}
}