]> git.ozlabs.org Git - petitboot/commit - ui/ncurses/nc-config.c
ui/ncurses: Use a separate type for help text
authorJeremy Kerr <jk@ozlabs.org>
Tue, 24 Jun 2014 05:18:03 +0000 (13:18 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 28 Jul 2014 05:20:34 +0000 (13:20 +0800)
commit4e30f260106ac5f7007e213db1d1e54298393290
tree1d215a8c2e5895844f486d8b371c731d3b34f83b
parent494988c501287e03da3becba5c03cbce7c3d9d20
ui/ncurses: Use a separate type for help text

Because it's initialised statically, help text won't be directly
gettext()-ed. Instead, we need to perform the gettext translation at
runtime, and pass untranslated strings into the help_screen code.

Instead of trusting callers to pass the untranslated strings though, we
encapsulate the help text data into struct help_text, so we know we have
an unstranslated string.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
14 files changed:
ui/ncurses/generic-main-help.c
ui/ncurses/generic-main.c
ui/ncurses/nc-boot-editor-help.c
ui/ncurses/nc-boot-editor.c
ui/ncurses/nc-config-help.c
ui/ncurses/nc-config.c
ui/ncurses/nc-cui.c
ui/ncurses/nc-cui.h
ui/ncurses/nc-helpscreen.c
ui/ncurses/nc-helpscreen.h
ui/ncurses/nc-menu.h
ui/ncurses/nc-sysinfo.c
ui/ncurses/nc-textscreen.c
ui/ncurses/nc-textscreen.h