]> git.ipfire.org Git - thirdparty/grub.git/commit
po: Fix replacement of %m in sed programs
authorMike Gilbert <floppym@gentoo.org>
Mon, 2 Mar 2020 20:03:32 +0000 (15:03 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 10 Mar 2020 20:32:09 +0000 (21:32 +0100)
commit2e246b6fec6e881bdb4c6b0097c328ba27ef2792
tree3c48a5386df0a52f6f2256e8c7e4fe9a99436e0e
parentac116bd659b295d3b9e116808d3e1d940dc0fd67
po: Fix replacement of %m in sed programs

When running make dist, I hit this error:

  rm -f en@arabic.gmo && /usr/bin/gmsgfmt -c --statistics --verbose -o en@arabic.gmo en@arabic.po
  en@arabic.po:5312: 'msgstr' is not a valid C format string, unlike 'msgid'.
  Reason: The character that terminates the directive number 3 is not a valid conversion specifier.
  /usr/bin/gmsgfmt: found 1 fatal error

This was caused by "%m" being replaced with foreign Unicode characters.
For example:

  msgid "cannot rename the file %s to %s: %m"
  msgstr "ﺹﺎﻨﻧﻮﺗ ﺮﻌﻧﺎﻤﻋ ﺖﻬﻋ ﻒִﻴﻠﻋ %s ﺕﻭ %s: %ﻡ"

Mimic the workaround used for "%s" by reversing the replacement of "%m" at
the end of the sed programs.

Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
po/arabic.sed
po/cyrillic.sed
po/greek.sed
po/hebrew.sed