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

Translate bootloader #2946

Merged
merged 23 commits into from
Feb 27, 2023
Merged

Translate bootloader #2946

merged 23 commits into from
Feb 27, 2023

Conversation

HThuren
Copy link
Contributor

@HThuren HThuren commented Dec 26, 2022

Translate language shown when Bootloader are active.

Notice: Special chars are not working well at bootloader envoriment, translate without them, ie. ascii only.

@Eldenroot
Copy link
Contributor

I will add CZ translation in 3 days, I am on Christmas holidays and visiting my family

@HThuren
Copy link
Contributor Author

HThuren commented Dec 26, 2022

I will add CZ translation in 3 days, I am on Christmas holidays and visiting my family

Thank you.
Making code are holyday joy for me :-)

@gagarinlg
Copy link
Member

I will add CZ translation in 3 days, I am on Christmas holidays and visiting my family

Thank you. Making code are holyday joy for me :-)

Same here

@robustini
Copy link
Contributor

PR created in your fork.

@HThuren HThuren force-pushed the TranslateBootloader branch from bb63f1e to fbb069e Compare December 27, 2022 12:32
@ulfhedlund
Copy link
Contributor

PR for Swedish translations created in your fork

@TheIsotopes
Copy link
Contributor

PR for DE translation in your fork

@ToshihiroMakuuchi
Copy link
Contributor

Sorry for the delay in working on this.
PR for JP translation in your fork.

@HThuren
Copy link
Contributor Author

HThuren commented Dec 29, 2022

Sorry for the delay in working on this. PR for JP translation in your fork.

No worry at all, thank you for contribute.

By the way, did you notice translation of TR_DISABLE ?

@HThuren
Copy link
Contributor Author

HThuren commented Dec 29, 2022

My mistake, found TR_DISABLE when resolve the code :-)

@HThuren
Copy link
Contributor Author

HThuren commented Jan 1, 2023

Hi @Eldenroot, @zyren and @ajjjjjjjj , maybe you have the option to translate, please :-)

@Eldenroot
Copy link
Contributor

@HThuren - buddy, I have already made a PR many days ago :)

@HThuren
Copy link
Contributor Author

HThuren commented Jan 1, 2023

@HThuren - buddy, I have already made a PR many days ago :)

Gosh, sorry, you did :-)

@ajjjjjjjj
Copy link
Contributor

ajjjjjjjj commented Jan 1, 2023

PL, updated to skip diacritics.

#define TR_DISABLE "Wylaczone"

// Bootloader common
#define TR_BL_USB_CONNECT_BOOT        CENTER "\011USB polaczone"
#define TR_BL_USB_CONNECTED           "USB polaczone"
#define TR_BL_USB_PLUGIN              "lub podlacz kabel USB"
#define TR_BL_USB_MASS_STORE          "dla trybu danych"
#define TR_BL_USB_PLUGIN_MASS_STORE   "lub podlacz kabel USB dla trybu danych"
#define TR_BL_WRITE_FW                "Zapis firmware"
#define TR_BL_FORK                    "Fork:"
#define TR_BL_VERSION                 "Wersja:"
#define TR_BL_RADIO                   "Radio:"
#define TR_BL_EXIT                    "Wyjdz"
#define TR_BL_DIR_MISSING             " Brak katalogu"
#define TR_BL_DIR_EMPTY               " Katalog jest pusty"

#if LCD_W >= 480
  #define TR_BL_INVALID_FIRMWARE       "Nieprawidlowy plik firmware"
#elif LCD_W >= 212
  #define TR_BL_OR_PLUGIN_USB_CABLE    TR_BL_USB_PLUGIN_MASS_STORE
  #define TR_BL_HOLD_ENTER_TO_START    "\012Przytrzymaj [ENT] by zaczac zapis"
  #define TR_BL_INVALID_FIRMWARE       "\011Nieprawidlowy plik firmware!      "
  #define TR_BL_INVALID_EEPROM         "\011Nieprawidlowy plik EEPROM!        "
#else
  #define TR_BL_OR_PLUGIN_USB_CABLE    TR_BL_USB_PLUGIN
  #define TR_BL_HOLD_ENTER_TO_START    "\006Przytrzymaj [ENT] by zaczac"
  #define TR_BL_INVALID_FIRMWARE       "\004011Nieprawidlowy firmware!   "
  #define TR_BL_INVALID_EEPROM         "\004011Nieprawidlowy EEPROM!     "
#endif

