lvgl/lv_i18n

Unescaping broken

bubeck opened this issue · 5 comments

I am using lv_i18n latest version "f871e05" from GitHub (not latest official release).
When using this key with the translation,

"Type this passcode\n\n%lu\n\non the other device.": "Bitte das Passcode\n\n%lu\n\nauf dem anderen Geraet eingeben."

and a following "lv_i18n compile" gives a correct result:

{"Type this passcode\n\n%lu\n\non the other device.", "Bitte das Passcode\n\n%lu\n\nauf dem anderen Geraet eingeben."},

However, if you redo "lv_i18n extract" then the above translation gets changed to, which is obviously wrong:

  "Type this passcode\n\n%lu\n\non the other device.": |-
    Bitte das Passcode

    %lu

    auf dem anderen Geraet eingeben.

Please handle "\n" and other escape sequences right.

What exactly is obviously wrong?

The translation is broken in many lines (at each \n) and there is a "|-" at the begining:

  "Type this passcode\n\n%lu\n\non the other device.": |-
    Bitte das Passcode

    %lu

    auf dem anderen Geraet eingeben.

Also it is loosing quotes at start and end of string.

Yaml supports multiline formats, with and without quotes. Please read spec and play with online demos of yaml.

OK, you are right. I am sorry