Betaflight-configurator: Error on displaying korean language at "firmware update"

Created on 15 Apr 2019  ยท  15Comments  ยท  Source: betaflight/betaflight-configurator

It is OK when the application is started.
1

But, if you click on the firmware update icon, the string is changed as shown below.
2

I tested on windows10(x64).

Most helpful comment

I can change the code. Give me some time and I will push an update. It has no sense to change the text for the same text when active.

All 15 comments

I will fix it for the next version. Thanks!

@elin-neo: We are using Crowdin (https://crowdin.com/project/betaflight-configurator) to maintain the translations for the configurator. Feel free to register on the platform and join the project if you want to help us maintain the Korean translation.

Looking at Crowdin, it seems that it has been fixed by the proofreader of Korean @fixmania, so it will be ok in the next version.

It has same problem with latest version of Crowdin translation.

  • In the file /locales/ko/messages.json :
"flashTab": {
        "message": "ํŽŒ์›จ์–ด<\/br>์—…๋ฐ์ดํŠธ"
    }

This version has problem that I reported.

  • I tested after change like this :
"flashTab": {
        "message": "ํŽŒ์›จ์–ด<br>์—…๋ฐ์ดํŠธ"
    }

This has same problem.

  • I test with old version :
"flashTab": {
        "message": "ํŽŒ์›จ์–ด ์—…๋ฐ์ดํŠธ"
    }

This has no problem after click the "update firmware" icon.
But, it looks ugly.
3
I think that is the reason @fixmania edited the string as "ํŽŒ์›จ์–ด<br>์—…๋ฐ์ดํŠธ".

  • Anyhow, the problem is the string is changed after click the "update firmware" icon. I think <br> makes some effect to display string.

@elin-neo: There is not much point in reporting translation problems in here, as the translators do not follow GitHub. Instead, please create an account on Crowdin, join https://crowdin.com/project/betaflight-configurator, and report the problems there.

I know this problem that is only in translation. Crowdin has not solved
this problem.

Japanese language is also inserted
code.

But as @elin-neo mentioned, after click the button it looks bad.

So I translated it to "์—…๋ฐ์ดํŠธ ํŽŒ์›จ์–ด" now.

Next version it looks nice than before.

2019๋…„ 4์›” 16์ผ (ํ™”) ์˜คํ›„ 12:06, Michael Keller notifications@github.com๋‹˜์ด ์ž‘์„ฑ:

@elin-neo https://github.com/elin-neo: There is not much point in
reporting translation problems in here, as the translators do not follow
GitHub. Instead, please create an account on Crowdin, join
https://crowdin.com/project/betaflight-configurator, and report the
problems there.

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/betaflight/betaflight-configurator/issues/1387#issuecomment-483493697,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AXcId8Atux7ic1CthUTrkl0a7ZeNZilNks5vhT5QgaJpZM4cvLBt
.

Ok I see.
I reported here because I think this is not the problem of translation.

@elin-neo: The fact that the spurious html tag is only shown in Korean and Japanese suggests that the problem is in the language files for these languages - otherwise the problem would exist for other languages as well.

@elin-neo @McGiverGim @mikeller I will check it this night. This problem seems to have caused an error in tag recognition as html tag was converted to xml format after clicking the button. The original English text does not contain a tag, so it doesn't matter, but since Korean and Japanese are different in word order, need to add tag due to the limited number of characters, but I will test it today. If this is not resolved, the word order is different, but there is no problem with the meaning transmission, so I will translate it according to the number of characters.

I have tested with the string "์—…๋ฐ์ดํŠธ ํŽŒ์›จ์–ด", and It is good. I like this idea. ๐Ÿ‘

I don't know java script language. So I afraid of editing this code, but I tried something. If I remove line 98 from the file src\js\serial_backend.js, this problem is disappeared.
// $('div.open_firmware_flasher a.flash_state').text(i18n.getMessage('flashTab'));

src\js\serial_backend.js Line 89 :

    $('div.open_firmware_flasher a.flash').click(function () {
        if ($('div#flashbutton a.flash_state').hasClass('active') && $('div#flashbutton a.flash').hasClass('active')) {
            $('div#flashbutton a.flash_state').removeClass('active');
            $('div#flashbutton a.flash').removeClass('active');
            document.getElementById("tab_landing").style.display = "block";
            document.getElementById("tab_help").style.display = "block";
            $('#tabs ul.mode-disconnected .tab_landing a').click();
        } else {
            $('#tabs ul.mode-disconnected .tab_firmware_flasher a').click();
            // $('div.open_firmware_flasher a.flash_state').text(i18n.getMessage('flashTab'));
            $('div#flashbutton a.flash_state').addClass('active');
            $('div#flashbutton a.flash').addClass('active');
            document.getElementById("tab_landing").style.display = "none";
            document.getElementById("tab_help").style.display = "none";
        }
    });

I am not sure about this and I am worried about the side effect after changing like this...
Please someone check about this.

The message is being initialized in the HTML code directly, this is the reason why it works deleting the line:
https://github.com/betaflight/betaflight-configurator/blob/0ef835947f0df7de63336aafd903fa3a26b85592/src/main.html#L134-L139

I think the message does not change never. Maybe at some point it changed and by this reason the serial_backend.js modified it again, but it seems I can't find any place in the code where this text changes.

So to me is safer to remove this line. Other solution is to change it:

$('div.open_firmware_flasher a.flash_state').text(i18n.getMessage('flashTab'));

by

$('div.open_firmware_flasher a.flash_state').html(i18n.getMessage('flashTab'));

The html will not escape the < and > characters and the <br> will be a carriage return.

Thank you for kind explanation, @McGiverGim.

@elin-neo @McGiverGim Yeah, I tried to add some tags, but not solved.
@McGiverGim has the answer about it.

When the flash button is active(yellow color), the string of it is shown on html content.
But when you click the button, it should call the string by java script.

I have tested to change serial_backend.js '.text()' to '.html()', it was shown correctly without <> tags.

If @McGiverGim can change the code, it might be the correct translation.

Otherwise, I have a idea. I will translate "Update Firmware" to "FC ํŽŒ์›จ์–ด ์—…๋ฐ์ดํŠธ".
This will be shown like the below.
firmware

I can change the code. Give me some time and I will push an update. It has no sense to change the text for the same text when active.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ss8688 picture ss8688  ยท  4Comments

bizmar picture bizmar  ยท  5Comments

richard-scott picture richard-scott  ยท  4Comments

bilson picture bilson  ยท  4Comments

HaroldBawls picture HaroldBawls  ยท  5Comments