diff --git a/src/services/code_block_theme.ts b/src/services/code_block_theme.ts index 9b7e3951c..27f746d33 100644 --- a/src/services/code_block_theme.ts +++ b/src/services/code_block_theme.ts @@ -40,18 +40,19 @@ function readThemesFromFileSystem(path: string): ColorTheme[] { } function groupThemesByLightOrDark(listOfThemes: ColorTheme[]) { - const result: Record = { - 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 = {}; + output[t("code_block.theme_group_light")] = lightThemes; + output[t("code_block.theme_group_dark")] = darkThemes; + return output; } \ No newline at end of file diff --git a/translations/en/server.json b/translations/en/server.json index c5cb1c4f5..3cf55e8f9 100644 --- a/translations/en/server.json +++ b/translations/en/server.json @@ -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" } } diff --git a/translations/ro/server.json b/translations/ro/server.json index 7235ed4fa..cad3bb9a3 100644 --- a/translations/ro/server.json +++ b/translations/ro/server.json @@ -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" } }