#if defined(PCBTARANIS)
   // Bootloader Taranis specific
  #define TR_BL_RESTORE_EEPROM        "Przywroc EEPROM"
  #define TR_BL_WRITING_FW            CENTER "\015Zapis..."
  #define TR_BL_WRITING_COMPL         CENTER "\007Zapis ukonczony"
  #if defined(RADIO_COMMANDO8)
    #define TR_BL_POWER_KEY           "Nacisnij przycisk Power"
    #define TR_BL_FLASH_EXIT          "Wyjdz z trybu flashowania"
  #endif
#elif defined(PCBHORUS)
   // Bootloader Horus specific
  #define TR_BL_WRITING_FW            "Zapis firmware ..."
  #define TR_BL_WRITING_COMPL         "Zapis ukonczony"
  #define TR_BL_SELECT_KEY            "[ENT] aby wybrac plik"
  #define TR_BL_FLASH_KEY             "Przytrzymaj [ENT] aby flashowac"
  #define TR_BL_EXIT_KEY              "[RTN] aby wyjsc"
#elif defined(PCBNV14)
   // Bootloader NV14 specific
  #define TR_BL_WRITING_FW            "Zapis firmware ..."
  #define TR_BL_WRITING_COMPL         "Zapis ukonczony"
  #define TR_BL_RF_USB_ACCESS         "Dostep RF USB"
  #define TR_BL_CURRENT_FW            "Obecny firmware:"
  #define TR_BL_SELECT_KEY            "[R TRIM] aby wybrac plik"
  #define TR_BL_FLASH_KEY             "Przytrzymaj [R TRIM] aby flashowac"
  #define TR_BL_EXIT_KEY              " [L TRIM] aby wyjsc"
#endif

@zyren
Copy link
Contributor

zyren commented Jan 1, 2023


CN

#define TR_DISABLE "禁用"

// Bootloader common
#define TR_BL_USB_CONNECT_BOOT CENTER "\011USB已连接"
#define TR_BL_USB_CONNECTED "USB已连接"
#define TR_BL_USB_PLUGIN "或插入USB电缆"
#define TR_BL_USB_MASS_STORE "作为移动存储"
#define TR_BL_USB_PLUGIN_MASS_STORE "或插入USB电缆作为移动存储"
#define TR_BL_WRITE_FW "写入固件"
#define TR_BL_FORK "代码分支:"
#define TR_BL_VERSION "固件版本:"
#define TR_BL_RADIO "遥控型号:"
#define TR_BL_EXIT "退出"
#define TR_BL_DIR_MISSING "文件夹错误"
#define TR_BL_DIR_EMPTY "空文件夹"

#if LCD_W >= 480
#define TR_BL_INVALID_FIRMWARE "无效的固件文件"
#elif LCD_W >= 212
#define TR_BL_OR_PLUGIN_USB_CABLE TR_BL_USB_PLUGIN_MASS_STORE
#define TR_BL_HOLD_ENTER_TO_START "\012长按 [ENT] 写入固件"
#define TR_BL_INVALID_FIRMWARE "\011无效的固件文件! "
#define TR_BL_INVALID_EEPROM "\011无效的EEPROM文件! "
#else
#define TR_BL_OR_PLUGIN_USB_CABLE TR_BL_USB_PLUGIN
#define TR_BL_HOLD_ENTER_TO_START "\006长按 [ENT] 开始"
#define TR_BL_INVALID_FIRMWARE "\004无效的固件文件! "
#define TR_BL_INVALID_EEPROM "\004无效的EEPROM文件! "
#endif

#if defined(PCBTARANIS)
// Bootloader Taranis specific
#define TR_BL_RESTORE_EEPROM "恢复EEPROM"
#define TR_BL_WRITING_FW CENTER "\015正在写入固件..."
#define TR_BL_WRITING_COMPL CENTER "\007固件写入成功"
#if defined(RADIO_COMMANDO8)
#define TR_BL_POWER_KEY "按下电源键."
#define TR_BL_FLASH_EXIT "退出刷机模式."
#endif
#elif defined(PCBHORUS)
// Bootloader Horus specific
#define TR_BL_WRITING_FW "正在写入固件 ..."
#define TR_BL_WRITING_COMPL "固件写入成功"
#define TR_BL_SELECT_KEY "按 [ENT] 选择文件"
#define TR_BL_FLASH_KEY "长按 [ENT] 写入固件"
#define TR_BL_EXIT_KEY "按 [RTN] 退出"
#elif defined(PCBNV14)
// Bootloader NV14 specific
#define TR_BL_WRITING_FW "写入固件 ..."
#define TR_BL_WRITING_COMPL "写入成功"
#define TR_BL_RF_USB_ACCESS "访问射频USB"
#define TR_BL_CURRENT_FW "当前固件:"
#define TR_BL_SELECT_KEY "右 [TRIM] 选择文件"
#define TR_BL_FLASH_KEY "长按右 [TRIM] 写入固件"
#define TR_BL_EXIT_KEY "按左 [TRIM] 退出"
#endif



