[gnome-dictionary] Use Unicode in translatable strings



commit d88b719788a885e6bfbc5cd7accd20bde54a6342
Author: Piotr Drąg <piotrdrag gmail com>
Date:   Thu Nov 10 13:20:06 2016 +0100

    Use Unicode in translatable strings
    
    See https://developer.gnome.org/hig/stable/typography.html
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774199

 data/org.gnome.dictionary.gschema.xml |    4 ++--
 libgdict/gdict-client-context.c       |   30 +++++++++++++++---------------
 libgdict/gdict-source.c               |   16 ++++++++--------
 src/gdict-app-menus.ui                |    2 +-
 src/gdict-pref-dialog.c               |    4 ++--
 src/gdict-window.c                    |    8 ++++----
 6 files changed, 32 insertions(+), 32 deletions(-)
---
diff --git a/data/org.gnome.dictionary.gschema.xml b/data/org.gnome.dictionary.gschema.xml
index d37ebb5..267f9cf 100644
--- a/data/org.gnome.dictionary.gschema.xml
+++ b/data/org.gnome.dictionary.gschema.xml
@@ -4,12 +4,12 @@
     <key name="database" type="s">
       <default>'!'</default>
       <summary>The default database to use</summary>
-      <description>The name of the default individual database or meta-database to use on a dictionary 
source. An exclamation mark ("!") means that all the databases present in a dictionary source should be 
searched</description>
+      <description>The name of the default individual database or meta-database to use on a dictionary 
source. An exclamation mark (“!”) means that all the databases present in a dictionary source should be 
searched</description>
     </key>
     <key name="strategy" type="s">
       <default>'exact'</default>
       <summary>The default search strategy to use</summary>
-      <description>The name of the default search strategy to use on a dictionary source, if available. The 
default strategy is 'exact', that is match exact words.</description>
+      <description>The name of the default search strategy to use on a dictionary source, if available. The 
default strategy is “exact”, that is match exact words.</description>
     </key>
     <key name="print-font" type="s">
       <default>'Serif 12'</default>
