From 59c0060f0779f7e6823fa1f7a7ff4752fb07f205 Mon Sep 17 00:00:00 2001
From: Nico Alt <nicoalt@posteo.org>
Date: Thu, 6 Jun 2019 10:37:27 +0200
Subject: [PATCH] Add context to translations and fix UTF-8

Also tested this by translating a little bit to German and Spanish.
---
 data/ui/chat.ui  |  2 +-
 data/ui/login.ui |  2 +-
 data/ui/setup.ui | 10 +++++-----
 po/briar-gtk.pot | 17 ++++++++++++++---
 po/de.po         | 34 +++++++++++++++++++++++++++-------
 po/es.po         | 32 ++++++++++++++++++++++++++------
 6 files changed, 74 insertions(+), 23 deletions(-)

diff --git a/data/ui/chat.ui b/data/ui/chat.ui
index 8d5e50c..c64048e 100644
--- a/data/ui/chat.ui
+++ b/data/ui/chat.ui
@@ -26,7 +26,7 @@
       <object class="GtkEntry" id="chat_entry">
         <property name="visible">True</property>
         <property name="can_focus">True</property>
-        <property name="placeholder_text" translatable="yes">Type Message</property>
+        <property name="placeholder_text" translatable="yes" context="chat page: input field">Type Message</property>
         <property name="show_emoji_icon">True</property>
       </object>
       <packing>
diff --git a/data/ui/login.ui b/data/ui/login.ui
index c4d7168..27d9255 100644
--- a/data/ui/login.ui
+++ b/data/ui/login.ui
@@ -41,7 +41,7 @@
           <object class="GtkButton" id="login_button">
             <property name="visible">True</property>
             <property name="halign">center</property>
-            <property name="label" translatable="yes">Sign in</property>
+            <property name="label" translatable="yes" context="login page: button">Sign in</property>
             <signal name="clicked" handler="on_login_pressed"/>
           </object>
           <packing>
diff --git a/data/ui/setup.ui b/data/ui/setup.ui
index af57f3b..bdb9150 100644
--- a/data/ui/setup.ui
+++ b/data/ui/setup.ui
@@ -30,7 +30,7 @@
         <child>
           <object class="GtkEntry" id="username_entry">
             <property name="visible">True</property>
-            <property name="placeholder_text" translatable="yes">Choose your nickname</property>
+            <property name="placeholder_text" translatable="yes" context="registration page: input field">Choose your nickname</property>
           </object>
           <packing>
             <property name="left_attach">1</property>
@@ -41,7 +41,7 @@
           <object class="GtkButton" id="username_next">
             <property name="visible">True</property>
             <property name="halign">center</property>
-            <property name="label" translatable="yes">Next</property>
+            <property name="label" translatable="yes" context="registration page: button – from username to passwords">Next</property>
             <signal name="clicked" handler="on_username_button_clicked"/>
           </object>
           <packing>
@@ -72,7 +72,7 @@
           <object class="GtkEntry" id="password_entry">
             <property name="visible">True</property>
             <property name="visibility">False</property>
-            <property name="placeholder_text" translatable="yes">Choose your password</property>
+            <property name="placeholder_text" translatable="yes" context="registration page: password input field">Choose your password</property>
           </object>
           <packing>
             <property name="left_attach">1</property>
@@ -83,7 +83,7 @@
           <object class="GtkEntry" id="password_confirm_entry">
             <property name="visible">True</property>
             <property name="visibility">False</property>
-            <property name="placeholder_text" translatable="yes">Confirm your password</property>
+            <property name="placeholder_text" translatable="yes" context="registration page: password input field">Confirm your password</property>
           </object>
           <packing>
             <property name="left_attach">1</property>
@@ -94,7 +94,7 @@
           <object class="GtkButton" id="password_next">
             <property name="visible">True</property>
             <property name="halign">center</property>
-            <property name="label" translatable="yes">Next</property>
+            <property name="label" translatable="yes" context="registration page: button">Create Account</property>
             <signal name="clicked" handler="on_password_button_clicked"/>
           </object>
           <packing>
diff --git a/po/briar-gtk.pot b/po/briar-gtk.pot
index 465c79b..66d90b7 100644
--- a/po/briar-gtk.pot
+++ b/po/briar-gtk.pot
@@ -8,16 +8,17 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2019-06-01 18:15+0200\n"
+"POT-Creation-Date: 2019-06-06 10:35+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language: \n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 
 #: ../data/ui/chat.ui:29
+msgctxt "chat page: input field"
 msgid "Type Message"
 msgstr ""
 
@@ -26,6 +27,7 @@ msgid "Password"
 msgstr ""
 
 #: ../data/ui/login.ui:44
