1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-15 20:35:14 +03:00

feat: Hebrew radio translation 🇮🇱 (#3506)

* Hebrew radio translation 🇮🇱

* chore: loop in alphabetical order

* Replace Arial with Arimo

* Add "he" to companion settings
This commit is contained in:
Stav Raviv 2023-05-13 20:36:53 -07:00 committed by GitHub
parent bd14c83b6a
commit dd64aaef2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 58669 additions and 4 deletions

View file

@ -105,6 +105,7 @@ class OpenTxFirmware: public Firmware
addLanguage("es");
addLanguage("fi");
addLanguage("fr");
addLanguage("he");
addLanguage("hu");
addLanguage("it");
addLanguage("jp");

View file

@ -2,7 +2,7 @@ include(CMakeForceCompiler)
include(Bitmaps)
set(PCB_TYPES X9LITE X9LITES X7 XLITE XLITES X9D X9D+ X9E X10 X12S NV14)
set(RADIO_LANGUAGES CN CZ DA DE EN ES FI FR IT JP PT SK SE PL HU NL TW)
set(RADIO_LANGUAGES CN CZ DA DE EN ES FI FR HE IT JP PT SK SE PL HU NL TW)
set(TTS_LANGUAGES CN CZ DA DE EN ES FR HE IT JP PT SK SE PL HU NL RU)
set(PCB "X9D+" CACHE STRING "Radio type, one of: ${PCB_TYPES}")
@ -145,6 +145,13 @@ foreach(LANGUAGE ${RADIO_LANGUAGES})
endif()
endforeach()
set(RTL_LANGUAGES HE)
if(TRANSLATIONS IN_LIST RTL_LANGUAGES)
add_definitions(-DTRANSLATION_IS_RTL=1)
else()
add_definitions(-DTRANSLATION_IS_RTL=0)
endif()
set(SRC ${SRC} debug.cpp)
add_definitions(-DFLAVOUR="${FLAVOUR}")

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -26,6 +26,8 @@ JP_Katakana="0x30A0-0x30FF"
JP_Kanji="0x4e00,0x4e0a,0x4e0b,0x4e0d,0x4e21,0x4e2d,0x4e57,0x4e86,0x4e88,0x4ed6,0x4ed8,0x4ef6,0x4efb,0x4f4d,0x4f4e,0x4f53,0x4f5c,0x4f7f,0x4fdd,0x4fe1,0x4fee,0x500d,0x5024,0x504f,0x505c,0x5099,0x50cf,0x5143,0x5145,0x5165,0x5168,0x516c,0x5171,0x5185,0x518d,0x51fa,0x5206,0x521d,0x5225,0x5229,0x524a,0x524d,0x5272,0x529b,0x529f,0x52a0,0x52b9,0x52d5,0x5316,0x5358,0x53bb,0x53d7,0x53f7,0x5408,0x540c,0x540d,0x5411,0x5426,0x542b,0x544a,0x5468,0x554f,0x5668,0x56de,0x56f2,0x56fa,0x5727,0x5728,0x5747,0x57cb,0x5831,0x5857,0x5897,0x58f0,0x5909,0x5916,0x591a,0x5927,0x592e,0x5931,0x5968,0x5b58,0x5b8c,0x5b9a,0x5b9f,0x5bb9,0x5bfe,0x5c0f,0x5c11,0x5dee,0x5e38,0x5e73,0x5ea6,0x5ea7,0x5ef6,0x5f0f,0x5f31,0x5f35,0x5f37,0x5f53,0x5f62,0x5f71,0x5f85,0x5f8c,0x5fa9,0x5fae,0x5fc5,0x5fdc,0x60c5,0x60f3,0x610f,0x614b,0x6210,0x624b,0x629e,0x62bc,0x62d2,0x62e1,0x6301,0x633f,0x63a5,0x63a8,0x63db,0x64cd,0x6539,0x6557,0x6570,0x6574,0x6587,0x65b0,0x65b9,0x65e2,0x65e5,0x660e,0x6642,0x666f,0x66f4,0x66f8,0x6700,0x6709,0x671f,0x672a,0x672b,0x672c,0x6761,0x67a0,0x683c,0x691c,0x6975,0x6982,0x69cb,0x6a19,0x6a5f,0x6b62,0x6b63,0x6b8b,0x6bce,0x6bd4,0x6c17,0x6c60,0x6cd5,0x6ce2,0x6d41,0x6d88,0x6e1b,0x6e29,0x6e90,0x6e96,0x6f14,0x6f70,0x7121,0x72b6,0x7387,0x73fe,0x7406,0x751f,0x7528,0x753b,0x756a,0x767b,0x7740,0x78ba,0x793a,0x7981,0x79d2,0x79f0,0x79fb,0x7a7a,0x7aef,0x7b2c,0x7b54,0x7b97,0x7bc4,0x7cbe,0x7d20,0x7d22,0x7d30,0x7d42,0x7d4c,0x7d71,0x7d9a,0x7dd1,0x7dda,0x7de8,0x7def,0x7e70,0x7f6e,0x7fa4,0x8003,0x8005,0x80cc,0x80fd,0x81ea,0x826f,0x8272,0x8535,0x884c,0x8868,0x8870,0x88c5,0x88fd,0x8907,0x8981,0x898b,0x898f,0x8996,0x89e3,0x8a00,0x8a08,0x8a18,0x8a2d,0x8a3c,0x8a72,0x8a73,0x8a8d,0x8a9e,0x8aac,0x8aad,0x8abf,0x8ad6,0x8b58,0x8b66,0x8cbb,0x8cbc,0x8d64,0x8d77,0x8ddd,0x8ef8,0x8f03,0x8f1d,0x8fbc,0x8fd4,0x8ffd,0x9001,0x901f,0x9020,0x9045,0x904e,0x9069,0x9078,0x90e8,0x91cf,0x9332,0x9577,0x958b,0x9593,0x9664,0x96c6,0x96e2,0x96fb,0x9752,0x975e,0x9762,0x97f3,0x984c,0x98db,0x9ad8"
JP_SYMBOLS="${JP_Hiragana},${JP_Katakana},${JP_Kanji}"
HE_SYMBOLS="0x05D0-0x05F4"
# https://yeun.github.io/open-arrow/
ARROWS_FONT="EdgeTX/OpenArrow-Regular.woff"
# 0x80: right, 0x81: left, 0x82: up, 0x83: down
@ -110,3 +112,4 @@ make_bootloader_font "roboto_bl" "Roboto/Roboto-Regular.ttf" 16
make_font_set "noto_tw" "Noto/NotoSansCJKsc-Regular.otf" "Noto/NotoSansCJKsc-Bold.otf" ",${TW_SYMBOLS}"
make_font_set "noto_cn" "Noto/NotoSansCJKsc-Regular.otf" "Noto/NotoSansCJKsc-Bold.otf" ",${CN_SYMBOLS}"
make_font_set "noto_jp" "Noto/NotoSansCJKsc-Regular.otf" "Noto/NotoSansCJKsc-Bold.otf" ",${JP_SYMBOLS}"
make_font_set "arimo_he" "Arimo/Arimo-Regular.ttf" "Arimo/Arimo-Bold.ttf" ",${HE_SYMBOLS}"

View file

@ -41,6 +41,8 @@
FONT_TABLE(noto_tw);
#elif defined(TRANSLATIONS_JP)
FONT_TABLE(noto_jp);
#elif defined(TRANSLATIONS_HE)
FONT_TABLE(arimo_he);
#else
FONT_TABLE(roboto);
#endif

View file

@ -379,7 +379,7 @@
/*Demonstrate special features*/
#define LV_FONT_MONTSERRAT_12_SUBPX 0
#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, Persian letters and all their forms*/
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW TRANSLATION_IS_RTL /*Hebrew, Arabic, Persian letters and all their forms*/
#define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/
/*Pixel perfect monospace fonts*/
@ -440,6 +440,22 @@
/*Always set a default font*/
#define LV_FONT_DEFAULT &lv_font_noto_jp_16
#elif defined(TRANSLATIONS_HE)
#define LV_FONT_CUSTOM_DECLARE \
LV_FONT_DECLARE(lv_font_arimo_he_9) \
LV_FONT_DECLARE(lv_font_arimo_he_13) \
LV_FONT_DECLARE(lv_font_arimo_he_16) \
LV_FONT_DECLARE(lv_font_arimo_he_17) \
LV_FONT_DECLARE(lv_font_arimo_he_24) \
LV_FONT_DECLARE(lv_font_arimo_he_64) \
LV_FONT_DECLARE(lv_font_arimo_he_bold_16) \
LV_FONT_DECLARE(lv_font_arimo_he_bold_17) \
LV_FONT_DECLARE(lv_font_arimo_he_bold_32) \
LV_FONT_DECLARE(lv_font_arimo_he_bold_64)
/*Always set a default font*/
#define LV_FONT_DEFAULT &lv_font_arimo_he_16
#else
#define LV_FONT_CUSTOM_DECLARE \
LV_FONT_DECLARE(lv_font_roboto_9) \
@ -511,7 +527,7 @@
/*Support bidirectional texts. Allows mixing Left-to-Right and Right-to-Left texts.
*The direction will be processed according to the Unicode Bidirectional Algorithm:
*https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
#define LV_USE_BIDI 0
#define LV_USE_BIDI TRANSLATION_IS_RTL
#if LV_USE_BIDI
/*Set the default direction. Supported values:
*`LV_BASE_DIR_LTR` Left-to-Right

View file

@ -68,6 +68,9 @@
#elif defined(TRANSLATIONS_JP)
#include "translations/jp.h"
#define LEN_SPECIAL_CHARS 0
#elif defined(TRANSLATIONS_HE)
#include "translations/he.h"
#define LEN_SPECIAL_CHARS 0
#else
#include "translations/en.h"
#define LEN_SPECIAL_CHARS 0

1286
radio/src/translations/he.h Normal file

File diff suppressed because it is too large Load diff

View file

@ -15,7 +15,7 @@ def is_special_char(c):
def get_special_chars():
result = {}
for lang in["en", "fr", "da", "de", "cz", "nl", "es", "fi", "it", "pl", "pt", "se", "cn", "tw", "jp"]:
for lang in["cn", "cz", "da", "de", "en", "es", "fi", "fr", "he", "it", "jp", "nl", "pl", "pt", "se", "tw"]:
charset = set()
tools_path = os.path.dirname(os.path.realpath(__file__))
with open(os.path.join(tools_path, "../radio/src/translations/%s.h" % lang), encoding='utf-8') as f: