bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[BUG] xgettext seems unable to deal concatenated wide char strings


From: Érico Nogueira
Subject: [BUG] xgettext seems unable to deal concatenated wide char strings
Date: Fri, 13 Nov 2020 00:54:19 -0300

Hi! I noticed this issue while working on translations for the
fish-shell [1], which makes heavy usage of wide char strings.

- [1] https://github.com/fish-shell/fish-shell

My xgettext version is 0.20.2.

Starting from a C file such as:

    int main()
    {
            gettext(L"single line");

            gettext(L"double "
                            L"line ");

            gettext(L"single line but" L" split");

            gettext("double line"
                            " non wide");
    }

I would expect the generated messages.po file to contain the following
msgid's:

- "single line"
- "double line "
- "single line but split"
- "double line non wide"

Instead, the file generated by xgettext is:

    [BOILERPLATE...]

    #: text.c:3
    msgid "single line"
    msgstr ""

    #: text.c:5
    msgid "double "
    msgstr ""

    #: text.c:8
    msgid "single line but"
    msgstr ""

    #: text.c:10
    msgid "double line non wide"
    msgstr ""

Showing that any kind of split in wide char strings leads to broken
xgettext output.

Thanks,
Érico



reply via email to

[Prev in Thread] Current Thread [Next in Thread]