diff --git a/briar-gtk/briar_gtk/widgets/about_dialog.py b/briar-gtk/briar_gtk/widgets/about_dialog.py index 32749a617698478f0c287d05bc6806909f0ea236..ae96bae9dea5d9d4f51ab99a4249b272c5238a53 100644 --- a/briar-gtk/briar_gtk/widgets/about_dialog.py +++ b/briar-gtk/briar_gtk/widgets/about_dialog.py @@ -4,7 +4,7 @@ import os -from gettext import gettext as _ +from gettext import pgettext as _t from gi.repository import Gtk @@ -34,7 +34,10 @@ class AboutDialogWidget(): self._about_dialog.connect("response", self._on_about_response) def _add_code_section(self): - code_use_title = _("Using code by") + code_use_title = _t( + "Used in about dialog to credit other programs like GNOME Fractal", + "Using code by" + ) code_use_list = [ "GNOME Fractal https://wiki.gnome.org/Apps/Fractal", "GNOME Lollypop https://wiki.gnome.org/Apps/Lollypop", @@ -45,7 +48,11 @@ class AboutDialogWidget(): # pylint: disable=line-too-long def _add_briar_section(self): - briar_functionality_title = _("Briar functionality by") + briar_functionality_title = _t( + "Used in about dialog to credit " + "Briar components like its REST API", + "Briar functionality by" + ) briar_functionality_list = [ "Briar REST API https://code.briarproject.org/briar/briar/tree/master/briar-headless", # noqa "Briar Python Wrapper https://code.briarproject.org/briar/python-briar-wrapper", # noqa diff --git a/briar-gtk/briar_gtk/widgets/private_message.py b/briar-gtk/briar_gtk/widgets/private_message.py index 73d40a60820a8aa562331b23d68e00d523d9f37a..df8c293185bafaf58fddd45f3017599802bbd3bb 100644 --- a/briar-gtk/briar_gtk/widgets/private_message.py +++ b/briar-gtk/briar_gtk/widgets/private_message.py @@ -6,7 +6,7 @@ # https://gitlab.gnome.org/GNOME/fractal/-/tags/4.2.2 from datetime import datetime -from gettext import gettext as _ +from gettext import pgettext as _t from gi.repository import Gtk @@ -23,7 +23,11 @@ class PrivateMessageWidget(Gtk.ListBoxRow): username = contact_name username_style_class = "username" if message["local"]: - username = _("Myself") + username = _t( + "Used in message history to indicate that message is" + "by the user itself, not by its contact", + "Myself" + ) username_style_class = "username-self" username_info = PrivateMessageWidget._create_username_info( diff --git a/briar-gtk/briar_gtk/window.py b/briar-gtk/briar_gtk/window.py index 3ef29177419d8094375c3012bef5252154d510cb..d52b3d751c30cfa739e9cec664a23e2f32fbbf81 100644 --- a/briar-gtk/briar_gtk/window.py +++ b/briar-gtk/briar_gtk/window.py @@ -45,8 +45,9 @@ class Window(Gtk.ApplicationWindow): text=_("Are you sure you want to exit?") ) confirmation_dialog.format_secondary_text( - _("Once you close Briar, you'll no longer receive or send " - "pending messages. Keep Briar open to stay connected " + _("Once you close Briar, you'll no longer " + "receive messages nor send pending ones. " + "Keep Briar open to stay connected " "with your contacts.") ) response = confirmation_dialog.run() diff --git a/briar-gtk/data/app.briar.gtk.metainfo.xml.in b/briar-gtk/data/app.briar.gtk.metainfo.xml.in index d8dea4abff5f9c9a2012493bbed88f7d17515e95..69a897fc8aec890990876f75f878d815cd37a31c 100644 --- a/briar-gtk/data/app.briar.gtk.metainfo.xml.in +++ b/briar-gtk/data/app.briar.gtk.metainfo.xml.in @@ -45,7 +45,7 @@ <image type="source">https://code.briarproject.org/briar/briar-gtk/raw/fff8cbe97dc8e6c759b978e6d7d8608a3105b9c0/tools/screenshots/briar-gtk-screenshot-2.png</image> </screenshot> <screenshot> - <caption>Adding contacts on a distance</caption> + <caption>Adding contacts at a distance</caption> <image type="source">https://code.briarproject.org/briar/briar-gtk/raw/fff8cbe97dc8e6c759b978e6d7d8608a3105b9c0/tools/screenshots/briar-gtk-screenshot-3.png</image> </screenshot> <screenshot> @@ -70,7 +70,7 @@ </p> <ul> <li>Basic notification support</li> - <li>Support for deleting contacts</li> + <li>Support for contact deletion</li> <li>Hugely improved chat UI</li> <li>Full Spanish and German translations</li> <li>Migration to libhandy 1.0</li> @@ -100,7 +100,7 @@ <description> <p> The very first alpha release of Briar GTK. - It allows to add contacts on a distance and chatting with them in private chats. Other functions like groups, forums and blogs are to be implemented. + It allows adding contacts remotely and chatting with them in private chats. Other functions like groups, forums and blogs are to be implemented. </p> </description> <url>https://code.briarproject.org/briar/briar-gtk/-/tags/0.1.0-alpha1</url> diff --git a/briar-gtk/data/ui/about_dialog.ui.in b/briar-gtk/data/ui/about_dialog.ui.in index 11c5bf6be62283c481126158c817d75cc3d10835..848733c8e86f85e80435103ec49710c18675ba62 100644 --- a/briar-gtk/data/ui/about_dialog.ui.in +++ b/briar-gtk/data/ui/about_dialog.ui.in @@ -16,12 +16,12 @@ <property name="type_hint">normal</property> <property name="program_name">Briar GTK</property> <property name="version">@VERSION@</property> - <property name="copyright">Copyright © 2019-2020 The Briar Project</property> - <property name="comments" translatable="yes">A Briar client for GTK desktop and mobile devices</property> + <property name="copyright" translatable="yes" context="Used in about dialog">Copyright © 2019-2020 The Briar Project</property> + <property name="comments" translatable="yes" context="Used in about dialog">A Briar client for GTK desktop and mobile devices</property> <property name="website">@PACKAGE_URL@</property> - <property name="website_label" translatable="yes">Visit Briar GTK website</property> + <property name="website_label" translatable="yes" context="Used in about dialog to get to website">Visit Briar GTK website</property> <property name="authors">Nico Alt https://nico.dorfbrunnen.eu</property> - <property name="translator_credits">Nico Alt https://nico.dorfbrunnen.eu</property> + <property name="translator_credits" translatable="yes" context="Used in about dialog; replace Nico with yourself to get credited in your translation; multiple persons can be added by adding new lines">Nico Alt</property> <property name="logo_icon_name">app.briar.gtk</property> <property name="license_type">agpl-3-0-only</property> </object> diff --git a/briar-gtk/data/ui/add_contact.ui b/briar-gtk/data/ui/add_contact.ui index d9d2e1da799158c8f0a2089e1bd5365ac201a5cb..f6251619c7af8257f03a60e943ce4942bc4e1acd 100644 --- a/briar-gtk/data/ui/add_contact.ui +++ b/briar-gtk/data/ui/add_contact.ui @@ -26,7 +26,7 @@ <property name="visible">True</property> <property name="use_underline">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes" context="add contact">Give this link to the contact you want to add</property> + <property name="label" translatable="yes" context="Used in add contact page">Give this link to the contact you want to add</property> <property name="wrap">True</property> <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property> <property name="mnemonic_widget">own_link_entry</property> @@ -58,7 +58,7 @@ <property name="visible">True</property> <property name="use_underline">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes" context="add contact">Enter the link from your contact here</property> + <property name="label" translatable="yes" context="Used in add contact page">Enter the link from your contact here</property> <property name="wrap">True</property> <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property> <property name="mnemonic_widget">their_link_entry</property> @@ -77,7 +77,7 @@ <property name="max_width_chars">-1</property> <property name="width_request">232</property> <property name="can_focus">True</property> - <property name="placeholder_text" translatable="yes" context="add contact">Contact's link</property> + <property name="placeholder_text" translatable="yes" context="Used in add contact page">Contact's link</property> <property name="input_purpose">GTK_INPUT_PURPOSE_URL</property> </object> <packing> @@ -90,7 +90,7 @@ <property name="visible">False</property> <property name="can_focus">False</property> <property name="no_show_all">True</property> - <property name="label" translatable="yes" context="add contact">Please enter a link</property> + <property name="label" translatable="yes" context="Used in add contact page">Please enter a link</property> <property name="wrap">True</property> <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property> <style> @@ -120,7 +120,7 @@ <property name="visible">True</property> <property name="use_underline">True</property> <property name="can_focus">False</property> - <property name="label" translatable="yes" context="add contact">Give your contact a nickname. Only you can see it.</property> + <property name="label" translatable="yes" context="Used in add contact page">Give your contact a nickname. Only you can see it.</property> <property name="halign">end</property> <property name="wrap">True</property> <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property> @@ -140,7 +140,7 @@ <property name="max_width_chars">-1</property> <property name="width_request">232</property> <property name="can_focus">True</property> - <property name="placeholder_text" translatable="yes" context="add contact">Enter a nickname</property> + <property name="placeholder_text" translatable="yes" context="Used in add contact page">Enter a nickname</property> </object> <packing> <property name="top-attach">2</property> @@ -153,7 +153,7 @@ <property name="can_focus">False</property> <property name="no_show_all">True</property> <property name="xalign">0</property> - <property name="label" translatable="yes" context="add contact">Please enter a nickname</property> + <property name="label" translatable="yes" context="Used in add contact page">Please enter a nickname</property> <property name="wrap">True</property> <property name="wrap_mode">PANGO_WRAP_WORD_CHAR</property> <style> @@ -183,7 +183,7 @@ <property name="can_focus">False</property> <property name="show_close_button">True</property> <property name="width_request">360</property> - <property name="title" translatable="yes">Add contact</property> + <property name="title" translatable="yes" context="Button in add contact page">Add contact</property> <child> <object class="GtkButton"> <property name="visible">True</property> @@ -225,7 +225,7 @@ <property name="visible">True</property> <property name="can_focus">False</property> <property name="show_close_button">True</property> - <property name="title" translatable="yes">Add contact</property> + <property name="title" translatable="yes" context="Title in add contact page">Add contact</property> <child> <object class="GtkButton"> <property name="visible">True</property> @@ -247,7 +247,7 @@ <property name="visible">True</property> <property name="use_underline">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Add contact</property> + <property name="label" translatable="yes" context="Button in add contact page">Add contact</property> <property name="action_name">add-contact.add-contact</property> <style> <class name="suggested-action"/> diff --git a/briar-gtk/data/ui/login.ui b/briar-gtk/data/ui/login.ui index 12e6d1e5d630402aed3e57cffafc6bd7b4007adf..a661589e11d8bb6e61cc87a67baad0bf220d9bbd 100644 --- a/briar-gtk/data/ui/login.ui +++ b/briar-gtk/data/ui/login.ui @@ -114,7 +114,7 @@ <property name="visible">True</property> <property name="use_underline">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">Log in</property> + <property name="label" translatable="yes" context="Button in login page">Log in</property> <property name="action_name">login.login</property> <style> <class name="suggested-action"/> @@ -135,7 +135,7 @@ <property name="can_focus">False</property> <property name="show_close_button">True</property> <property name="width_request">360</property> - <property name="title" translatable="yes">Logging in</property> + <property name="title" translatable="yes" context="Used in login page after entering the password">Logging in</property> </object> <packing> <property name="name">loading</property> diff --git a/briar-gtk/data/ui/main_window.ui b/briar-gtk/data/ui/main_window.ui index 755bd267f8e7eb2aade6e04abd29f7273de66b8e..2548ec0b20e88ab85ab489df12bee1b003d68e0f 100644 --- a/briar-gtk/data/ui/main_window.ui +++ b/briar-gtk/data/ui/main_window.ui @@ -117,7 +117,7 @@ <object class="GtkEntry" id="chat_entry"> <property name="visible">True</property> <property name="can_focus">True</property> - <property name="placeholder_text" translatable="yes" context="chat page: input field">Type Message</property> + <property name="placeholder_text" translatable="yes" context="Used in input field in main window">Type Message</property> <property name="show_emoji_icon">True</property> </object> <packing> @@ -242,7 +242,7 @@ </accessibility> <child internal-child="accessible"> <object class="AtkObject" id="a11y-add_contact_menu"> - <property name="AtkObject::accessible_name" translatable="yes">Add contact</property> + <property name="AtkObject::accessible_name" translatable="yes" context="Accessibility text in main menu">Add contact</property> </object> </child> </object> diff --git a/briar-gtk/po/briar-gtk.pot b/briar-gtk/po/briar-gtk.pot index b8c1f1f3d78afdd377b8771d45b8d3ebf44c51fd..077716419256f521e8d7a67baac509aaef0639df 100644 --- a/briar-gtk/po/briar-gtk.pot +++ b/briar-gtk/po/briar-gtk.pot @@ -13,7 +13,7 @@ msgstr "" "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" msgid "Briar" @@ -34,7 +34,7 @@ msgstr "" msgid "Welcome screen with registration" msgstr "" -msgid "Adding contacts on a distance" +msgid "Adding contacts at a distance" msgstr "" msgid "Main window with two contacts and about dialog" @@ -46,7 +46,7 @@ msgstr "" msgid "Basic notification support" msgstr "" -msgid "Support for deleting contacts" +msgid "Support for contact deletion" msgstr "" msgid "Hugely improved chat UI" @@ -82,65 +82,82 @@ msgstr "" msgid "Lots of software tests" msgstr "" -msgid "The very first alpha release of Briar GTK. It allows to add contacts on a distance and chatting with them in private chats. Other functions like groups, forums and blogs are to be implemented." +msgid "The very first alpha release of Briar GTK. It allows adding contacts remotely and chatting with them in private chats. Other functions like groups, forums and blogs are to be implemented." msgstr "" +msgctxt "Used in about dialog" +msgid "Copyright © 2019-2020 The Briar Project" +msgstr "" + +msgctxt "Used in about dialog" msgid "A Briar client for GTK desktop and mobile devices" msgstr "" +msgctxt "Used in about dialog to get to website" msgid "Visit Briar GTK website" msgstr "" -msgctxt "add contact" +msgctxt "Used in about dialog; replace Nico with yourself to get credited in your translation; multiple persons can be added by adding new lines" +msgid "Nico Alt" +msgstr "" + +msgctxt "Used in add contact page" msgid "Give this link to the contact you want to add" msgstr "" -msgctxt "add contact" +msgctxt "Used in add contact page" msgid "Enter the link from your contact here" msgstr "" -msgctxt "add contact" +msgctxt "Used in add contact page" msgid "Contact's link" msgstr "" -msgctxt "add contact" +msgctxt "Used in add contact page" msgid "Please enter a link" msgstr "" -msgctxt "add contact" +msgctxt "Used in add contact page" msgid "Give your contact a nickname. Only you can see it." msgstr "" -msgctxt "add contact" +msgctxt "Used in add contact page" msgid "Enter a nickname" msgstr "" -msgctxt "add contact" +msgctxt "Used in add contact page" msgid "Please enter a nickname" msgstr "" +msgctxt "Button in add contact page" msgid "Add contact" msgstr "" msgid "Next" msgstr "" +msgctxt "Title in add contact page" +msgid "Add contact" +msgstr "" + msgid "Delete contact" msgstr "" msgid "Password" msgstr "" +msgctxt "Button in login page" msgid "Log in" msgstr "" +msgctxt "Used in login page after entering the password" msgid "Logging in" msgstr "" msgid "About Briar GTK" msgstr "" -msgctxt "chat page: input field" +msgctxt "Used in input field in main window" msgid "Type Message" msgstr "" @@ -150,6 +167,10 @@ msgstr "" msgid "Select a contact to start chatting" msgstr "" +msgctxt "Accessibility text in main menu" +msgid "Add contact" +msgstr "" + msgid "Main menu" msgstr "" @@ -174,19 +195,22 @@ msgstr "" msgid "Creating Account" msgstr "" +msgctxt "Used in about dialog to credit other programs like GNOME Fractal" msgid "Using code by" msgstr "" +msgctxt "Used in about dialog to credit Briar components like its REST API" msgid "Briar functionality by" msgstr "" +msgctxt "Used in message history to indicate that message isby the user itself, not by its contact" msgid "Myself" msgstr "" msgid "Are you sure you want to exit?" msgstr "" -msgid "Once you close Briar, you'll no longer receive or send pending messages. Keep Briar open to stay connected with your contacts." +msgid "Once you close Briar, you'll no longer receive messages nor send pending ones. Keep Briar open to stay connected with your contacts." msgstr "" msgid "Confirm Contact Deletion" diff --git a/debian/changelog b/debian/changelog index 59a3f3b0d4891e50cd7246c2dc7e4b036e92283f..e2ecff0c8bd355f90feb19ea37aa1d144a0a5ec5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ briar-gtk (0.1.0-beta1-1) UNRELEASED; urgency=medium * Basic notification support - * Support for deleting contacts + * Support for contact deletion * Hugely improved chat UI * Full Spanish and German translations * Migration to libhandy 1.0 diff --git a/tools/generate_data.sh b/tools/generate_data.sh index a12c691a260466ab17b46290ce307c7142fbf41b..52e4e8fa73d1cc950062856efff5cdcd3b86e00c 100755 --- a/tools/generate_data.sh +++ b/tools/generate_data.sh @@ -34,7 +34,7 @@ function generate_po() >briar-gtk.pot for file in ../data/app.briar.gtk.metainfo.xml.in ../data/ui/about_dialog.ui.in ../data/ui/*.ui $(find "../briar_gtk" -name '*.py'); do - xgettext --from-code=UTF-8 --no-location --no-wrap -j $file -o briar-gtk.pot + xgettext --from-code=UTF-8 --no-location --no-wrap --keyword="_t:1c,2" -j $file -o briar-gtk.pot done >LINGUAS for po in *.po