Bug 22257 - grub2: allow run-time translation of theme labels
Summary: grub2: allow run-time translation of theme labels
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal enhancement
Target Milestone: ---
Assignee: Barry Jackson
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-23 22:31 CET by Martin Whitaker
Modified: 2018-03-12 21:23 CET (History)
0 users

See Also:
Source RPM: grub2-2.02.0-3.mga7.src.rpm
CVE:
Status comment:


Attachments
Patch to support run-time translation of theme labels (3.29 KB, text/plain)
2017-12-23 22:31 CET, Martin Whitaker
Details

Description Martin Whitaker 2017-12-23 22:31:18 CET
Created attachment 9847 [details]
Patch to support run-time translation of theme labels

Whilst implementing the transition to using GRUB2 as the MBR bootloader on the Mageia ISOs, I have added support for the user to select a different language in the boot menu. GRUB2 supports run-time translation of all messages except labels taken from the theme configuration file. The attached patch allows those labels to be translated as well.

To keep the patch simple, it will translate any label (if the gettext module is loaded and a translation exists), rather than requiring the string to be prefixed by $", as is required elsewhere. I don't see this as a big issue - if the user has loaded the gettext module and supplied translations, we can reasonably assume they want to use them ;-) Implementing support for $" would make the patch considerably bigger, as currently the theme file parser only looks ahead one character.

I have submitted this patch upstream:

  http://savannah.gnu.org/bugs/?52626

but no response as yet.
Comment 1 Martin Whitaker 2018-03-11 10:58:33 CET
Still no response from upstream. Any objection to me adding this patch to the Mageia package?
Comment 2 Barry Jackson 2018-03-11 17:36:38 CET
No objections from me :)

It may be worth asking 'phcoder' on #grub irc about this or mailing either:
Vladimir 'phcoder' Serbinenko <phcoder@gmail.com> or
Andrei Borzenkov <arvidjaar@gmail.com>
either directly or preferably via the grub-dev ML for comments.
Comment 3 Martin Whitaker 2018-03-12 21:23:31 CET
Thanks Barry. I've pushed this to cauldron.

Status: NEW => RESOLVED
Resolution: (none) => FIXED


Note You need to log in before you can comment on or make changes to this bug.