From b547e1205b58a40e6e546189ea7948a82b4de027 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Mon, 11 Nov 2013 14:32:07 +0000 Subject: Use messages for translations instead of string literals. --- desktop/global_history.c | 3 ++- desktop/hotlist.c | 7 +++---- resources/FatMessages | 18 ++++++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/desktop/global_history.c b/desktop/global_history.c index 94521e7c3..e8d99efc2 100644 --- a/desktop/global_history.c +++ b/desktop/global_history.c @@ -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 : ""; + const char *title = (data->title != NULL) ? + data->title : messages_get("NoTitle"); char buffer[16]; const char *last_visited; char *last_visited2; diff --git a/desktop/hotlist.c b/desktop/hotlist.c index 838b41b5e..ee3469b27 100644 --- a/desktop/hotlist.c +++ b/desktop/hotlist.c @@ -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 = ""; + title = messages_get("NoTitle"); } /* Need to get URL as a nsurl object */ diff --git a/resources/FatMessages b/resources/FatMessages index 9fe6f9013..117a6df19 100644 --- a/resources/FatMessages +++ b/resources/FatMessages @@ -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: +de.all.NoTitle: +fr.all.NoTitle: +it.all.NoTitle: +nl.all.NoTitle: + + # Tree export # -- cgit v1.2.3