Skip to content

Commit

Permalink
kconfig: fix update-po-config to accect backslash in input
Browse files Browse the repository at this point in the history
Massimo Maiurana reported (slightly edited):

=====
In latest 2.6.29 "make update-po-config" fails at msguniq invocation
with an "invalid control sequence" error.
The offending string is the following, and it's located in
drivers/staging/panel/Kconfig:72:

    "'\e[L' which are specific to the LCD, and a few ANSI codes. The"

looks to me like gettext expects strings in printf format, so in
this case it thinks "\e" is a control sequence but doesn't recognise
it as a valid one.

A valid solution would be to tell kxgettext to automatically
escape this kind of strings in the */config.pot he produces, so that
msguniq would not complain.
=====

This patch implements the suggested escaping.

Reported-by: Massimo Maiurana <[email protected]>
Tested-by: Massimo Maiurana <[email protected]>
Signed-off-by: Sam Ravnborg <[email protected]>
  • Loading branch information
sravnborg committed Apr 11, 2009
1 parent 79ff807 commit 612c280
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/kconfig/kxgettext.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ static char *escape(const char* text, char *bf, int len)
++text;
goto next;
}
else if (*text == '\\') {
*bfp++ = '\\';
len--;
}
*bfp++ = *text++;
next:
--len;
Expand Down

0 comments on commit 612c280

Please sign in to comment.