TW

#define TR_DISABLE "禁用"

// Bootloader common
#define TR_BL_USB_CONNECT_BOOT CENTER "\011USB已連接"
#define TR_BL_USB_CONNECTED "USB已連接"
#define TR_BL_USB_PLUGIN "或插入USB電纜"
#define TR_BL_USB_MASS_STORE "作為移動存儲"
#define TR_BL_USB_PLUGIN_MASS_STORE "或插入USB電纜作為移動存儲"
#define TR_BL_WRITE_FW "寫入韌軆"
#define TR_BL_FORK "代碼分支:"
#define TR_BL_VERSION "韌軆版本:"
#define TR_BL_RADIO "遙控型號:"
#define TR_BL_EXIT "退出"
#define TR_BL_DIR_MISSING "目錄錯誤"
#define TR_BL_DIR_EMPTY "空目錄"

#if LCD_W >= 480
#define TR_BL_INVALID_FIRMWARE "無效的韌軆文件"
#elif LCD_W >= 212
#define TR_BL_OR_PLUGIN_USB_CABLE TR_BL_USB_PLUGIN_MASS_STORE
#define TR_BL_HOLD_ENTER_TO_START "\012長按 [ENT] 寫入韌軆"
#define TR_BL_INVALID_FIRMWARE "\011無效的韌軆文件! "
#define TR_BL_INVALID_EEPROM "\011無效的EEPROM文件! "
#else
#define TR_BL_OR_PLUGIN_USB_CABLE TR_BL_USB_PLUGIN
#define TR_BL_HOLD_ENTER_TO_START "\006長按 [ENT] 開始"
#define TR_BL_INVALID_FIRMWARE "\004無效的韌軆文件! "
#define TR_BL_INVALID_EEPROM "\004無效的EEPROM文件! "
#endif

#if defined(PCBTARANIS)
// Bootloader Taranis specific
#define TR_BL_RESTORE_EEPROM "恢復EEPROM"
#define TR_BL_WRITING_FW CENTER "\015正在寫入韌軆..."
#define TR_BL_WRITING_COMPL CENTER "\007韌軆寫入成功"
#if defined(RADIO_COMMANDO8)
#define TR_BL_POWER_KEY "按下電源鍵."
#define TR_BL_FLASH_EXIT "退出刷機模式."
#endif
#elif defined(PCBHORUS)
// Bootloader Horus specific
#define TR_BL_WRITING_FW "正在寫入韌軆 ..."
#define TR_BL_WRITING_COMPL "韌軆寫入成功"
#define TR_BL_SELECT_KEY "按 [ENT] 選擇文件"
#define TR_BL_FLASH_KEY "長按 [ENT] 寫入韌軆"
#define TR_BL_EXIT_KEY "按 [RTN] 退出"
#elif defined(PCBNV14)
// Bootloader NV14 specific
#define TR_BL_WRITING_FW "寫入韌軆 ..."
#define TR_BL_WRITING_COMPL "寫入成功"
#define TR_BL_RF_USB_ACCESS "訪問射頻USB"
#define TR_BL_CURRENT_FW "當前韌軆:"
#define TR_BL_SELECT_KEY "右 [TRIM] 選擇文件"
#define TR_BL_FLASH_KEY "長按右 [TRIM] 寫入韌軆"
#define TR_BL_EXIT_KEY "按左 [TRIM] 退出"
#endif


@HThuren
Copy link
Contributor Author

HThuren commented Jan 1, 2023

hi @pfeerick , happy newyear :-)
ready to merge

@gagarinlg
Copy link
Member

Do the east asian versions fit into the flash and is the font file included in the bootloader builds?

@HThuren
Copy link
Contributor Author

HThuren commented Jan 1, 2023

Do the east asian versions fit into the flash and is the font file included in the bootloader builds?

Not sure what you ask for, but no change to font file, there you might have a point.
I make some test

@HThuren
Copy link
Contributor Author

HThuren commented Jan 1, 2023

Do the east asian versions fit into the flash and is the font file included in the bootloader builds?

I did the notice in top of PR: Notice: Special chars are not working well at bootloader envoriment, translate without them.
But forget it regarding the asian translation. I make a rollback of them. So sorry to @zyren and @ToshihiroMakuuchi for wasted work.
But also @ajjjjjjjj and @gagarinlg must consider not to use national chars. DA and SE translation are well.

@ajjjjjjjj
Copy link
Contributor

@HThuren, updated.

@HThuren
Copy link
Contributor Author

HThuren commented Jan 1, 2023

updated to skip diacritics

Very fast response, thank you, :-)

