Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

fix(web): show language names without region in the locale picker

Andrej554004305d70
diff --git a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx
index a1a462e8d..9e83a950e 100644
--- a/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx
+++ b/apps/web/src/routes/_layout/_authenticated/dashboard/settings/account/preferences.tsx
@@ -37,19 +37,7 @@ function getLocaleLabel(locale: AppLocale) {
const languageDisplayNames = new Intl.DisplayNames([locale], {
type: "language",
});
- const regionDisplayNames = new Intl.DisplayNames([locale], {
- type: "region",
- });
- const languageLabel = languageDisplayNames.of(localeObj.language) ?? locale;
-
- if (!localeObj.region) {
- return languageLabel;
- }
-
- const regionLabel =
- regionDisplayNames.of(localeObj.region) ?? localeObj.region;
-
- return `${languageLabel} (${regionLabel})`;
+ return languageDisplayNames.of(localeObj.language) ?? locale;
} catch {
return locale;
}