Skip to content

Commit

Permalink
feat(lld/llm): add support to new device language packs
Browse files Browse the repository at this point in the history
  • Loading branch information
ofreyssinet-ledger committed Oct 3, 2024
1 parent 8dae31f commit f249d59
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 10 deletions.
7 changes: 7 additions & 0 deletions .changeset/big-apples-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@ledgerhq/types-live": patch
"ledger-live-desktop": patch
"live-mobile": patch
---

Add support to new language packs: de, pt-br, ru, tr
8 changes: 4 additions & 4 deletions apps/ledger-live-desktop/src/config/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const Languages = {
label: "Deutsch",
locales: buildLocales(LanguageLocaleIds.de),

deviceSupport: undefined,
deviceSupport: { label: "german", id: languageIds.german },
},
ja: {
id: "ja",
Expand All @@ -113,21 +113,21 @@ export const Languages = {
label: "Português (Brasil)",
locales: buildLocales(LanguageLocaleIds.pt),

deviceSupport: undefined,
deviceSupport: { label: "brazilian", id: languageIds.brazilian },
},
ru: {
id: "ru",
label: "Русский",
locales: buildLocales(LanguageLocaleIds.ru),

deviceSupport: undefined,
deviceSupport: { label: "russian", id: languageIds.russian },
},
tr: {
id: "tr",
label: "Türkçe",
locales: buildLocales(LanguageLocaleIds.tr),

deviceSupport: undefined,
deviceSupport: { label: "turkish", id: languageIds.turkish },
},
zh: {
id: "zh",
Expand Down
8 changes: 6 additions & 2 deletions apps/ledger-live-desktop/static/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2408,8 +2408,12 @@
"installingLanguage": "Installing language",
"languages": {
"english": "English",
"french": "French",
"spanish": "Spanish"
"french": "Français",
"spanish": "Español",
"german": "Deutsch",
"brazilian": "Português (Br)",
"russian": "Русский",
"turkish": "Türkçe"
}
},
"distribution": {
Expand Down
4 changes: 4 additions & 0 deletions apps/ledger-live-mobile/src/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ export const localeIdToDeviceLanguage: { [key in Locale]?: Language } = {
en: "english",
fr: "french",
es: "spanish",
pt: "brazilian",
ru: "russian",
de: "german",
tr: "turkish",
};

/**
Expand Down
10 changes: 7 additions & 3 deletions apps/ledger-live-mobile/src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4507,7 +4507,7 @@
"tr": "Türk",
"ja": "日本",
"ko": "한국인",
"pt": "Português"
"pt": "Português (Br)"
}
},
"deviceLocalization": {
Expand All @@ -4526,8 +4526,12 @@
"installingLanguage": "Installing language",
"languages": {
"english": "English",
"french": "French",
"spanish": "Spanish"
"french": "Français",
"spanish": "Español",
"german": "Deutsch",
"brazilian": "Português (Br)",
"russian": "Русский",
"turkish": "Türkçe"
}
},
"FirmwareUpdateCheckId": {
Expand Down
17 changes: 16 additions & 1 deletion libs/ledgerjs/packages/types-live/src/languages.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
export type Language = "french" | "english" | "spanish";
export type Language =
| "french"
| "english"
| "spanish"
| "brazilian"
| "german"
| "russian"
| "turkish";

export type LanguagePackage = {
language: Language;
Expand All @@ -24,6 +31,10 @@ export const languageIds: { [key in Language]: number } = {
english: 0x00,
french: 0x01,
spanish: 0x02,
brazilian: 0x03,
german: 0x04,
russian: 0x05,
turkish: 0x06,
};

export const idsToLanguage: {
Expand All @@ -32,4 +43,8 @@ export const idsToLanguage: {
0x00: "english",
0x01: "french",
0x02: "spanish",
0x03: "brazilian",
0x04: "german",
0x05: "russian",
0x06: "turkish",
};

0 comments on commit f249d59

Please sign in to comment.