Make hotkey strings (question and confirmation) better localizable (FS#11171)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25457 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Alexander Levin 2010-04-03 20:59:35 +00:00
parent e1a1df69fc
commit 8802482e3e
2 changed files with 26 additions and 10 deletions

View file

@ -13395,20 +13395,37 @@
</voice> </voice>
</phrase> </phrase>
<phrase> <phrase>
id: LANG_SET_HOTKEY id: LANG_SET_HOTKEY_QUESTION
desc: hotkey splash desc: hotkey splash
user: core user: core
<source> <source>
*: none *: none
hotkey: "Set Hotkey: %s" hotkey: "Set Hotkey: %s?"
</source> </source>
<dest> <dest>
*: none *: none
hotkey: "Set Hotkey: %s" hotkey: "Set Hotkey: %s?"
</dest> </dest>
<voice> <voice>
*: none *: none
hotkey: "Set Hotkey: %s" hotkey: "Set Hotkey?"
</voice>
</phrase>
<phrase>
id: LANG_HOTKEY_ASSIGNED
desc: Confirmation after the hotkey has been assigned
user: core
<source>
*: none
hotkey: "Assigned hotkey: %s"
</source>
<dest>
*: none
hotkey: "Assigned hotkey: %s"
</dest>
<voice>
*: none
hotkey: "Assigned hotkey"
</voice> </voice>
</phrase> </phrase>
<phrase> <phrase>

View file

@ -1319,16 +1319,16 @@ static void set_hotkey(bool is_wps)
if (!match_found || (this_hk == *hk_func)) return; if (!match_found || (this_hk == *hk_func)) return;
char line1_buf[100]; char line1_buf[100];
char line2_buf[101]; char line2_buf[100];
char *line1 = line1_buf; char *line1 = line1_buf;
char *line2 = line2_buf; char *line2 = line2_buf;
char **line1_ptr = &line1; char **line1_ptr = &line1;
char **line2_ptr = &line2; char **line2_ptr = &line2;
const struct text_message message={(const char **)line2_ptr, 1}; const struct text_message message={(const char **)line1_ptr, 1};
const struct text_message yes_message={(const char **)line1_ptr, 1}; const struct text_message yes_message={(const char **)line2_ptr, 1};
snprintf(line1, 100, str(LANG_SET_HOTKEY), str(this_id)); snprintf(line1, sizeof(line1_buf), str(LANG_SET_HOTKEY_QUESTION), str(this_id));
strcat(strcpy(line2, line1), "?"); snprintf(line2, sizeof(line2_buf), str(LANG_HOTKEY_ASSIGNED), str(this_id));
/* confirm the hotkey setting change */ /* confirm the hotkey setting change */
if(gui_syncyesno_run(&message, &yes_message, NULL)==YESNO_YES) if(gui_syncyesno_run(&message, &yes_message, NULL)==YESNO_YES)
@ -1338,7 +1338,6 @@ static void set_hotkey(bool is_wps)
*hk_desc = this_id; *hk_desc = this_id;
settings_save(); settings_save();
splash(HZ*2, line1);
} }
} }
#endif /* HOTKEY */ #endif /* HOTKEY */