@Eldenroot
Copy link
Contributor

Eldenroot commented Jan 1, 2023

CZ is fine? I have tried to not use special symbols... but sometimes it is not possible, there is no other similar word.

HThuren added 11 commits January 1, 2023 23:17
Fix enable / disable at nv14 bootloader
Fix enable / disable at nv14 bootloader
Fix enable / disable at nv14 bootloader
Fix enable / disable at nv14 bootloader
Fix enable / disable at nv14 bootloader
Fix enable / disable at nv14 bootloader
Fix enable / disable at nv14 bootloader
Only use of Ascii in bootloader
Fix enable / disable at nv14 bootloader
Fix enable / disable at nv14 bootloader
Fix enable / disable at nv14 bootloader
Fix enable / disable at nv14 bootloader
Only use of Ascii in bootloader
@HThuren
Copy link
Contributor Author

HThuren commented Jan 2, 2023

Right, now the bootloader messages are prefered in ascii, and some mix with TR_ENABLE - as used and to be translated - are removed from all *.h translationsfiles. Now 2 new define TR_BL_ENABLE and TR_BL_DISABLE and to be kept in ascii.
Sorry to CN, TW and JP translators, not possible to translate to non ascii in bootloader envoriment.
I belive the PR are ready to merge now.

@HThuren
Copy link
Contributor Author

HThuren commented Jan 15, 2023

hi @pfeerick , nice you are back here :-), are you ready to merge this one, will be nice to get it done.

@HThuren
Copy link
Contributor Author

HThuren commented Jan 18, 2023

Hi @gagarinlg, @Eldenroot and @pfeerick do you think this PR are ready to merge, or you maybe will review and comment ?

@Eldenroot
Copy link
Contributor

I am fine - CZE lang.

If anything I create a new PR, but for now it seems fine :), thank you!

@HThuren
Copy link
Contributor Author

HThuren commented Jan 21, 2023

Hi @pfeerick, I am worried about this 4 week old PR will seperate too much with the change in every language file, from the aftercomming changes.
Any chance to have this PR merged ? Anything I can do to help ?

@pfeerick
Copy link
Member

pfeerick commented Feb 20, 2023

I've been mostly holding off on this PR until 2.8.1 was finally out of the way, and some other necessary changes in main which free up flash space, as I don't know how impact this will have on firmware build sizes (particularly an issue for the radios like X9D which are close to the limit - and actually were OVER that in 2.8.0 😮). I'll be reviewing this PR in the next few days to see what the implications are, as well as clearing up the PT conflict (minor - single line change).

@pfeerick pfeerick added this to the 2.9 milestone Feb 20, 2023
@pfeerick pfeerick self-assigned this Feb 20, 2023
@HThuren
Copy link
Contributor Author

HThuren commented Feb 20, 2023

I've been mostly holding off on this PR until 2.8.1 was finally out of the way, and some other necessary changes in main which free up flash space, as I don't know how impact this will have on firmware build sizes (particularly an issue for the radios like X9D which are close to the limit - and actually were OVER that in 2.8.0 😮). I'll be reviewing this PR in the next few days to see what the implications are, as well as clearing up the PT conflict (minor - single line change).

Very to understand, in fact I din not use the const char STRxx[]=TR_xx; and made the reference to STRxx just to not increase size in firmware. Look forward to your review :-)

@pfeerick
Copy link
Member

All languages still build with this PR, and in fact, wit hthe worst case x9dp-CZ build, it seems like this actually brought the size down slightly from the current main build (which would have had an EN bootloader)... (and yes, I know, .text isn't the only metric to look at, but it is the most revealing in this instance... 16 bytes smaller firmware file for x9dp TW isn't so exciting 😆 ).

main vs this PR
image

In contrast, TX16S went up slightly, but we have space to play with there.
main vs this PR
image

@pfeerick pfeerick merged commit d927a8d into EdgeTX:main Feb 27, 2023
@HThuren HThuren deleted the TranslateBootloader branch February 27, 2023 16:41
pfeerick added a commit that referenced this pull request Jun 24, 2023
pfeerick added a commit that referenced this pull request Jun 26, 2023
* fix: Bootloader "USB Connected" alignment
Fixup from #2946

* fix: Different for colorlcd and b&w

* fix: Lets do this properly
Thanks @3djc for the hint to go to bed 😆

* fix: trim `edgetx-` in smaller b&w screens
pfeerick added a commit that referenced this pull request Jun 26, 2023
* fix: Bootloader "USB Connected" alignment
Fixup from #2946

* fix: Different for colorlcd and b&w

* fix: Lets do this properly
Thanks @3djc for the hint to go to bed 😆

* fix: trim `edgetx-` in smaller b&w screens
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants