Skip to content

Commit 9232d83

Browse files
committed
docs: update readme language code list
1 parent b29aaf5 commit 9232d83

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

README-summary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
### Lots of configurable layout and user experience improvements for YouTube Music™ and YouTube™
66

7-
<h4>Available in these languages: <abbr title="Chinese (Simplified, China)">🇨🇳&nbsp;CN</abbr>, <abbr title="English (Great Britain)">🇬🇧&nbsp;GB</abbr>, <abbr title="English (United States)">🇺🇸&nbsp;US</abbr>, <abbr title="French (France)">🇫🇷&nbsp;FR</abbr>, <abbr title="German (Germany)">🇩🇪&nbsp;DE</abbr>, <abbr title="Hindi (India)">🇮🇳&nbsp;IN</abbr>, <abbr title="Japanese (Japan)">🇯🇵&nbsp;JP</abbr>, <abbr title="Portuguese (Brazil)">🇧🇷&nbsp;BR</abbr>, <abbr title="Spanish (Spain)">🇪🇸&nbsp;ES</abbr></h4>
7+
<h4>With translations for: <abbr title="Portuguese (Brazil)">🇧🇷&nbsp;BR</abbr>, <abbr title="Chinese (Simplified, China)">🇨🇳&nbsp;CN</abbr>, <abbr title="German (Germany)">🇩🇪&nbsp;DE</abbr>, <abbr title="Spanish (Spain)">🇪🇸&nbsp;ES</abbr>, <abbr title="French (France)">🇫🇷&nbsp;FR</abbr>, <abbr title="Hindi (India)">🇮🇳&nbsp;IN</abbr>, <abbr title="Japanese (Japan)">🇯🇵&nbsp;JP</abbr></h4>
88

99
---
1010
#### [**Features**](#features)[**Installation**](#installation)[**Integrations**](#integrations)[**Plugins**](#plugins)[**Support**](#support)[**Privacy**](#privacy)[**Development**](#development)[**Attributions**](#attributions)[**Disclaimers**](#disclaimers)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
### Lots of configurable layout and user experience improvements for YouTube Music™ and YouTube™
77

8-
<h4>Available in these languages: <abbr title="Chinese (Simplified, China)">🇨🇳&nbsp;CN</abbr>, <abbr title="English (Great Britain)">🇬🇧&nbsp;GB</abbr>, <abbr title="English (United States)">🇺🇸&nbsp;US</abbr>, <abbr title="French (France)">🇫🇷&nbsp;FR</abbr>, <abbr title="German (Germany)">🇩🇪&nbsp;DE</abbr>, <abbr title="Hindi (India)">🇮🇳&nbsp;IN</abbr>, <abbr title="Japanese (Japan)">🇯🇵&nbsp;JP</abbr>, <abbr title="Portuguese (Brazil)">🇧🇷&nbsp;BR</abbr>, <abbr title="Spanish (Spain)">🇪🇸&nbsp;ES</abbr></h4>
8+
<h4>With translations for: <abbr title="Portuguese (Brazil)">🇧🇷&nbsp;BR</abbr>, <abbr title="Chinese (Simplified, China)">🇨🇳&nbsp;CN</abbr>, <abbr title="German (Germany)">🇩🇪&nbsp;DE</abbr>, <abbr title="Spanish (Spain)">🇪🇸&nbsp;ES</abbr>, <abbr title="French (France)">🇫🇷&nbsp;FR</abbr>, <abbr title="Hindi (India)">🇮🇳&nbsp;IN</abbr>, <abbr title="Japanese (Japan)">🇯🇵&nbsp;JP</abbr></h4>
99

1010
---
1111
#### [**Features**](#features)[**Installation**](#installation)[**Integrations**](#integrations)[**Plugins**](#plugins)[**Support**](#support)[**Privacy**](#privacy)[**Development**](#development)[**Attributions**](#attributions)[**Disclaimers**](#disclaimers)

src/tools/gen-readme.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ async function modifyReadme(readmeLines: string[], changes: Record<string, () =>
8787
}
8888

8989
async function genHeader() {
90-
const langStr = [ ...Object.entries(locales) ]
91-
.sort(([, a], [, b]) => a.nameEnglish.localeCompare(b.nameEnglish))
90+
const trimCode = (code: string) => code.split("-")[1].toUpperCase();
91+
const langStr = [...Object.entries(locales)]
92+
.filter(([c]) => !c.startsWith("en"))
93+
.sort(([a], [b]) => trimCode(a).localeCompare(trimCode(b)))
9294
.reduce((acc, [locale, { emoji, nameEnglish }], i) => {
9395
const countryCode = locale.split("-")[1];
9496
return `${acc}${i > 0 ? ", " : ""}<abbr title="${nameEnglish}">${emoji}&nbsp;${countryCode}</abbr>`;
@@ -99,7 +101,7 @@ async function genHeader() {
99101
100102
### ${pkgJson.description}
101103
102-
<h4>Available in these languages: ${langStr}</h4>
104+
<h4>With translations for: ${langStr}</h4>
103105
104106
---
105107
#### [**Features**](#features) • [**Installation**](#installation) • [**Integrations**](#integrations) • [**Plugins**](#plugins) • [**Support**](#support) • [**Privacy**](#privacy) • [**Development**](#development) • [**Attributions**](#attributions) • [**Disclaimers**](#disclaimers)\

0 commit comments

Comments
 (0)