[folks] bluez: Fix translatable strings spanning multiple lines



commit 983bb285a223f834092a21098801c850cf9b256a
Author: Rafael Ferreira <rafael f f1 gmail com>
Date:   Fri Dec 20 14:42:26 2013 +0000

    bluez: Fix translatable strings spanning multiple lines
    
    gettext versions older than 0.18.3 don’t support multi-line translatable
    strings in Vala source code. Rather than bumping the gettext version,
    don’t split the strings.
    
    In future, the gettext dependency can be bumped to 0.18.3 and the
    strings can be line-wrapped again.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720707

 NEWS                                    |    1 +
 backends/bluez/bluez-backend.vala       |    8 ++------
 backends/bluez/bluez-persona-store.vala |   25 +++++++++++--------------
 3 files changed, 14 insertions(+), 20 deletions(-)
---
diff --git a/NEWS b/NEWS
index 1b8e57d..9eca8bd 100644
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ Major changes:
 Bugs fixed:
  • Bug 651672 — Individual should have a display-name property
  • Bug 648811 — Add a dummy backend
+ • Bug 720707 — New strings partly not translatable
 
 API changes:
  • Add Individual.display_name
diff --git a/backends/bluez/bluez-backend.vala b/backends/bluez/bluez-backend.vala
index 1966a68..42d9fb9 100644
--- a/backends/bluez/bluez-backend.vala
+++ b/backends/bluez/bluez-backend.vala
@@ -510,10 +510,7 @@ public class Folks.Backends.BlueZ.Backend : Folks.Backend
           catch (GLib.Error e1)
             {
               throw new DBusError.SERVICE_UNKNOWN (
-                  _("No BlueZ 5 object manager running, so the BlueZ " +
-                    "backend will be inactive. Either your BlueZ " +
-                    "installation is too old (only version 5 is supported) " +
-                    "or the service can’t be started."));
+                  _("No BlueZ 5 object manager running, so the BlueZ backend will be inactive. Either your 
BlueZ installation is too old (only version 5 is supported) or the service can’t be started."));
             }
 
           /* Set up the OBEX client which will be used for all transfers. */
@@ -526,8 +523,7 @@ public class Folks.Backends.BlueZ.Backend : Folks.Backend
           catch (GLib.Error e1)
             {
               throw new DBusError.SERVICE_UNKNOWN (
-                  _("Error connecting to OBEX transfer daemon over D-Bus. " +
-                    "Ensure BlueZ and obexd are installed."));
+                  _("Error connecting to OBEX transfer daemon over D-Bus. Ensure BlueZ and obexd are 
installed."));
             }
 
           /* Successfully connected to both D-Bus services. Now connect up some
diff --git a/backends/bluez/bluez-persona-store.vala b/backends/bluez/bluez-persona-store.vala
index a9351c9..44d69f4 100644
--- a/backends/bluez/bluez-persona-store.vala
+++ b/backends/bluez/bluez-persona-store.vala
@@ -33,6 +33,9 @@ using Folks;
 using Folks.Backends.BlueZ;
 using org.bluez;
 
+/* FIXME: Once we depend on gettext 0.18.3, translatable strings can once more
+ * be split over multiple lines without breaking the .po file. */
+
 /**
  * A persona store which is associated with a single BlueZ PBAP server (i.e.
  * one { link PersonaStore} per device). It will create a { link Persona} for
@@ -566,8 +569,7 @@ public class Folks.Backends.BlueZ.PersonaStore : Folks.PersonaStore
               throw new PersonaStoreError.STORE_OFFLINE (
                   /* Translators: the first parameter is the name of the failed
                    * transfer, and the second is a Bluetooth device alias. */
-                  _("Error during transfer of the address book ‘%s’ from " +
-                    "Bluetooth device ‘%s’."),
+                  _("Error during transfer of the address book ‘%s’ from Bluetooth device ‘%s’."),
                   transfer.name, this._display_name);
             }
           else
@@ -581,8 +583,7 @@ public class Folks.Backends.BlueZ.PersonaStore : Folks.PersonaStore
               /* Translators: the first parameter is the name of the
                * failed transfer, the second is a Bluetooth device
                * alias, and the third is an error message. */
-              _("Error during transfer of the address book ‘%s’ from " +
-                "Bluetooth device ‘%s’: %s"),
+              _("Error during transfer of the address book ‘%s’ from Bluetooth device ‘%s’: %s"),
               transfer.name, this._display_name, e2.message);
         }
       finally
@@ -665,16 +666,14 @@ public class Folks.Backends.BlueZ.PersonaStore : Folks.PersonaStore
                    * to the phone’s address book over Bluetooth, after accepting
                    * the pairing request. */
                   throw new PersonaStoreError.PERMISSION_DENIED (
-                      _("Permission to access the address book on Bluetooth " +
-                        "device ‘%s’ was denied by the user."),
+                      _("Permission to access the address book on Bluetooth device ‘%s’ was denied by the 
user."),
                       this._device.alias);
                 }
 
               throw new PersonaStoreError.STORE_OFFLINE (
                   /* Translators: the first parameter is a Bluetooth device
                    * alias, and the second is an error message. */
-                  _("An OBEX address book transfer from device ‘%s’ could " +
-                    "not be started: %s"),
+                  _("An OBEX address book transfer from device ‘%s’ could not be started: %s"),
                   this._device.alias, e1.message);
             }
 
@@ -694,8 +693,7 @@ public class Folks.Backends.BlueZ.PersonaStore : Folks.PersonaStore
               throw new PersonaStoreError.STORE_OFFLINE (
                   /* Translators: the first parameter is a Bluetooth device
                    * alias, and the second is an error message. */
-                  _("The OBEX address book transfer from device ‘%s’ " +
-                    "failed: %s"),
+                  _("The OBEX address book transfer from device ‘%s’ failed: %s"),
                   this._device.alias, e2.message);
             }
 
@@ -712,8 +710,7 @@ public class Folks.Backends.BlueZ.PersonaStore : Folks.PersonaStore
               throw new PersonaStoreError.STORE_OFFLINE (
                   /* Translators: the first parameter is a Bluetooth device
                    * alias, and the second is an error message. */
-                  _("Error during transfer of the address book from " +
-                    "Bluetooth device ‘%s’: %s"),
+                  _("Error during transfer of the address book from Bluetooth device ‘%s’: %s"),
                   this._display_name, e3.message);
             }
         }
@@ -764,8 +761,8 @@ public class Folks.Backends.BlueZ.PersonaStore : Folks.PersonaStore
                * Act as if the store has gone offline and mark preparation as
                * complete. */
               throw new PersonaStoreError.STORE_OFFLINE (
-                  _("Bluetooth device ‘%s’ disappeared during address book " +
-                    "transfer."), this._device.alias);
+                  _("Bluetooth device ‘%s’ disappeared during address book transfer."),
+                  this._device.alias);
             }
           finally
             {


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