lvgl / lv_i18n

Internationalization (i18n) for LVGL

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Escape character "\" will be doubled.

bubeck opened this issue · comments

The following is an example of the problem

printf(_("Hello World\n"));

it extracts correctly to yml and is then translated

de-DE:
  Hello World\n: Hallo Welt\n

if compiled to source we get:

static lv_i18n_phrase_t de_de_singulars[] = {
    {"Hello World\\n", "Hallo Welt\\n"},

which is obviously wrong, as it should be

static lv_i18n_phrase_t de_de_singulars[] = {
    {"Hello World\n", "Hallo Welt\n"},

Fixed by a5c19c3
Please release new version including this fix.

AFAIK, release was postponed due comments in 593707d

@kisvegabor could you take a look?

I ran into this bug today because I installed from npm i lv_i18n -g.

This has been fixed in the master branch. I would recommend creating a new release when you have a moment. I see the potential for others to encounter this bug who use SquadLine Studio and use multiline text.