[epiphany] Use internationalization for Favorites string
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Use internationalization for Favorites string
- Date: Tue, 3 Jan 2017 23:05:50 +0000 (UTC)
commit a9d398d221ed3179c6e496d60840f1b5d8fa6939
Author: cedlemo <cedlemo gmx com>
Date: Tue Jan 3 18:04:40 2017 +0100
Use internationalization for Favorites string
https://bugzilla.gnome.org/show_bug.cgi?id=773395
src/bookmarks/ephy-bookmark-properties-grid.c | 5 ++++-
src/bookmarks/ephy-bookmarks-popover.c | 11 ++++++++---
2 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/bookmarks/ephy-bookmark-properties-grid.c b/src/bookmarks/ephy-bookmark-properties-grid.c
index bfacfbb..cf3a3f5 100644
--- a/src/bookmarks/ephy-bookmark-properties-grid.c
+++ b/src/bookmarks/ephy-bookmark-properties-grid.c
@@ -28,6 +28,7 @@
#include "ephy-type-builtins.h"
#include "ephy-uri-helpers.h"
+#include <glib/gi18n.h>
#include <libsoup/soup.h>
#include <string.h>
@@ -154,6 +155,7 @@ ephy_bookmark_properties_grid_create_tag_widget (EphyBookmarkPropertiesGrid *sel
GtkWidget *label;
GtkStyleContext *context;
gboolean default_tag;
+ const char *label_text;
default_tag = (g_strcmp0 (tag, "Favorites") == 0);
@@ -172,7 +174,8 @@ ephy_bookmark_properties_grid_create_tag_widget (EphyBookmarkPropertiesGrid *sel
gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
}
- label = gtk_label_new (tag);
+ label_text = default_tag ? _("Favorites") : tag;
+ label = gtk_label_new (label_text);
gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 0);
if (!default_tag) {
diff --git a/src/bookmarks/ephy-bookmarks-popover.c b/src/bookmarks/ephy-bookmarks-popover.c
index a53921f..de769a0 100644
--- a/src/bookmarks/ephy-bookmarks-popover.c
+++ b/src/bookmarks/ephy-bookmarks-popover.c
@@ -200,13 +200,18 @@ create_tag_row (const char *tag)
gtk_widget_set_halign (box, GTK_ALIGN_START);
if (g_strcmp0 (tag, "Favorites") == 0)
+ {
image = gtk_image_new_from_icon_name ("user-bookmarks-symbolic", GTK_ICON_SIZE_MENU);
+ label = gtk_label_new (_("Favorites"));
+ }
else
+ {
image = gtk_image_new_from_icon_name ("ephy-bookmark-tag-symbolic", GTK_ICON_SIZE_MENU);
- gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
+ label = gtk_label_new (tag);
+ }
- label = gtk_label_new (tag);
- gtk_box_pack_start (GTK_BOX (box),label, TRUE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (box), image, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (box), label, TRUE, FALSE, 0);
gtk_container_add (GTK_CONTAINER (row), box);
gtk_widget_show_all (row);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]