[gnome-builder] beautifier plugin: translatable strings fixes



commit e04c297391ce347aa136507ebe8c1344c1687692
Author: Piotr Drąg <piotrdrag gmail com>
Date:   Tue Jan 9 00:23:05 2018 +0100

    beautifier plugin: translatable strings fixes
    
    Fix grammar (“entry disabling”, “dir”), use Unicode apostrophes,
    and move comments directly above the strings so they get picked up
    by gettext.

 src/plugins/beautifier/gb-beautifier-config.c  |   34 ++++++++++++------------
 src/plugins/beautifier/gb-beautifier-helper.c  |   14 +++++-----
 src/plugins/beautifier/gb-beautifier-process.c |    4 +-
 3 files changed, 26 insertions(+), 26 deletions(-)
---
diff --git a/src/plugins/beautifier/gb-beautifier-config.c b/src/plugins/beautifier/gb-beautifier-config.c
index bd7ca54..cb6a03a 100644
--- a/src/plugins/beautifier/gb-beautifier-config.c
+++ b/src/plugins/beautifier/gb-beautifier-config.c
@@ -150,16 +150,16 @@ copy_to_tmp_file (GbBeautifierEditorAddin *self,
 
   if (error != NULL)
     {
-      /* translators: %s and %s are replaced with source file path and the error message */
       ide_object_warning (self,
+                          /* translators: %s and %s are replaced with source file path and the error message 
*/
                           _("Beautifier plugin: error copying the gresource config file for “%s”: %s"),
                           source_path,
                           error->message);
     }
   else
     {
-      /* translators: %s is replaced with the source file path */
       ide_object_warning (self,
+                          /* translators: %s is replaced with the source file path */
                           _("Beautifier plugin: error creating temporary config file for “%s”"),
                           source_path);
     }
@@ -204,7 +204,7 @@ add_entries_from_config_ini_file (GbBeautifierEditorAddin *self,
   if (!g_file_load_contents (file, NULL, &data, &data_len, NULL, &error))
     {
       /* translators: %s is replaced with the .ini source file path */
-      ide_object_warning (self, _("Beautifier plugin: Can't read .ini file: %s"), error->message);
+      ide_object_warning (self, _("Beautifier plugin: Can’t read .ini file: %s"), error->message);
       return FALSE;
     }
 
@@ -250,9 +250,9 @@ add_entries_from_config_ini_file (GbBeautifierEditorAddin *self,
           has_command_pattern = g_key_file_has_key (key_file, profile, "command-pattern", NULL);
           if (!has_command && !has_command_pattern)
             {
-              /* translators: %s is replaced with the config entry name */
               ide_object_warning (self,
-                                  _("Beautifier plugin: neither command nor command-pattern keys found: 
entry “%s” disabling"),
+                                  /* translators: %s is replaced with the config entry name */
+                                  _("Beautifier plugin: neither command nor command-pattern keys found: 
entry “%s” disabled"),
                                   display_name);
 
               continue;
@@ -260,9 +260,9 @@ add_entries_from_config_ini_file (GbBeautifierEditorAddin *self,
 
           if (has_command && has_command_pattern)
             {
-              /* translators: %s is replaced with the config entry name */
               ide_object_warning (self,
-                                  _("Beautifier plugin: both command and command-pattern keys found: entry 
“%s” disabling"),
+                                  /* translators: %s is replaced with the config entry name */
+                                  _("Beautifier plugin: both command and command-pattern keys found: entry 
“%s” disabled"),
                                   display_name);
               continue;
             }
@@ -284,9 +284,9 @@ add_entries_from_config_ini_file (GbBeautifierEditorAddin *self,
                   config_file = g_file_new_for_path (config_path);
                   if (!g_file_query_exists (config_file, NULL))
                     {
-                      /* translators: %s and %s are replaced with the config path and the entry name */
                       ide_object_warning (self,
-                                          _("Beautifier plugin: config path “%s” does not exist, entry “%s” 
disabling"),
+                                          /* translators: %s and %s are replaced with the config path and 
the entry name */
+                                          _("Beautifier plugin: config path “%s” does not exist, entry “%s” 
disabled"),
                                           config_path,
                                           display_name);
                       continue;
@@ -301,9 +301,9 @@ add_entries_from_config_ini_file (GbBeautifierEditorAddin *self,
                 entry.command = GB_BEAUTIFIER_CONFIG_COMMAND_CLANG_FORMAT;
               else
                 {
-                  /* translators: %s is replaced with the entry name */
                   ide_object_warning (self,
-                                      _("Beautifier plugin: command key out of possible values: entry “%s” 
disabling"),
+                                      /* translators: %s is replaced with the entry name */
+                                      _("Beautifier plugin: command key out of possible values: entry “%s” 
disabled"),
                                       display_name);
 
                   if (entry.is_config_file_temp)
@@ -326,9 +326,9 @@ add_entries_from_config_ini_file (GbBeautifierEditorAddin *self,
 
               if (g_strstr_len (command_pattern, -1, "@c@") != NULL && config_file == NULL)
                 {
-                  /* translators: %s and %s are replaced with the profile name and the entry name */
                   ide_object_warning (self,
-                                      _("Beautifier plugin: @c@ in “%s” command-pattern key but no config 
file set: entry “%s” disabling"),
+                                      /* translators: %s and %s are replaced with the profile name and the 
entry name */
+                                      _("Beautifier plugin: @c@ in “%s” command-pattern key but no config 
file set: entry “%s” disabled"),
                                       profile,
                                       display_name);
                   continue;
@@ -358,9 +358,9 @@ add_entries_from_config_ini_file (GbBeautifierEditorAddin *self,
 
                       if (NULL == (arg.str = copy_to_tmp_file (self, self->tmp_dir, strv[j], is_executable)))
                         {
-                          /* translators: %s and %s are replaced with the profile name and the entry name */
                           ide_object_warning (self,
-                                              _("Beautifier plugin: can't create temporary file for “%s”: 
entry “%s” disabling"),
+                                              /* translators: %s and %s are replaced with the profile name 
and the entry name */
+                                              _("Beautifier plugin: can’t create temporary file for “%s”: 
entry “%s” disabled"),
                                               strv[j],
                                               display_name);
 
@@ -539,14 +539,14 @@ gb_beautifier_config_get_map (GbBeautifierEditorAddin *self,
   if (!g_file_query_exists (file, NULL))
     {
       /* translators: %s is replaced with a path name */
-      ide_object_warning (self, _("Beautifier plugin: the path “%s” doesn't exist"), file_name);
+      ide_object_warning (self, _("Beautifier plugin: the path “%s” doesn’t exist"), file_name);
       return map;
     }
 
   if (!g_file_load_contents (file, NULL, &data, &data_len, NULL, NULL))
     {
       /* translators: %s is replaced with a path name */
-      ide_object_warning (self, _("Beautifier plugin: can't read the following resource file: “%s”"), 
file_name);
+      ide_object_warning (self, _("Beautifier plugin: can’t read the following resource file: “%s”"), 
file_name);
       return map;
     }
 
diff --git a/src/plugins/beautifier/gb-beautifier-helper.c b/src/plugins/beautifier/gb-beautifier-helper.c
index b68bd62..1406ef3 100644
--- a/src/plugins/beautifier/gb-beautifier-helper.c
+++ b/src/plugins/beautifier/gb-beautifier-helper.c
@@ -60,9 +60,9 @@ gb_beautifier_helper_remove_temp_for_path (GbBeautifierEditorAddin *self,
     g_unlink (path);
   else
     {
-      /* translators: %s and %s are replaced with the temporary dir and the file path */
       ide_object_warning (self,
-                          _("Beautifier plugin: blocked attempt to remove a file outside of the “%s” 
temporary dir: “%s”"),
+                          /* translators: %s and %s are replaced with the temporary dir and the file path */
+                          _("Beautifier plugin: blocked attempt to remove a file outside of the “%s” 
temporary directory: “%s”"),
                           tmp_dir,
                           path);
       return;
@@ -85,9 +85,9 @@ gb_beautifier_helper_remove_temp_for_file (GbBeautifierEditorAddin *self,
     g_file_delete (file, NULL, NULL);
   else
     {
-      /* translators: %s and %s are replaced with the temporary dir and the file path */
       ide_object_warning (self,
-                          _("Beautifier plugin: blocked attempt to remove a file outside of the “%s” 
temporary dir: “%s”"),
+                          /* translators: %s and %s are replaced with the temporary dir and the file path */
+                          _("Beautifier plugin: blocked attempt to remove a file outside of the “%s” 
temporary directory: “%s”"),
                           tmp_dir,
                           path);
       return;
@@ -115,9 +115,9 @@ gb_beautifier_helper_config_entry_remove_temp_files (GbBeautifierEditorAddin *se
             g_file_delete (config_entry->config_file, NULL, NULL);
           else
             {
-              /* translators: %s and %s are replaced with the temporary dir and the file path */
               ide_object_warning (self,
-                                  _("Beautifier plugin: blocked attempt to remove a file outside of the “%s” 
temporary dir: “%s”"),
+                                  /* translators: %s and %s are replaced with the temporary dir and the file 
path */
+                                  _("Beautifier plugin: blocked attempt to remove a file outside of the “%s” 
temporary directory: “%s”"),
                                   tmp_dir,
                                   config_path);
               return;
@@ -137,7 +137,7 @@ gb_beautifier_helper_config_entry_remove_temp_files (GbBeautifierEditorAddin *se
               else
                 {
                   ide_object_warning (self,
-                                      _("Beautifier plugin: blocked attempt to remove a file outside of the 
“%s” temporary dir: “%s”"),
+                                      _("Beautifier plugin: blocked attempt to remove a file outside of the 
“%s” temporary directory: “%s”"),
                                       tmp_dir,
                                       arg->str);
                   return;
diff --git a/src/plugins/beautifier/gb-beautifier-process.c b/src/plugins/beautifier/gb-beautifier-process.c
index 4ef0693..2188360 100644
--- a/src/plugins/beautifier/gb-beautifier-process.c
+++ b/src/plugins/beautifier/gb-beautifier-process.c
@@ -247,8 +247,8 @@ process_communicate_utf8_cb (GObject      *object,
     {
       if (g_subprocess_get_if_exited (process) && g_subprocess_get_exit_status (process) != 0)
         {
-          /* translators: %s is replaced with the command error message */
           ide_object_warning (state->self,
+                              /* translators: %s is replaced with the command error message */
                               _("Beautifier plugin: command error output: %s"),
                               stderr_str);
         }
@@ -286,7 +286,7 @@ process_communicate_utf8_cb (GObject      *object,
       g_task_return_boolean (task, TRUE);
     }
   else
-    ide_object_warning (state->self,_("Beautify plugin: the output is not a valid utf8 text"));
+    ide_object_warning (state->self,_("Beautify plugin: the output is not a valid UTF-8 text"));
 }
 
 static void


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