Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: New release v5.11.1 #1383

Merged
merged 10 commits into from
Aug 24, 2024
1 change: 0 additions & 1 deletion app/renderer/css/preference.css
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,6 @@ input.toggle-round:checked + label::after {
text-align: center;
color: rgb(255 255 255 / 100%);
background: rgb(78 191 172 / 100%);
border-color: none;
border: none;
width: 98%;
height: 46px;
Expand Down
32 changes: 14 additions & 18 deletions app/renderer/js/pages/preference/general-section.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import process from "node:process";
import * as remote from "@electron/remote";
import {app, dialog, session} from "@electron/remote";
import Tagify from "@yaireo/tagify";
import ISO6391 from "iso-639-1";
import {z} from "zod";

import supportedLocales from "../../../../../public/translations/supported-locales.json";
Expand Down Expand Up @@ -619,26 +618,23 @@ export function initGeneralSection({$root}: GeneralSectionProperties): void {
).availableSpellCheckerLanguages;
let languagePairs = new Map<string, string>();
for (const l of availableLanguages) {
if (ISO6391.validate(l)) {
languagePairs.set(ISO6391.getName(l), l);
}
const locale = new Intl.Locale(l.replaceAll("_", "-"));
let displayName = new Intl.DisplayNames([locale], {
type: "language",
}).of(locale.language);
if (displayName === undefined) continue;
displayName = displayName.replace(/^./u, (firstChar) =>
firstChar.toLocaleUpperCase(locale),
);
if (locale.script !== undefined)
displayName += ` (${new Intl.DisplayNames([locale], {type: "script"}).of(locale.script)})`;
if (locale.region !== undefined)
displayName += ` (${new Intl.DisplayNames([locale], {type: "region"}).of(locale.region)})`;
languagePairs.set(displayName, l);
}

// Manually set names for languages not available in ISO6391
languagePairs.set("English (AU)", "en-AU");
languagePairs.set("English (CA)", "en-CA");
languagePairs.set("English (GB)", "en-GB");
languagePairs.set("English (US)", "en-US");
languagePairs.set("Spanish (Latin America)", "es-419");
languagePairs.set("Spanish (Argentina)", "es-AR");
languagePairs.set("Spanish (Mexico)", "es-MX");
languagePairs.set("Spanish (US)", "es-US");
languagePairs.set("Portuguese (Brazil)", "pt-BR");
languagePairs.set("Portuguese (Portugal)", "pt-PT");
languagePairs.set("Serbo-Croatian", "sh");

languagePairs = new Map(
[...languagePairs].sort((a, b) => (a[0] < b[0] ? -1 : 1)),
[...languagePairs].sort((a, b) => a[0].localeCompare(b[1])),
);

const tagField: HTMLInputElement = $root.querySelector(
Expand Down
10 changes: 10 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to the Zulip desktop app are documented in this file.

### v5.11.1 --2024-08-23

**Enhancements**:

- Updated translations.

**Dependencies**:

- Upgraded all dependencies, including Electron 32.0.1.

### v5.11.0 --2024-03-22

**Fixes**:
Expand Down
Loading