+msgctxt "login page: button"
 msgid "Sign in"
 msgstr ""
 
@@ -34,17 +36,26 @@ msgid "Nickname"
 msgstr ""
 
 #: ../data/ui/setup.ui:33
+msgctxt "registration page: input field"
 msgid "Choose your nickname"
 msgstr ""
 
-#: ../data/ui/setup.ui:44 ../data/ui/setup.ui:97
+#: ../data/ui/setup.ui:44
+msgctxt "registration page: button – from username to passwords"
 msgid "Next"
 msgstr ""
 
 #: ../data/ui/setup.ui:75
+msgctxt "registration page: password input field"
 msgid "Choose your password"
 msgstr ""
 
 #: ../data/ui/setup.ui:86
+msgctxt "registration page: password input field"
 msgid "Confirm your password"
 msgstr ""
+
+#: ../data/ui/setup.ui:97
+msgctxt "registration page: button"
+msgid "Create Account"
+msgstr ""
diff --git a/po/de.po b/po/de.po
index 94ab27f..8a1c23e 100644
--- a/po/de.po
+++ b/po/de.po
@@ -1,31 +1,51 @@
+msgid ""
+msgstr ""
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-06-06 10:35+0200\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
 #: ../data/ui/chat.ui:29
+msgctxt "chat page: input field"
 msgid "Type Message"
-msgstr ""
+msgstr "Nachricht eingeben"
 
 #: ../data/ui/login.ui:23 ../data/ui/setup.ui:64
 msgid "Password"
 msgstr "Passwort"
 
 #: ../data/ui/login.ui:44
+msgctxt "login page: button"
 msgid "Sign in"
-msgstr ""
+msgstr "Login"
 
 #: ../data/ui/setup.ui:23
 msgid "Nickname"
 msgstr "Nutzername"
 
 #: ../data/ui/setup.ui:33
+msgctxt "registration page: input field"
 msgid "Choose your nickname"
-msgstr ""
+msgstr "Wähle Deinen Benutzernamen"
 
-#: ../data/ui/setup.ui:44 ../data/ui/setup.ui:97
+#: ../data/ui/setup.ui:44
+msgctxt "registration page: button – from username to passwords"
 msgid "Next"
-msgstr ""
+msgstr "Weiter"
 
 #: ../data/ui/setup.ui:75
+msgctxt "registration page: password input field"
 msgid "Choose your password"
-msgstr ""
+msgstr "Wähle Dein Passwort"
 
 #: ../data/ui/setup.ui:86
+msgctxt "registration page: password input field"
 msgid "Confirm your password"
-msgstr ""
+msgstr "Bestätige Dein Passwort"
+
+#: ../data/ui/setup.ui:97
+msgctxt "registration page: button"
+msgid "Create Account"
+msgstr "Account erstellen"
diff --git a/po/es.po b/po/es.po
index 8e48903..f213f71 100644
--- a/po/es.po
+++ b/po/es.po
@@ -1,31 +1,51 @@
+msgid ""
+msgstr ""
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-06-06 10:35+0200\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
 #: ../data/ui/chat.ui:29
+msgctxt "chat page: input field"
 msgid "Type Message"
 msgstr ""
 
 #: ../data/ui/login.ui:23 ../data/ui/setup.ui:64
 msgid "Password"
-msgstr ""
+msgstr "Contraseña"
 
 #: ../data/ui/login.ui:44
+msgctxt "login page: button"
 msgid "Sign in"
 msgstr ""
 
 #: ../data/ui/setup.ui:23
 msgid "Nickname"
-msgstr ""
+msgstr "Nombre"
 
 #: ../data/ui/setup.ui:33
+msgctxt "registration page: input field"
 msgid "Choose your nickname"
-msgstr ""
+msgstr "Elegir tu nombre"
 
-#: ../data/ui/setup.ui:44 ../data/ui/setup.ui:97
+#: ../data/ui/setup.ui:44
+msgctxt "registration page: button – from username to passwords"
 msgid "Next"
 msgstr "Seguir"
 
 #: ../data/ui/setup.ui:75
+msgctxt "registration page: password input field"
 msgid "Choose your password"
-msgstr ""
+msgstr "Elegir tu contraseña"
 
 #: ../data/ui/setup.ui:86
+msgctxt "registration page: password input field"
 msgid "Confirm your password"
-msgstr ""
+msgstr "Confirmar tu contraseña"
+
+#: ../data/ui/setup.ui:97
+msgctxt "registration page: button"
+msgid "Create Account"
+msgstr "Crear cuenta"
-- 
GitLab