Use messages for translations instead of string literals.

This commit is contained in:
Michael Drake 2013-11-11 14:32:07 +00:00
parent 7a920ace39
commit b547e1205b
3 changed files with 23 additions and 5 deletions

View File

@ -249,7 +249,8 @@ static nserror global_history_create_treeview_field_data(
struct global_history_entry *e,
const struct url_data *data)
{
const char *title = (data->title != NULL) ? data->title : "<No title>";
const char *title = (data->title != NULL) ?
data->title : messages_get("NoTitle");
char buffer[16];
const char *last_visited;
char *last_visited2;

View File

@ -331,8 +331,7 @@ static nserror hotlist_add_folder_internal(
nserror err;
if (title == NULL) {
/* TODO: use messages */
title = "New folder";
title = messages_get("NewFolder");
}
/* Create the title field */
@ -348,7 +347,7 @@ static nserror hotlist_add_folder_internal(
}
f->data.value_len = strlen(title);
if (hl_ctx.built)
if (!hl_ctx.built)
flags |= TREE_OPTION_SUPPRESS_RESIZE |
TREE_OPTION_SUPPRESS_REDRAW;
if (default_folder)
@ -556,7 +555,7 @@ static nserror hotlist_load_entry(dom_node *li, hotlist_load_ctx *ctx)
if (title1 != NULL) {
title = dom_string_data(title1);
} else {
title = "<No title>";
title = messages_get("NoTitle");
}
/* Need to get URL as a nsurl object */

View File

@ -1294,6 +1294,24 @@ it.all.HotlistDefaultFolderName:Voci non ordinate
nl.all.HotlistDefaultFolderName:Unsorted entries
# Default name for new folders
#
en.all.NewFolder:New folder
de.all.NewFolder:New folder
fr.all.NewFolder:New folder
it.all.NewFolder:New folder
nl.all.NewFolder:New folder
# Default title
#
en.all.NoTitle:<No title>
de.all.NoTitle:<No title>
fr.all.NoTitle:<No title>
it.all.NoTitle:<No title>
nl.all.NoTitle:<No title>
# Tree export
#