[sound-juicer] Fix translator comments



commit 588a52aa617f42597a27b4758b9bbef9669ef6cb
Author: Phillip Wood <phillip wood dunelm org uk>
Date:   Tue Jun 21 12:17:40 2016 +0100

    Fix translator comments
    
    Translator comments need to be prefixed with ‘Translators:’ (NB xgettext
    is case sensitive) they must also be on the line immediately preceding
    the translated string. Some translator comments were previously missing
    from the pot file as they weren’t close enough to the translated
    string. Also remove the leading ‘*’ from comment continuation lines as
    xgettext passes them verbatim which messes up the appearance of
    translator comments in the pot file.  Using a prefix remove some
    unrelated comments from the pot file.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=769623

 libjuicer/sj-metadata-musicbrainz5.c |   18 +++++++-------
 po/Makevars                          |    3 +-
 src/sj-about.c                       |    2 +-
 src/sj-main.c                        |   45 ++++++++++++++++------------------
 4 files changed, 33 insertions(+), 35 deletions(-)
---
diff --git a/libjuicer/sj-metadata-musicbrainz5.c b/libjuicer/sj-metadata-musicbrainz5.c
index b06d1a9..1468e34 100644
--- a/libjuicer/sj-metadata-musicbrainz5.c
+++ b/libjuicer/sj-metadata-musicbrainz5.c
@@ -518,16 +518,16 @@ build_composer_text (GSList  *composers,
 
   if (flags & HAVE_COMPOSERS) {
     if (flags & HAVE_ARRANGERS) {
-      /* Tranlators: This string is used to build the composer tag when a
-         track has composers and arrangers, or a composer and a mixture
-         of arrangers, orchestrators and transcribers */
+      /* Translators: This string is used to build the composer tag
+         when a track has composers and arrangers, or a composer and a
+         mixture of arrangers, orchestrators and transcribers */
       *name = g_strdup_printf (_("%s arr. %s"), comp, arr);
     } else if (flags & HAVE_ORCHESTRATORS) {
-      /* Tranlators: This string is used to build the composer tag
+      /* Translators: This string is used to build the composer tag
          when a track has composers and orchestrators */
       *name = g_strdup_printf (_("%s orch. %s"), comp, arr);
     } else if (flags & HAVE_TRANSCRIBERS) {
-      /* Tranlators: This string is used to build the composer tag
+      /* Translators: This string is used to build the composer tag
          when a track has composers and transcribers */
       *name = g_strdup_printf (_("%s trans. %s"), comp, arr);
     } else {
@@ -536,16 +536,16 @@ build_composer_text (GSList  *composers,
     }
   } else {
     if (flags & HAVE_ARRANGERS) {
-      /* Tranlators: This string is used to build the composer tag when
-         a track has a mixture of arrangers, orchestrators and
+      /* Translators: This string is used to build the composer tag
+         when a track has a mixture of arrangers, orchestrators and
          transcribers but no composers */
       *name = g_strdup_printf (_("arr. %s"), arr);
     } else if (flags & HAVE_ORCHESTRATORS) {
-      /* Tranlators: This string is used to build the composer tag
+      /* Translators: This string is used to build the composer tag
          when a track has orchestrators but no composer */
       *name = g_strdup_printf (_("orch. %s"), arr);
     } else if (flags & HAVE_TRANSCRIBERS) {
-      /* Tranlators: This string is used to build the composer tag
+      /* Translators: This string is used to build the composer tag
          when a track has a transcribers but no composer */
       *name = g_strdup_printf (_("trans. %s"), arr);
     }
diff --git a/po/Makevars b/po/Makevars
index 06fd6fe..8342d46 100644
--- a/po/Makevars
+++ b/po/Makevars
@@ -54,7 +54,8 @@ XGETTEXT_OPTIONS = --from-code=UTF-8                                  \
                --flag=g_vfprintf:2:c-format                          \
                --flag=g_vprintf:1:c-format                           \
                --flag=g_vsnprintf:3:c-format                         \
-               --flag=g_vsprintf:2:c-format
+               --flag=g_vsprintf:2:c-format                          \
+               --add-comments=Translators:
 
 # This is the copyright holder that gets inserted into the header of the
 # $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
diff --git a/src/sj-about.c b/src/sj-about.c
index 074ebb3..e61639b 100644
--- a/src/sj-about.c
+++ b/src/sj-about.c
@@ -74,7 +74,7 @@ void show_about_dialog (void)
                          "documenters", documentors,
                          "artists", artists,
                          /*
-                          * Note to translators: put here your name and email so it will show
+                          * Translators: put here your name and email so it will show
                           * up in the "about" box
                           */
                          "translator-credits", _("translator-credits"),
diff --git a/src/sj-main.c b/src/sj-main.c
index 2221e2b..0a3c9c0 100644
--- a/src/sj-main.c
+++ b/src/sj-main.c
@@ -925,55 +925,51 @@ static char *format_release_details (AlbumDetails *album)
     if (album->labels) {
       if (album->release_date && gst_date_time_has_year (album->release_date)) {
         /* Translators: this string appears when multiple CDs were
-         * found in musicbrainz online database, it corresponds to
-         * "Released: <country> in <year> on <label>" */
-        g_string_append_printf (details,
-                                _("Released: %s in %d on %s"),
+           found in musicbrainz online database, it corresponds to
+           "Released: <country> in <year> on <label>" */
+        g_string_append_printf (details, _("Released: %s in %d on %s"),
                                 album->country,
                                 gst_date_time_get_year (album->release_date),
                                 label_text->str);
       } else {
         /* Translators: this string appears when multiple CDs were
-         * found in musicbrainz online database, it corresponds to
-         * "Released: <country> on <label>" */
-        g_string_append_printf (details,
-                                _("Released: %s on %s"),
+           found in musicbrainz online database, it corresponds to
+           "Released: <country> on <label>" */
+        g_string_append_printf (details, _("Released: %s on %s"),
                                 album->country, label_text->str);
       }
     } else if (album->release_date && gst_date_time_has_year (album->release_date)) {
       /* Translators: this string appears when multiple CDs were
-       * found in musicbrainz online database, it corresponds to
-       * "Released: <country> in <year>" */
-      g_string_append_printf (details,
-                              _("Released: %s in %d"),
+         found in musicbrainz online database, it corresponds to
+         "Released: <country> in <year>" */
+      g_string_append_printf (details, _("Released: %s in %d"),
                               album->country,
                               gst_date_time_get_year (album->release_date));
     } else {
       /* Translators: this string appears when multiple CDs were
-       * found in musicbrainz online database, it corresponds to
-       * "Released: <country>" */
+         found in musicbrainz online database, it corresponds to
+         "Released: <country>" */
       g_string_append_printf (details, _("Released: %s"), album->country);
     }
   } else if (album->release_date && gst_date_time_has_year (album->release_date)) {
     if (album->labels) {
         /* Translators: this string appears when multiple CDs were
-         * found in musicbrainz online database, it corresponds to
-         * "Released in <year> on <label>" */
-       g_string_append_printf (details,
-                               _("Released in %d on %s"),
+           found in musicbrainz online database, it corresponds to
+           "Released in <year> on <label>" */
+       g_string_append_printf (details, _("Released in %d on %s"),
                                gst_date_time_get_year (album->release_date),
                                label_text->str);
     } else {
         /* Translators: this string appears when multiple CDs were
-         * found in musicbrainz online database, it corresponds to
-         * "Released in <year>" */
+           found in musicbrainz online database, it corresponds to
+           "Released in <year>" */
         g_string_append_printf (details, _("Released in %d"),
                                 gst_date_time_get_year (album->release_date));
     }
   } else if (album->labels) {
     /* Translators: this string appears when multiple CDs were
-     * found in musicbrainz online database, it corresponds to
-     * "Released on <label>" */
+       found in musicbrainz online database, it corresponds to
+       "Released on <label>" */
     g_string_append_printf (details, _("Released on %s"), label_text->str);
   } else {
     g_string_append_printf (details,
@@ -982,11 +978,12 @@ static char *format_release_details (AlbumDetails *album)
 
   if (catalog_number_text != NULL) {
     if (album->barcode != NULL) {
-      /* Translators: the "Barcode" string identifies the number of the barcode
-       * printed on the release */
       g_string_append_printf (details,
                               "\n%s, %s %s",
                               catalog_number_text,
+                              /* Translators: this string identifies
+                                 the number of the barcode printed on
+                                 the release */
                               _("Barcode:"),
                               album->barcode);
     } else {


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