Added menu entry for the translation portal

gh-pages
somas95 2018-04-20 22:18:03 +02:00
parent a8df22b552
commit 1329ac5804
4 changed files with 15 additions and 13 deletions

View File

@ -32,11 +32,15 @@
<attribute name="action">app.about</attribute>
<attribute name="label" translatable="yes">_About</attribute>
</item>
<item>
<attribute name="action">app.translate</attribute>
<attribute name="label" translatable="yes">Help to _translate</attribute>
</item>
<item>
<attribute name="action">app.quit</attribute>
<attribute name="label" translatable="yes">_Quit</attribute>
<attribute name="accel">&lt;Primary&gt;q</attribute>
</item>
</item>
</section>
</menu>
</interface>

View File

@ -352,15 +352,6 @@
<signal name="activate" handler="open_pandoc_markdown" swapped="no"/>
</object>
</child>
<child>
<object class="GtkMenuItem" id="translate_launchpad">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Translate This Application...</property>
<property name="use_underline">True</property>
<signal name="activate" handler="open_launchpad_translation" swapped="no"/>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separatormenuitem9">
<property name="visible">True</property>

View File

@ -814,8 +814,8 @@ class UberwriterWindow(Window):
logger.warning("No File arg")
# Help Menu
def open_launchpad_translation(self, widget, data=None):
webbrowser.open("https://translations.launchpad.net/uberwriter")
def open_translation(self):
webbrowser.open("https://poeditor.com/join/project/gxVzFyXb2x")
def open_pandoc_markdown(self, widget, data=None):
webbrowser.open("http://johnmacfarlane.net/pandoc/README.html#pandocs-markdown")

View File

@ -122,6 +122,10 @@ class Application(Gtk.Application):
action.connect("activate", self.on_about)
self.add_action(action)
action = Gio.SimpleAction.new("translate", None)
action.connect("activate", self.on_translate)
self.add_action(action)
action = Gio.SimpleAction.new("quit", None)
action.connect("activate", self.on_quit)
self.add_action(action)
@ -167,7 +171,7 @@ class Application(Gtk.Application):
def on_about(self, action, param):
about_dialog = Gtk.AboutDialog(transient_for=self.window, modal=True)
about_dialog.set_program_name("Uberwriter")
about_dialog.set_version("TODO.beta")
about_dialog.set_version("2.0.beta")
about_dialog.set_copyright("Copyright (C) 2018, Wolf Vollprecht")
about_dialog.set_license_type(Gtk.License.GPL_3_0)
about_dialog.set_website("Uberwriter website http://uberwriter.wolfvollprecht.de")
@ -183,6 +187,9 @@ class Application(Gtk.Application):
def on_help(self, action, param):
self.window.open_pandoc_markdown(self)
def on_translate(self, action, param):
self.window.open_translation()
def on_shortcuts(self, action, param):
builder = get_builder('Shortcuts')