diff --git a/libgdict/gdict-client-context.c b/libgdict/gdict-client-context.c
index a8aa123..7781695 100644
--- a/libgdict/gdict-client-context.c
+++ b/libgdict/gdict-client-context.c
@@ -772,7 +772,7 @@ gdict_client_context_send_command (GdictClientContext  *context,
       
       g_set_error (error, GDICT_CLIENT_CONTEXT_ERROR,
                    GDICT_CLIENT_CONTEXT_ERROR_NO_CONNECTION,
-                   _("No connection to the dictionary server at '%s:%d'"),
+                   _("No connection to the dictionary server at “%s:%d”"),
                    priv->hostname,
                    priv->port);
       
@@ -1055,7 +1055,7 @@ gdict_client_context_lookup_server (GdictClientContext  *context,
             {
               g_set_error (error, GDICT_CLIENT_CONTEXT_ERROR,
                            GDICT_CLIENT_CONTEXT_ERROR_LOOKUP,
-                           _("Lookup failed for hostname '%s': no suitable resources found"),
+                           _("Lookup failed for hostname “%s”: no suitable resources found"),
                            priv->hostname);
                 
               return FALSE;
@@ -1086,7 +1086,7 @@ gdict_client_context_lookup_server (GdictClientContext  *context,
         {
           g_set_error (error, GDICT_CLIENT_CONTEXT_ERROR,
                        GDICT_CLIENT_CONTEXT_ERROR_LOOKUP,
-                       _("Lookup failed for host '%s': %s"),
+                       _("Lookup failed for host “%s”: %s"),
                        priv->hostname,
                        gai_strerror (errno));
           
@@ -1120,7 +1120,7 @@ gdict_client_context_lookup_server (GdictClientContext  *context,
         {
           g_set_error (error, GDICT_CLIENT_CONTEXT_ERROR,
                        GDICT_CLIENT_CONTEXT_ERROR_LOOKUP,
-                       _("Lookup failed for host '%s': host not found"),
+                       _("Lookup failed for host “%s”: host not found"),
                        priv->hostname);
           
           return FALSE;
@@ -1173,7 +1173,7 @@ gdict_client_context_parse_line (GdictClientContext *context,
           g_set_error (&server_error, GDICT_CLIENT_CONTEXT_ERROR,
                        GDICT_CLIENT_CONTEXT_ERROR_SERVER_DOWN,
                        _("Unable to connect to the dictionary server "
-                         "at '%s:%d'. The server replied with "
+                         "at “%s:%d”. The server replied with "
                          "code %d (server down)"),
                        priv->hostname,
                        priv->port,
@@ -1191,7 +1191,7 @@ gdict_client_context_parse_line (GdictClientContext *context,
           
           g_set_error (&parse_error, GDICT_CONTEXT_ERROR,
                        GDICT_CONTEXT_ERROR_PARSE,
-                       _("Unable to parse the dictionary server reply\n: '%s'"),
+                       _("Unable to parse the dictionary server reply\n: “%s”"),
                        buffer);
           
           g_signal_emit_by_name (context, "error", parse_error);
@@ -1220,7 +1220,7 @@ gdict_client_context_parse_line (GdictClientContext *context,
     case GDICT_STATUS_NO_MATCH:
       g_set_error (&server_error, GDICT_CONTEXT_ERROR,
                    GDICT_CONTEXT_ERROR_NO_MATCH,
-                   _("No definitions found for '%s'"),
+                   _("No definitions found for “%s”"),
                    priv->command->word);
 
       GDICT_NOTE (DICT, "No match: %s", server_error->message);
@@ -1235,7 +1235,7 @@ gdict_client_context_parse_line (GdictClientContext *context,
     case GDICT_STATUS_BAD_DATABASE:
       g_set_error (&server_error, GDICT_CONTEXT_ERROR,
                    GDICT_CONTEXT_ERROR_INVALID_DATABASE,
-                   _("Invalid database '%s'"),
+                   _("Invalid database “%s”"),
                    priv->command->database);
 
       GDICT_NOTE (DICT, "Bad DB: %s", server_error->message);
@@ -1250,7 +1250,7 @@ gdict_client_context_parse_line (GdictClientContext *context,
     case GDICT_STATUS_BAD_STRATEGY:
       g_set_error (&server_error, GDICT_CONTEXT_ERROR,
                    GDICT_CONTEXT_ERROR_INVALID_STRATEGY,
-                   _("Invalid strategy '%s'"),
+                   _("Invalid strategy “%s”"),
                    priv->command->strategy);
       
       GDICT_NOTE (DICT, "Bad strategy: %s", server_error->message);
@@ -1265,7 +1265,7 @@ gdict_client_context_parse_line (GdictClientContext *context,
     case GDICT_STATUS_BAD_COMMAND:
       g_set_error (&server_error, GDICT_CONTEXT_ERROR,
                    GDICT_CONTEXT_ERROR_INVALID_COMMAND,
-                   _("Bad command '%s'"),
+                   _("Bad command “%s”"),
                    dict_command_strings[priv->command->cmd_type]);
       
       GDICT_NOTE (DICT, "Bad command: %s", server_error->message);
@@ -1280,7 +1280,7 @@ gdict_client_context_parse_line (GdictClientContext *context,
     case GDICT_STATUS_BAD_PARAMETERS:
       g_set_error (&server_error, GDICT_CONTEXT_ERROR,
                   GDICT_CONTEXT_ERROR_INVALID_COMMAND,
-                  _("Bad parameters for command '%s'"),
+                  _("Bad parameters for command “%s”"),
                   dict_command_strings[priv->command->cmd_type]);
 
       GDICT_NOTE (DICT, "Bad params: %s", server_error->message);
@@ -1295,7 +1295,7 @@ gdict_client_context_parse_line (GdictClientContext *context,
     case GDICT_STATUS_NO_DATABASES_PRESENT:
       g_set_error (&server_error, GDICT_CONTEXT_ERROR,
                    GDICT_CONTEXT_ERROR_NO_DATABASES,
-                   _("No databases found on dictionary server at '%s'"),
+                   _("No databases found on dictionary server at “%s”"),
                    priv->hostname);
           
       GDICT_NOTE (DICT, "No DB: %s", server_error->message);
@@ -1310,7 +1310,7 @@ gdict_client_context_parse_line (GdictClientContext *context,
     case GDICT_STATUS_NO_STRATEGIES_PRESENT:
       g_set_error (&server_error, GDICT_CONTEXT_ERROR,
                    GDICT_CONTEXT_ERROR_NO_STRATEGIES,
-                   _("No strategies found on dictionary server at '%s'"),
+                   _("No strategies found on dictionary server at “%s”"),
                    priv->hostname);
           
       GDICT_NOTE (DICT, "No strategies: %s", server_error->message);
@@ -1854,7 +1854,7 @@ check_for_connection (gpointer data)
       
       g_set_error (&err, GDICT_CLIENT_CONTEXT_ERROR,
                    GDICT_CLIENT_CONTEXT_ERROR_SOCKET,
-                   _("Connection timeout for the dictionary server at '%s:%d'"),
+                   _("Connection timeout for the dictionary server at “%s:%d”"),
                    context->priv->hostname,
                    context->priv->port);
               
@@ -1980,7 +1980,7 @@ gdict_client_context_connect (GdictClientContext  *context,
     {
       g_set_error (error, GDICT_CLIENT_CONTEXT_ERROR,
                    GDICT_CLIENT_CONTEXT_ERROR_SOCKET,
-                   _("Unable to connect to the dictionary server at '%s:%d'"),
+                   _("Unable to connect to the dictionary server at “%s:%d”"),
                    priv->hostname,
                    priv->port);
 
diff --git a/libgdict/gdict-source.c b/libgdict/gdict-source.c
index 964bbc7..4e5b47c 100644
--- a/libgdict/gdict-source.c
+++ b/libgdict/gdict-source.c
@@ -430,7 +430,7 @@ gdict_source_create_context (GdictSource           *source,
     default:
       g_set_error (error, GDICT_SOURCE_ERROR,
                    GDICT_SOURCE_ERROR_PARSE,
-                   _("Invalid transport type '%d'"),
+                   _("Invalid transport type “%d”"),
                    transport);
       return NULL;
     }
@@ -458,7 +458,7 @@ gdict_source_parse (GdictSource  *source,
     {
       g_set_error (error, GDICT_SOURCE_ERROR,
                    GDICT_SOURCE_ERROR_PARSE,
-                   _("No '%s' group found inside the dictionary source definition"),
+                   _("No “%s” group found inside the dictionary source definition"),
                    SOURCE_GROUP);
       
       return FALSE;
@@ -474,7 +474,7 @@ gdict_source_parse (GdictSource  *source,
     {
       g_set_error (error, GDICT_SOURCE_ERROR,
                    GDICT_SOURCE_ERROR_PARSE,
-                   _("Unable to get the '%s' key inside the dictionary "
+                   _("Unable to get the “%s” key inside the dictionary "
                      "source definition: %s"),
                    SOURCE_KEY_NAME,
                    parse_error->message);
@@ -498,7 +498,7 @@ gdict_source_parse (GdictSource  *source,
         {
           g_set_error (error, GDICT_SOURCE_ERROR,
                        GDICT_SOURCE_ERROR_PARSE,
-                       _("Unable to get the '%s' key inside the dictionary "
+                       _("Unable to get the “%s” key inside the dictionary "
                          "source definition: %s"),
                        SOURCE_KEY_DESCRIPTION,
                        parse_error->message);
@@ -522,7 +522,7 @@ gdict_source_parse (GdictSource  *source,
         {
           g_set_error (error, GDICT_SOURCE_ERROR,
                        GDICT_SOURCE_ERROR_PARSE,
-                       _("Unable to get the '%s' key inside the dictionary "
+                       _("Unable to get the “%s” key inside the dictionary "
                          "source definition: %s"),
                        SOURCE_KEY_DATABASE,
                        parse_error->message);
@@ -547,7 +547,7 @@ gdict_source_parse (GdictSource  *source,
         {
           g_set_error (error, GDICT_SOURCE_ERROR,
                        GDICT_SOURCE_ERROR_PARSE,
-                       _("Unable to get the '%s' key inside the dictionary "
+                       _("Unable to get the “%s” key inside the dictionary "
                          "source definition: %s"),
                        SOURCE_KEY_STRATEGY,
                        parse_error->message);
@@ -572,7 +572,7 @@ gdict_source_parse (GdictSource  *source,
     {
       g_set_error (error, GDICT_SOURCE_ERROR,
                   GDICT_SOURCE_ERROR_PARSE,
-                  _("Unable to get the '%s' key inside the dictionary "
+                  _("Unable to get the “%s” key inside the dictionary "
                     "source definition file: %s"),
                   SOURCE_KEY_TRANSPORT,
                   parse_error->message);
@@ -775,7 +775,7 @@ gdict_source_to_data (GdictSource  *source,
     {
       g_set_error (error, GDICT_SOURCE_ERROR,
                    GDICT_SOURCE_ERROR_INVALID_TRANSPORT,
-                   _("Dictionary source '%s' has invalid transport '%s'"),
+                   _("Dictionary source “%s” has invalid transport “%s”"),
                    priv->name,
                    valid_transports[priv->transport]);
       
diff --git a/src/gdict-app-menus.ui b/src/gdict-app-menus.ui
index 13eb014..da7c903 100644
--- a/src/gdict-app-menus.ui
+++ b/src/gdict-app-menus.ui
@@ -33,7 +33,7 @@
   <menu id="popup">
     <section>
       <item>
-        <attribute name="label" translatable="yes">_Save a Copy...</attribute>
+        <attribute name="label" translatable="yes">_Save a Copy…</attribute>
         <attribute name="action">win.save-as</attribute>
       </item>
     </section>
diff --git a/src/gdict-pref-dialog.c b/src/gdict-pref-dialog.c
index 11d547d..5ac4a30 100644
--- a/src/gdict-pref-dialog.c
+++ b/src/gdict-pref-dialog.c
@@ -369,7 +369,7 @@ source_remove_clicked_cb (GdictPrefDialog *dialog)
                                               GTK_DIALOG_DESTROY_WITH_PARENT,
                                               GTK_MESSAGE_WARNING,
                                               GTK_BUTTONS_NONE,
-                                              _("Remove \"%s\"?"), description);
+                                              _("Remove “%s”?"), description);
       gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (confirm_dialog),
                                                _("This will permanently remove the "
                                                  "dictionary source from the list."));
@@ -393,7 +393,7 @@ source_remove_clicked_cb (GdictPrefDialog *dialog)
       GtkWidget *error_dialog;
       gchar *message;
       
-      message = g_strdup_printf (_("Unable to remove source '%s'"),
+      message = g_strdup_printf (_("Unable to remove source “%s”"),
                                 description);
       
       error_dialog = gtk_message_dialog_new (GTK_WINDOW (dialog),
diff --git a/src/gdict-window.c b/src/gdict-window.c
index 8ce0121..97f2a2f 100644
--- a/src/gdict-window.c
+++ b/src/gdict-window.c
@@ -412,7 +412,7 @@ get_context_from_loader (GdictWindow *window)
     {
       gchar *detail;
       
-      detail = g_strdup_printf (_("No dictionary source available with name '%s'"),
+      detail = g_strdup_printf (_("No dictionary source available with name “%s”"),
                                window->source_name);
 
       gdict_show_error_dialog (GTK_WINDOW (window),
@@ -432,7 +432,7 @@ get_context_from_loader (GdictWindow *window)
     {
       gchar *detail;
       
-      detail = g_strdup_printf (_("No context available for source '%s'"),
+      detail = g_strdup_printf (_("No context available for source “%s”"),
                                gdict_source_get_description (source));
                                
       gdict_show_error_dialog (GTK_WINDOW (window),
@@ -495,7 +495,7 @@ gdict_window_set_word (GdictWindow *window,
     database = window->database;
 
   if (window->word)
-    title = g_strdup_printf (_("%s - Dictionary"), window->word);
+    title = g_strdup_printf (_("%s — Dictionary"), window->word);
   else
     title = g_strdup (_("Dictionary"));
   
@@ -849,7 +849,7 @@ gdict_window_cmd_save_as (GSimpleAction   *action,
         {
           gchar *message;
           
-          message = g_strdup_printf (_("Error while writing to '%s'"), filename);
+          message = g_strdup_printf (_("Error while writing to “%s”"), filename);
           
           gdict_show_gerror_dialog (GTK_WINDOW (window),
                                     message,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]