grub.d/xen.cfg: fix default entry when using l10n
authorHans van Kranenburg <hans@knorrie.org>
Wed, 20 Dec 2017 10:38:14 +0000 (11:38 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Wed, 2 Jan 2019 19:59:36 +0000 (20:59 +0100)
commit35fb59a50ca2de628c01e44fcb7c56009b939bee
treef0702dc334333535d717d5197a8ea01a15998b32
parentc41210a47b22e257a23bdd4b99636e21840ed63b
grub.d/xen.cfg: fix default entry when using l10n

When a user uses a locale that results in translating menu item titles
into another language than English, the hardcoded "Debian GNU/Linux,
with Xen hypervisor" would not match anything.

So, use gettext to make it match the right translated entry.
Also see
- https://bugs.launchpad.net/ubuntu/+source/xen/+bug/1321144
- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865086

Note that (thanks Ian for the info):
* When GRUB_TERMINAL is not empty and set to anything other than
  `gfxterm', grub will not do translation at all, because grub-mkconfig
  thinks that other GRUB_TERMINAL values including `serial' preclude
  non-ASCII characters, and that causes it to set LANG=C. (I have
  GRUB_TERMINAL="serial console", which caused much confusion when
  trying to test all of this).
* Just trying the printf "$(gettext... below is not enough to test if a
  translation shows up. It needs -d grub additionally for gettext, or
  TEXTDOMAIN=grub in the environment, which is probably present when
  this file gets run by update-grub.

Signed-off-by: Hans van Kranenburg <hans@knorrie.org>
debian/tree/xen-hypervisor-common/etc/default/grub.d/xen.cfg