aboutsummaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-04-07 11:09:47 +0200
committerfiaxh <git@mx.ax.lt>2017-04-10 15:47:21 +0200
commit9bc83539d124f9645dc92e9e39001cb0192dae61 (patch)
treea4b22a8ea3e10b6d0050c2e5669729919a1cb477 /main
parentd8881c4b16a1cd376dd69304c44444aee581da32 (diff)
downloaddino-9bc83539d124f9645dc92e9e39001cb0192dae61.tar.gz
dino-9bc83539d124f9645dc92e9e39001cb0192dae61.zip
Gettext support
Diffstat (limited to 'main')
-rw-r--r--main/CMakeLists.txt11
-rw-r--r--main/data/add_conversation/add_contact_dialog.ui10
-rw-r--r--main/data/add_conversation/add_groupchat_dialog.ui12
-rw-r--r--main/data/add_conversation/conference_details_fragment.ui6
-rw-r--r--main/data/manage_accounts/add_account_dialog.ui6
-rw-r--r--main/data/manage_accounts/dialog.ui8
-rw-r--r--main/data/menu_app.ui6
-rw-r--r--main/data/settings_dialog.ui6
-rw-r--r--main/po/LINGUAS2
-rw-r--r--main/po/POTFILES.in20
-rw-r--r--main/po/de.po196
-rw-r--r--main/po/dino.pot205
-rw-r--r--main/po/en.po9
-rw-r--r--main/src/main.vala10
-rw-r--r--main/src/ui/add_conversation/chat/dialog.vala6
-rw-r--r--main/src/ui/add_conversation/conference/add_groupchat_dialog.vala4
-rw-r--r--main/src/ui/add_conversation/conference/dialog.vala8
-rw-r--r--main/src/ui/conversation_summary/message_item.vala2
-rw-r--r--main/src/ui/conversation_summary/view.vala4
-rw-r--r--main/src/ui/manage_accounts/add_account_dialog.vala2
-rw-r--r--main/src/ui/manage_accounts/dialog.vala18
-rw-r--r--main/src/ui/notifications.vala6
-rw-r--r--main/src/ui/occupant_menu/view.vala2
-rw-r--r--main/src/ui/unified_window.vala10
24 files changed, 507 insertions, 62 deletions
diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt
index 66362fbe..bada486c 100644
--- a/main/CMakeLists.txt
+++ b/main/CMakeLists.txt
@@ -1,3 +1,8 @@
+set(GETTEXT_PACKAGE "dino")
+find_package(Gettext)
+include(${GETTEXT_USE_FILE})
+gettext_compile(${GETTEXT_PACKAGE} SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/po TARGET_NAME ${GETTEXT_PACKAGE}-translations)
+
find_packages(MAIN_PACKAGES REQUIRED
Gee
GLib>=2.38
@@ -106,9 +111,9 @@ GRESOURCES
${MAIN_GRESOURCES_XML}
)
-add_definitions(${VALA_CFLAGS})
+add_definitions(${VALA_CFLAGS} -DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\" -DLOCALE_INSTALL_DIR=\"${LOCALE_INSTALL_DIR}\")
add_executable(dino ${MAIN_VALA_C} ${MAIN_GRESOURCES_TARGET})
-add_dependencies(dino dino-vapi dino-gsettings-schema-compiled)
+add_dependencies(dino dino-vapi dino-gsettings-schema-compiled ${GETTEXT_PACKAGE}-translations)
target_link_libraries(dino libdino ${MAIN_PACKAGES})
if(WIN32)
@@ -129,4 +134,4 @@ install(FILES
data/icons/dino-tick-symbolic.svg
DESTINATION
${ICON_INSTALL_DIR}/hicolor/scalable/status
-)
+) \ No newline at end of file
diff --git a/main/data/add_conversation/add_contact_dialog.ui b/main/data/add_conversation/add_contact_dialog.ui
index 533591f5..3e99b2cc 100644
--- a/main/data/add_conversation/add_contact_dialog.ui
+++ b/main/data/add_conversation/add_contact_dialog.ui
@@ -8,7 +8,7 @@
<property name="visible">True</property>
<child>
<object class="GtkButton" id="cancel_button">
- <property name="label">Cancel</property>
+ <property name="label" translatable="yes">Cancel</property>
<property name="sensitive">True</property>
<property name="visible">True</property>
</object>
@@ -20,7 +20,7 @@
<object class="GtkButton" id="ok_button">
<property name="has_default">True</property>
<property name="can_default">True</property>
- <property name="label">Add</property>
+ <property name="label" translatable="yes">Add</property>
<property name="sensitive">False</property>
<property name="visible">True</property>
<style>
@@ -45,7 +45,7 @@
<property name="visible">True</property>
<child>
<object class="GtkLabel">
- <property name="label">Account</property>
+ <property name="label" translatable="yes">Account</property>
<property name="xalign">1</property>
<property name="visible">True</property>
</object>
@@ -98,7 +98,7 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label">Alias</property>
+ <property name="label" translatable="yes">Alias</property>
<property name="xalign">1</property>
<property name="visible">True</property>
</object>
@@ -126,7 +126,7 @@
<child>
<object class="GtkCheckButton" id="subscribe_checkbutton">
<property name="active">True</property>
- <property name="label">Request presence updates</property>
+ <property name="label" translatable="yes">Request presence updates</property>
<property name="xalign">0</property>
<property name="visible">True</property>
</object>
diff --git a/main/data/add_conversation/add_groupchat_dialog.ui b/main/data/add_conversation/add_groupchat_dialog.ui
index 6654e23b..1a027200 100644
--- a/main/data/add_conversation/add_groupchat_dialog.ui
+++ b/main/data/add_conversation/add_groupchat_dialog.ui
@@ -8,7 +8,7 @@
<property name="visible">True</property>
<child>
<object class="GtkButton" id="cancel_button">
- <property name="label">Cancel</property>
+ <property name="label" translatable="yes">Cancel</property>
<property name="sensitive">True</property>
<property name="visible">True</property>
</object>
@@ -46,7 +46,7 @@
<property name="visible">True</property>
<child>
<object class="GtkLabel">
- <property name="label">Account</property>
+ <property name="label" translatable="yes">Account</property>
<property name="xalign">1</property>
<property name="visible">True</property>
</object>
@@ -117,7 +117,7 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label">Nick</property>
+ <property name="label" translatable="yes">Nick</property>
<property name="xalign">1</property>
<property name="visible">True</property>
</object>
@@ -144,7 +144,7 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label">Password</property>
+ <property name="label" translatable="yes">Password</property>
<property name="xalign">1</property>
<property name="visible">True</property>
</object>
@@ -173,7 +173,7 @@
<child>
<object class="GtkCheckButton" id="autojoin_checkbutton">
<property name="active">False</property>
- <property name="label">Join on startup</property>
+ <property name="label" translatable="yes">Join on startup</property>
<property name="xalign">0</property>
<property name="visible">True</property>
</object>
@@ -186,7 +186,7 @@
</child>
<child>
<object class="GtkLabel" id="alias_label">
- <property name="label">Alias</property>
+ <property name="label" translatable="yes">Alias</property>
<property name="xalign">1</property>
<property name="visible">True</property>
</object>
diff --git a/main/data/add_conversation/conference_details_fragment.ui b/main/data/add_conversation/conference_details_fragment.ui
index 41cbb6c7..3218e27e 100644
--- a/main/data/add_conversation/conference_details_fragment.ui
+++ b/main/data/add_conversation/conference_details_fragment.ui
@@ -13,7 +13,7 @@
<property name="visible">True</property>
<child>
<object class="GtkLabel">
- <property name="label">Account</property>
+ <property name="label" translatable="yes">Account</property>
<property name="xalign">1</property>
<property name="visible">True</property>
<style>
@@ -117,7 +117,7 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label">Nick</property>
+ <property name="label" translatable="yes">Nick</property>
<property name="xalign">1</property>
<property name="visible">True</property>
<style>
@@ -169,7 +169,7 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label">Password</property>
+ <property name="label" translatable="yes">Password</property>
<property name="xalign">1</property>
<property name="visible">True</property>
<style>
diff --git a/main/data/manage_accounts/add_account_dialog.ui b/main/data/manage_accounts/add_account_dialog.ui
index c38f624a..10a66bde 100644
--- a/main/data/manage_accounts/add_account_dialog.ui
+++ b/main/data/manage_accounts/add_account_dialog.ui
@@ -18,7 +18,7 @@
<child>
<object class="GtkButton" id="ok_button">
<property name="can_default">True</property>
- <property name="label">Save</property>
+ <property name="label" translatable="yes">Save</property>
<property name="sensitive">False</property>
<property name="visible">True</property>
<style>
@@ -70,7 +70,7 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label">Password</property>
+ <property name="label" translatable="yes">Password</property>
<property name="xalign">1</property>
<property name="visible">True</property>
</object>
@@ -99,7 +99,7 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label">Local alias</property>
+ <property name="label" translatable="yes">Local alias</property>
<property name="xalign">1</property>
<property name="visible">True</property>
</object>
diff --git a/main/data/manage_accounts/dialog.ui b/main/data/manage_accounts/dialog.ui
index 886382e7..fcfe42ca 100644
--- a/main/data/manage_accounts/dialog.ui
+++ b/main/data/manage_accounts/dialog.ui
@@ -6,7 +6,7 @@
<property name="visible">True</property>
<child type="titlebar">
<object class="GtkHeaderBar">
- <property name="title">Accounts</property>
+ <property name="title" translatable="yes">Accounts</property>
<property name="show_close_button">True</property>
<property name="visible">True</property>
</object>
@@ -160,7 +160,7 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label">Password</property>
+ <property name="label" translatable="yes">Password</property>
<property name="xalign">1</property>
<property name="visible">True</property>
<style>
@@ -214,7 +214,7 @@
</child>
<child>
<object class="GtkLabel">
- <property name="label">Local alias</property>
+ <property name="label" translatable="yes">Local alias</property>
<property name="xalign">1</property>
<property name="visible">True</property>
<style>
@@ -303,7 +303,7 @@
</child>
<child>
<object class="GtkButton" id="no_accounts_add">
- <property name="label">Add an account</property>
+ <property name="label" translatable="yes">Add an account</property>
<property name="halign">center</property>
<property name="visible">True</property>
<style>
diff --git a/main/data/menu_app.ui b/main/data/menu_app.ui
index d3fa4cb7..beb81f3f 100644
--- a/main/data/menu_app.ui
+++ b/main/data/menu_app.ui
@@ -3,17 +3,17 @@
<section>
<item>
<attribute name="action">app.accounts</attribute>
- <attribute name="label">Accounts</attribute>
+ <attribute name="label" translatable="yes">Accounts</attribute>
</item>
<item>
<attribute name="action">app.settings</attribute>
- <attribute name="label">Settings</attribute>
+ <attribute name="label" translatable="yes">Settings</attribute>
</item>
</section>
<section>
<item>
<attribute name="action">app.quit</attribute>
- <attribute name="label">Quit</attribute>
+ <attribute name="label" translatable="yes">Quit</attribute>
</item>
</section>
</menu>
diff --git a/main/data/settings_dialog.ui b/main/data/settings_dialog.ui
index 51619c29..7233e858 100644
--- a/main/data/settings_dialog.ui
+++ b/main/data/settings_dialog.ui
@@ -5,7 +5,7 @@
<property name="visible">True</property>
<child type="titlebar">
<object class="GtkHeaderBar">
- <property name="title">Preferences</property>
+ <property name="title" translatable="yes">Preferences</property>
<property name="show_close_button">True</property>
<property name="visible">True</property>
</object>
@@ -20,7 +20,7 @@
<property name="visible">True</property>
<child>
<object class="GtkCheckButton" id="marker_checkbutton">
- <property name="label">Send typing notifications and message marker</property>
+ <property name="label" translatable="yes">Send typing notifications and message marker</property>
<property name="visible">True</property>
</object>
<packing>
@@ -32,7 +32,7 @@
</child>
<child>
<object class="GtkCheckButton" id="emoji_checkbutton">
- <property name="label">Convert smileys to emojis</property>
+ <property name="label" translatable="yes">Convert smileys to emojis</property>
<property name="visible">True</property>
</object>
<packing>
diff --git a/main/po/LINGUAS b/main/po/LINGUAS
new file mode 100644
index 00000000..685f65ef
--- /dev/null
+++ b/main/po/LINGUAS
@@ -0,0 +1,2 @@
+de
+en \ No newline at end of file
diff --git a/main/po/POTFILES.in b/main/po/POTFILES.in
new file mode 100644
index 00000000..cf47561b
--- /dev/null
+++ b/main/po/POTFILES.in
@@ -0,0 +1,20 @@
+data/add_conversation/add_contact_dialog.ui
+data/add_conversation/add_groupchat_dialog.ui
+data/add_conversation/conference_details_fragment.ui
+data/conversation_selector/view.ui
+data/manage_accounts/add_account_dialog.ui
+data/manage_accounts/dialog.ui
+data/menu_add.ui
+data/menu_app.ui
+data/menu_conversation.ui
+data/menu_encryption.ui
+data/settings_dialog.ui
+src/ui/add_conversation/conference/add_groupchat_dialog.vala
+src/ui/add_conversation/conference/dialog.vala
+src/ui/conversation_summary/message_item.vala
+src/ui/conversation_summary/view.vala
+src/ui/manage_accounts/add_account_dialog.vala
+src/ui/manage_accounts/dialog.vala
+src/ui/occupant_menu/view.vala
+src/ui/notifications.vala
+src/ui/unified_window.vala \ No newline at end of file
diff --git a/main/po/de.po b/main/po/de.po
new file mode 100644
index 00000000..61690d2a
--- /dev/null
+++ b/main/po/de.po
@@ -0,0 +1,196 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: dino-0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-10 15:10+0200\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: data/add_conversation/add_contact_dialog.ui:11
+#: data/add_conversation/add_groupchat_dialog.ui:11
+#: src/ui/add_conversation/conference/dialog.vala:15
+#: src/ui/manage_accounts/dialog.vala:151
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#: data/add_conversation/add_contact_dialog.ui:23
+#: src/ui/add_conversation/conference/add_groupchat_dialog.vala:28
+msgid "Add"
+msgstr "Hinzufügen"
+
+#: data/add_conversation/add_contact_dialog.ui:48
+#: data/add_conversation/add_groupchat_dialog.ui:49
+#: data/add_conversation/conference_details_fragment.ui:16
+msgid "Account"
+msgstr "Konto"
+
+#: data/add_conversation/add_contact_dialog.ui:101
+#: data/add_conversation/add_groupchat_dialog.ui:189
+msgid "Alias"
+msgstr "Alias"
+
+#: data/add_conversation/add_contact_dialog.ui:129
+msgid "Request presence updates"
+msgstr "Online-Status erbitten"
+
+#: data/add_conversation/add_groupchat_dialog.ui:120
+#: data/add_conversation/conference_details_fragment.ui:120
+msgid "Nick"
+msgstr "Nick"
+
+#: data/add_conversation/add_groupchat_dialog.ui:147
+#: data/add_conversation/conference_details_fragment.ui:172
+#: data/manage_accounts/add_account_dialog.ui:73
+#: data/manage_accounts/dialog.ui:163
+msgid "Password"
+msgstr "Passwort"
+
+#: data/add_conversation/add_groupchat_dialog.ui:176
+msgid "Join on startup"
+msgstr "Beim Start beitreten"
+
+#: data/conversation_selector/view.ui:16
+msgid "Search"
+msgstr "Suchen"
+
+#: data/manage_accounts/add_account_dialog.ui:21
+#: src/ui/add_conversation/conference/add_groupchat_dialog.vala:42
+msgid "Save"
+msgstr "Speichern"
+
+#: data/manage_accounts/add_account_dialog.ui:102
+#: data/manage_accounts/dialog.ui:217
+msgid "Local alias"
+msgstr "Lokaler Alias"
+
+#: data/manage_accounts/dialog.ui:9 data/menu_app.ui:6
+msgid "Accounts"
+msgstr "Konten"
+
+#: data/manage_accounts/dialog.ui:306
+msgid "Add an account"
+msgstr "Konto hinzufügen"
+
+#: data/menu_add.ui:6
+msgid "Start Chat"
+msgstr "Chat starten"
+
+#: data/menu_add.ui:12 src/ui/add_conversation/conference/dialog.vala:26
+#: src/ui/unified_window.vala:145
+msgid "Join Conference"
+msgstr "Konferenz beitreten"
+
+#: data/menu_app.ui:10
+msgid "Settings"
+msgstr "Einstellungen"
+
+#: data/menu_app.ui:16
+msgid "Quit"
+msgstr "Beenden"
+
+#: data/menu_conversation.ui:5
+msgid "Contact Details"
+msgstr "Kontakt Details"
+
+#: data/menu_encryption.ui:14
+msgid "Unencrypted"
+msgstr "Unverschlüsselt"
+
+#: data/settings_dialog.ui:8
+msgid "Preferences"
+msgstr "Einstellungen"
+
+#: data/settings_dialog.ui:23
+msgid "Send typing notifications and message marker"
+msgstr "Sende Tippbenachrichtigung und Empfangsbestätigung"
+
+#: data/settings_dialog.ui:35
+msgid "Convert smileys to emojis"
+msgstr "Smileys zu Emojis umwandeln"
+
+#: src/ui/add_conversation/conference/dialog.vala:45
+msgid "Next"
+msgstr "Weiter"
+
+#: src/ui/add_conversation/conference/dialog.vala:60
+msgid "Join"
+msgstr "Beitreten"
+
+#: src/ui/conversation_summary/message_item.vala:107
+msgid "Just now"
+msgstr "Gerade eben"
+
+#: src/ui/conversation_summary/view.vala:120
+msgid "is typing..."
+msgstr "tippt gerade..."
+
+#: src/ui/conversation_summary/view.vala:122
+msgid "has stopped typing"
+msgstr "hat aufgehört zu tippen"
+
+#: src/ui/manage_accounts/add_account_dialog.vala:21
+msgid "Add Account"
+msgstr "Konto hinzufügen"
+
+#: src/ui/manage_accounts/dialog.vala:150
+msgid "Select avatar"
+msgstr "Kontaktbild auswählen"
+
+#: src/ui/manage_accounts/dialog.vala:152
+msgid "Select"
+msgstr "Auswählen"
+
+#: src/ui/manage_accounts/dialog.vala:251
+msgid "Connecting..."
+msgstr "Verbinden..."
+
+#: src/ui/manage_accounts/dialog.vala:253
+msgid "Connected"
+msgstr "Verbunden"
+
+#: src/ui/manage_accounts/dialog.vala:255
+msgid "Disconnected"
+msgstr "Nicht verbunden"
+
+#: src/ui/manage_accounts/dialog.vala:278
+msgid "Wrong password"
+msgstr "Passwort falsch"
+
+#: src/ui/manage_accounts/dialog.vala:281
+#: src/ui/manage_accounts/dialog.vala:283
+msgid "Error"
+msgstr "Fehler"
+
+#: src/ui/occupant_menu/view.vala:48
+msgid "Start private conversation"
+msgstr "Private Konversation beginnen"
+
+#: src/ui/notifications.vala:59
+msgid "Subscription request"
+msgstr "Kontaktanfrage"
+
+#: src/ui/notifications.vala:61
+msgid "Accept"
+msgstr "Annehmen"
+
+#: src/ui/notifications.vala:74
+msgid "Deny"
+msgstr "Ablehnen"
+
+#: src/ui/unified_window.vala:135
+msgid "No accounts active"
+msgstr "Keine Konten aktiv"
+
+#: src/ui/unified_window.vala:136
+msgid "Manage accounts"
+msgstr "Konten verwalten"
+
+#: src/ui/unified_window.vala:143
+msgid "No conversation active"
+msgstr "Keine Konversation aktiv"
+
+#: src/ui/unified_window.vala:144
+msgid "Add Chat"
+msgstr "Chat hinzufügen"
diff --git a/main/po/dino.pot b/main/po/dino.pot
new file mode 100644
index 00000000..620ffeb3
--- /dev/null
+++ b/main/po/dino.pot
@@ -0,0 +1,205 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-10 15:10+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-Transfer-Encoding: 8bit\n"
+
+#: data/add_conversation/add_contact_dialog.ui:11
+#: data/add_conversation/add_groupchat_dialog.ui:11
+#: src/ui/add_conversation/conference/dialog.vala:15
+#: src/ui/manage_accounts/dialog.vala:151
+msgid "Cancel"
+msgstr ""
+
+#: data/add_conversation/add_contact_dialog.ui:23
+#: src/ui/add_conversation/conference/add_groupchat_dialog.vala:28
+msgid "Add"
+msgstr ""
+
+#: data/add_conversation/add_contact_dialog.ui:48
+#: data/add_conversation/add_groupchat_dialog.ui:49
+#: data/add_conversation/conference_details_fragment.ui:16
+msgid "Account"
+msgstr ""
+
+#: data/add_conversation/add_contact_dialog.ui:101
+#: data/add_conversation/add_groupchat_dialog.ui:189
+msgid "Alias"
+msgstr ""
+
+#: data/add_conversation/add_contact_dialog.ui:129
+msgid "Request presence updates"
+msgstr ""
+
+#: data/add_conversation/add_groupchat_dialog.ui:120
+#: data/add_conversation/conference_details_fragment.ui:120
+msgid "Nick"
+msgstr ""
+
+#: data/add_conversation/add_groupchat_dialog.ui:147
+#: data/add_conversation/conference_details_fragment.ui:172
+#: data/manage_accounts/add_account_dialog.ui:73
+#: data/manage_accounts/dialog.ui:163
+msgid "Password"
+msgstr ""
+
+#: data/add_conversation/add_groupchat_dialog.ui:176
+msgid "Join on startup"
+msgstr ""
+
+#: data/conversation_selector/view.ui:16
+msgid "Search"
+msgstr ""
+
+#: data/manage_accounts/add_account_dialog.ui:21
+#: src/ui/add_conversation/conference/add_groupchat_dialog.vala:42
+msgid "Save"
+msgstr ""
+
+#: data/manage_accounts/add_account_dialog.ui:102
+#: data/manage_accounts/dialog.ui:217
+msgid "Local alias"
+msgstr ""
+
+#: data/manage_accounts/dialog.ui:9 data/menu_app.ui:6
+msgid "Accounts"
+msgstr ""
+
+#: data/manage_accounts/dialog.ui:306
+msgid "Add an account"
+msgstr ""
+
+#: data/menu_add.ui:6
+msgid "Start Chat"
+msgstr ""
+
+#: data/menu_add.ui:12 src/ui/add_conversation/conference/dialog.vala:26
+#: src/ui/unified_window.vala:145
+msgid "Join Conference"
+msgstr ""
+
+#: data/menu_app.ui:10
+msgid "Settings"
+msgstr ""
+
+#: data/menu_app.ui:16
+msgid "Quit"
+msgstr ""
+
+#: data/menu_conversation.ui:5
+msgid "Contact Details"
+msgstr ""
+
+#: data/menu_encryption.ui:14
+msgid "Unencrypted"
+msgstr ""
+
+#: data/settings_dialog.ui:8
+msgid "Preferences"
+msgstr ""
+
+#: data/settings_dialog.ui:23
+msgid "Send typing notifications and message marker"
+msgstr ""
+
+#: data/settings_dialog.ui:35
+msgid "Convert smileys to emojis"
+msgstr ""
+
+#: src/ui/add_conversation/conference/dialog.vala:45
+msgid "Next"
+msgstr ""
+
+#: src/ui/add_conversation/conference/dialog.vala:60
+msgid "Join"
+msgstr ""
+
+#: src/ui/conversation_summary/message_item.vala:107
+msgid "Just now"
+msgstr ""
+
+#: src/ui/conversation_summary/view.vala:120
+msgid "is typing..."
+msgstr ""
+
+#: src/ui/conversation_summary/view.vala:122
+msgid "has stopped typing"
+msgstr ""
+
+#: src/ui/manage_accounts/add_account_dialog.vala:21
+msgid "Add Account"
+msgstr ""
+
+#: src/ui/manage_accounts/dialog.vala:150
+msgid "Select avatar"
+msgstr ""
+
+#: src/ui/manage_accounts/dialog.vala:152
+msgid "Select"
+msgstr ""
+
+#: src/ui/manage_accounts/dialog.vala:251
+msgid "Connecting..."
+msgstr ""
+
+#: src/ui/manage_accounts/dialog.vala:253
+msgid "Connected"
+msgstr ""
+
+#: src/ui/manage_accounts/dialog.vala:255
+msgid "Disconnected"
+msgstr ""
+
+#: src/ui/manage_accounts/dialog.vala:278
+msgid "Wrong password"
+msgstr ""
+
+#: src/ui/manage_accounts/dialog.vala:281
+#: src/ui/manage_accounts/dialog.vala:283
+msgid "Error"
+msgstr ""
+
+#: src/ui/occupant_menu/view.vala:48
+msgid "Start private conversation"
+msgstr ""
+
+#: src/ui/notifications.vala:59
+msgid "Subscription request"
+msgstr ""
+
+#: src/ui/notifications.vala:61
+msgid "Accept"
+msgstr ""
+
+#: src/ui/notifications.vala:74
+msgid "Deny"
+msgstr ""
+
+#: src/ui/unified_window.vala:135
+msgid "No accounts active"
+msgstr ""
+
+#: src/ui/unified_window.vala:136
+msgid "Manage accounts"
+msgstr ""
+
+#: src/ui/unified_window.vala:143
+msgid "No conversation active"
+msgstr ""
+
+#: src/ui/unified_window.vala:144
+msgid "Add Chat"
+msgstr ""
diff --git a/main/po/en.po b/main/po/en.po
new file mode 100644
index 00000000..0f223e2b
--- /dev/null
+++ b/main/po/en.po
@@ -0,0 +1,9 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: dino-0.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2017-04-07 15:43+0200\n"
+"Language: en\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n" \ No newline at end of file
diff --git a/main/src/main.vala b/main/src/main.vala
index 14029e47..e0d54d18 100644
--- a/main/src/main.vala
+++ b/main/src/main.vala
@@ -1,20 +1,28 @@
using Dino.Entities;
using Dino.Ui;
+extern const string GETTEXT_PACKAGE;
+extern const string LOCALE_INSTALL_DIR;
+
namespace Dino {
void main(string[] args) {
+
try{
string? exec_path = args.length > 0 ? args[0] : null;
+ SearchPathGenerator search_path_generator = new SearchPathGenerator(exec_path);
if (exec_path != null && exec_path.contains(Path.DIR_SEPARATOR_S)) {
string bindir = Path.get_dirname(exec_path);
if (FileUtils.test(Path.build_filename(bindir, "gschemas.compiled"), FileTest.IS_REGULAR)) {
Environment.set_variable("GSETTINGS_SCHEMA_DIR", Path.get_dirname(exec_path), false);
}
}
+ Intl.textdomain(GETTEXT_PACKAGE);
+ internationalize(GETTEXT_PACKAGE, search_path_generator.get_locale_path(GETTEXT_PACKAGE, LOCALE_INSTALL_DIR));
+
Plugins.Loader loader = new Plugins.Loader(exec_path);
Gtk.init(ref args);
- Dino.Ui.Application app = new Dino.Ui.Application();
+ Dino.Ui.Application app = new Dino.Ui.Application() { search_path_generator=search_path_generator };
app.add_main_option("plugin-paths", 0, 0, OptionArg.NONE, "Display plugin search paths and exit", null);
app.handle_local_options.connect((options) => {
diff --git a/main/src/ui/add_conversation/chat/dialog.vala b/main/src/ui/add_conversation/chat/dialog.vala
index 910e7264..6873b4ca 100644
--- a/main/src/ui/add_conversation/chat/dialog.vala
+++ b/main/src/ui/add_conversation/chat/dialog.vala
@@ -18,7 +18,7 @@ public class Dialog : Gtk.Dialog {
public Dialog(StreamInteractor stream_interactor) {
Object(use_header_bar : 1);
- this.title = "Start Chat";
+ this.title = _("Start Chat");
this.modal = true;
this.stream_interactor = stream_interactor;
@@ -31,13 +31,13 @@ public class Dialog : Gtk.Dialog {
header_bar.show_close_button = false;
Button cancel_button = new Button();
- cancel_button.set_label("Cancel");
+ cancel_button.set_label(_("Cancel"));
cancel_button.visible = true;
header_bar.pack_start(cancel_button);
ok_button = new Button();
ok_button.get_style_context().add_class("suggested-action");
- ok_button.label = "Start";
+ ok_button.label = _("Start");
ok_button.sensitive = false;
ok_button.visible = true;
header_bar.pack_end(ok_button);
diff --git a/main/src/ui/add_conversation/conference/add_groupchat_dialog.vala b/main/src/ui/add_conversation/conference/add_groupchat_dialog.vala
index 96d44000..10c91c70 100644
--- a/main/src/ui/add_conversation/conference/add_groupchat_dialog.vala
+++ b/main/src/ui/add_conversation/conference/add_groupchat_dialog.vala
@@ -25,7 +25,7 @@ protected class AddGroupchatDialog : Gtk.Dialog {
public AddGroupchatDialog(StreamInteractor stream_interactor) {
Object(use_header_bar : 1);
this.stream_interactor = stream_interactor;
- ok_button.label = "Add";
+ ok_button.label = _("Add");
ok_button.get_style_context().add_class("suggested-action"); // TODO why doesn't it work in XML
accounts_stack.set_visible_child_name("combobox");
account_combobox.initialize(stream_interactor);
@@ -39,7 +39,7 @@ protected class AddGroupchatDialog : Gtk.Dialog {
public AddGroupchatDialog.for_conference(StreamInteractor stream_interactor, Account account, Xmpp.Xep.Bookmarks.Conference conference) {
this(stream_interactor);
edit_confrence = conference;
- ok_button.label = "Save";
+ ok_button.label = _("Save");
ok_button.sensitive = true;
accounts_stack.set_visible_child_name("label");
account_label.label = account.bare_jid.to_string();
diff --git a/main/src/ui/add_conversation/conference/dialog.vala b/main/src/ui/add_conversation/conference/dialog.vala
index c035c11d..2da37c08 100644
--- a/main/src/ui/add_conversation/conference/dialog.vala
+++ b/main/src/ui/add_conversation/conference/dialog.vala
@@ -12,7 +12,7 @@ public class Dialog : Gtk.Dialog {
private Stack stack = new Stack();
private Button cancel_button;
private Button ok_button;
- private Label cancel_label = new Label("Cancel") {visible=true};
+ private Label cancel_label = new Label(_("Cancel")) {visible=true};
private Image cancel_image = new Image.from_icon_name("go-previous-symbolic", IconSize.MENU) {visible=true};
private SelectJidFragment select_fragment;
@@ -23,7 +23,7 @@ public class Dialog : Gtk.Dialog {
public Dialog(StreamInteractor stream_interactor) {
Object(use_header_bar : 1);
- this.title = "Join Conference";
+ this.title = _("Join Conference");
this.modal = true;
this.stream_interactor = stream_interactor;
@@ -42,7 +42,7 @@ public class Dialog : Gtk.Dialog {
cancel_button.add(cancel_label);
cancel_button.clicked.disconnect(show_jid_add_view);
cancel_button.clicked.connect(on_cancel);
- ok_button.label = "Next";
+ ok_button.label = _("Next");
ok_button.sensitive = select_fragment.done;
ok_button.clicked.disconnect(on_ok_button_clicked);
ok_button.clicked.connect(on_next_button_clicked);
@@ -57,7 +57,7 @@ public class Dialog : Gtk.Dialog {
cancel_button.add(cancel_image);
cancel_button.clicked.disconnect(on_cancel);
cancel_button.clicked.connect(show_jid_add_view);
- ok_button.label = "Join";
+ ok_button.label = _("Join");
ok_button.sensitive = details_fragment.done;
ok_button.clicked.disconnect(on_next_button_clicked);
ok_button.clicked.connect(on_ok_button_clicked);
diff --git a/main/src/ui/conversation_summary/message_item.vala b/main/src/ui/conversation_summary/message_item.vala
index fed67945..4b26a289 100644
--- a/main/src/ui/conversation_summary/message_item.vala
+++ b/main/src/ui/conversation_summary/message_item.vala
@@ -104,7 +104,7 @@ public class MessageItem : Grid, ConversationItem {
} else if (timespan > TimeSpan.MINUTE) {
return (timespan / TimeSpan.MINUTE).to_string() + " min ago";
} else {
- return "Just now";
+ return _("Just now");
}
}
}
diff --git a/main/src/ui/conversation_summary/view.vala b/main/src/ui/conversation_summary/view.vala
index 179c14e3..60d26cf0 100644
--- a/main/src/ui/conversation_summary/view.vala
+++ b/main/src/ui/conversation_summary/view.vala
@@ -117,9 +117,9 @@ public class View : Box {
if (state_ != null) {
if (state_ == Xep.ChatStateNotifications.STATE_COMPOSING || state_ == Xep.ChatStateNotifications.STATE_PAUSED) {
if (state_ == Xep.ChatStateNotifications.STATE_COMPOSING) {
- typing_status = new StatusItem(stream_interactor, conversation, "is typing...");
+ typing_status = new StatusItem(stream_interactor, conversation, _("is typing..."));
} else if (state_ == Xep.ChatStateNotifications.STATE_PAUSED) {
- typing_status = new StatusItem(stream_interactor, conversation, "has stoped typing");
+ typing_status = new StatusItem(stream_interactor, conversation, _("has stopped typing"));
}
main.add(typing_status);
}
diff --git a/main/src/ui/manage_accounts/add_account_dialog.vala b/main/src/ui/manage_accounts/add_account_dialog.vala
index 8501f476..74754b79 100644
--- a/main/src/ui/manage_accounts/add_account_dialog.vala
+++ b/main/src/ui/manage_accounts/add_account_dialog.vala
@@ -18,7 +18,7 @@ public class AddAccountDialog : Gtk.Dialog {
public AddAccountDialog(StreamInteractor stream_interactor) {
Object(use_header_bar : 1);
- this.title = "Add Account";
+ this.title = _("Add Account");
cancel_button.clicked.connect(() => { close(); });
ok_button.clicked.connect(on_ok_button_clicked);
diff --git a/main/src/ui/manage_accounts/dialog.vala b/main/src/ui/manage_accounts/dialog.vala
index e8697bad..24a8b47c 100644
--- a/main/src/ui/manage_accounts/dialog.vala
+++ b/main/src/ui/manage_accounts/dialog.vala
@@ -147,9 +147,9 @@ public class Dialog : Gtk.Window {
private void on_image_button_clicked() {
FileChooserDialog chooser = new FileChooserDialog (
- "Select avatar", this, FileChooserAction.OPEN,
- "Cancel", ResponseType.CANCEL,
- "Select", ResponseType.ACCEPT);
+ _("Select avatar"), this, FileChooserAction.OPEN,
+ _("Cancel"), ResponseType.CANCEL,
+ _("Select"), ResponseType.ACCEPT);
FileFilter filter = new FileFilter();
filter.add_mime_type("image/*");
chooser.set_filter(filter);
@@ -248,11 +248,11 @@ public class Dialog : Gtk.Window {
ConnectionManager.ConnectionState state = stream_interactor.connection_manager.get_state(account);
switch (state) {
case ConnectionManager.ConnectionState.CONNECTING:
- state_label.label = "Connecting..."; break;
+ state_label.label = _("Connecting..."); break;
case ConnectionManager.ConnectionState.CONNECTED:
- state_label.label = "Connected"; break;
+ state_label.label = _("Connected"); break;
case ConnectionManager.ConnectionState.DISCONNECTED:
- state_label.label = "Disconnected"; break;
+ state_label.label = _("Disconnected"); break;
}
state_label.get_style_context().remove_class("is_error");
}
@@ -275,12 +275,12 @@ public class Dialog : Gtk.Window {
private string get_connection_error_description(ConnectionManager.ConnectionError error) {
switch (error.source) {
case ConnectionManager.ConnectionError.Source.SASL:
- return "Wrong password";
+ return _("Wrong password");
}
if (error.identifier != null) {
- return "Error" + ": " + error.identifier;
+ return _("Error") + ": " + error.identifier;
} else {
- return "Error";
+ return _("Error");
}
}
}
diff --git a/main/src/ui/notifications.vala b/main/src/ui/notifications.vala
index 3846c7ba..029a4b33 100644
--- a/main/src/ui/notifications.vala
+++ b/main/src/ui/notifications.vala
@@ -56,9 +56,9 @@ public class Notifications : Object {
}
private void on_received_subscription_request(Jid jid, Account account) {
- Notify.Notification notification = new Notify.Notification("Subscription request", jid.bare_jid.to_string(), null);
+ Notify.Notification notification = new Notify.Notification(_("Subscription request"), jid.bare_jid.to_string(), null);
notification.set_image_from_pixbuf((new AvatarGenerator(40, 40)).draw_jid(stream_interactor, jid, account));
- notification.add_action("accept", "Accept", () => {
+ notification.add_action("accept", _("Accept"), () => {
stream_interactor.get_module(PresenceManager.IDENTITY).approve_subscription(account, jid);
if (stream_interactor.get_module(RosterManager.IDENTITY).get_roster_item(account, jid) == null) {
@@ -71,7 +71,7 @@ public class Notifications : Object {
notification.close();
} catch (Error error) { }
});
- notification.add_action("deny", "Deny", () => {
+ notification.add_action("deny", _("Deny"), () => {
stream_interactor.get_module(PresenceManager.IDENTITY).deny_subscription(account, jid);
try {
notification.close();
diff --git a/main/src/ui/occupant_menu/view.vala b/main/src/ui/occupant_menu/view.vala
index b7fe15ba..b6b25961 100644
--- a/main/src/ui/occupant_menu/view.vala
+++ b/main/src/ui/occupant_menu/view.vala
@@ -45,7 +45,7 @@ public class View : Popover {
Button header_button = new Button() { relief=ReliefStyle.NONE, visible=true };
header_button.add(header_box);
- ModelButton private_button = new ModelButton() { active=true, text="Start private conversation", visible=true };
+ ModelButton private_button = new ModelButton() { active=true, text=_("Start private conversation"), visible=true };
Box outer_box = new Box(Orientation.VERTICAL, 5) { margin=10, visible=true };
outer_box.add(header_button);
diff --git a/main/src/ui/unified_window.vala b/main/src/ui/unified_window.vala
index d4d9055c..1c4474c7 100644
--- a/main/src/ui/unified_window.vala
+++ b/main/src/ui/unified_window.vala
@@ -132,17 +132,17 @@ public class UnifiedWindow : Window {
public class NoAccountsPlaceholder : UnifiedWindowPlaceholder {
public NoAccountsPlaceholder() {
- label.label = "No accounts active";
- primary_button.label = "Manage accounts";
+ label.label = _("No accounts active");
+ primary_button.label = _("Manage accounts");
secondary_button.visible = false;
}
}
public class NoConversationsPlaceholder : UnifiedWindowPlaceholder {
public NoConversationsPlaceholder() {
- label.label = "No conversation active";
- primary_button.label = "Add Chat";
- secondary_button.label = "Join Conference";
+ label.label = _("No conversation active");
+ primary_button.label = _("Add Chat");
+ secondary_button.label = _("Join Conference");
secondary_button.visible = true;
}
}