Skip to content

Commit

Permalink
Merge pull request #90 from b4n/pohelper
Browse files Browse the repository at this point in the history
Add new pohelper plugin
  • Loading branch information
frlan committed Mar 13, 2013
2 parents b9f82c5 + c7b5e94 commit 6b3ccdd
Show file tree
Hide file tree
Showing 16 changed files with 2,254 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Makefile.am
Expand Up @@ -94,6 +94,10 @@ if ENABLE_MULTITERM
SUBDIRS += multiterm
endif

if ENABLE_POHELPER
SUBDIRS += pohelper
endif

if ENABLE_PRETTY_PRINTER
SUBDIRS += pretty-printer
endif
Expand Down
12 changes: 12 additions & 0 deletions build/pohelper.m4
@@ -0,0 +1,12 @@
AC_DEFUN([GP_CHECK_POHELPER],
[
GP_ARG_DISABLE([PoHelper], [yes])
GP_COMMIT_PLUGIN_STATUS([PoHelper])
AC_CONFIG_FILES([
pohelper/Makefile
pohelper/data/Makefile
pohelper/src/Makefile
])
])
1 change: 1 addition & 0 deletions configure.ac
Expand Up @@ -47,6 +47,7 @@ GP_CHECK_GENIUSPASTE
GP_CHECK_GPROJECT
GP_CHECK_MARKDOWN
GP_CHECK_MULTITERM
GP_CHECK_POHELPER
GP_CHECK_PRETTYPRINTER
GP_CHECK_SCOPE
GP_CHECK_SHIFTCOLUMN
Expand Down
3 changes: 3 additions & 0 deletions po/POTFILES.in
Expand Up @@ -211,6 +211,9 @@ gproject/src/gproject-sidebar.c
markdown/src/conf.c
markdown/src/plugin.c

# PoHelper
[type: gettext/glade]pohelper/data/menus.ui
pohelper/src/gph-plugin.c

# Pretty-printer
pretty-printer/src/PrettyPrinter.c
Expand Down
1 change: 1 addition & 0 deletions pohelper/AUTHORS
@@ -0,0 +1 @@
Colomban Wendling <ban(at)herbesfolles(dot)org>
674 changes: 674 additions & 0 deletions pohelper/COPYING

Large diffs are not rendered by default.

Empty file added pohelper/ChangeLog
Empty file.
4 changes: 4 additions & 0 deletions pohelper/Makefile.am
@@ -0,0 +1,4 @@
include $(top_srcdir)/build/vars.auxfiles.mk

SUBDIRS = data src
plugin = pohelper
3 changes: 3 additions & 0 deletions pohelper/NEWS
@@ -0,0 +1,3 @@
Translation Helper 0.1

* Initial release.
73 changes: 73 additions & 0 deletions pohelper/README
@@ -0,0 +1,73 @@
==================
Translation Helper
==================

.. contents::


About
=====

Translation Helper is a plugin for Geany that improves the support for
GetText translation files, by providing various features specific to this
format and to translators.


Features
--------

* Navigation between all, untranslated or fuzzy messages;
* Reformatting of the translation (reflow);
* Toggling the fuzziness of a translation;
* Pasting of the untranslated string to the translation;
* Automatic updating of the translation metadata.


Requirements
============

This plugin only requires GLib, GTK and Geany to work. If you intent to build
it yourself, you will need to get the development files of these programs and
libraries. You can find these packages at http://www.geany.org/ and
http://www.gtk.org/.


Installation
============

For detailed instructions, see the INSTALL file of the Geany-Plugins package
this plugin is part of.


Usage
=====

First enbale the plugin the the Plugin Manager of Geany. Once enabled,
the plugin adds a new menu under "Tools -> Translation Helper" giving
access to the various actions it provides. You can of course configure
keybindings for each actions under the Keybindings section of the Geany
preferences.


License
=======

Translation Helper is distributed under the terms of the GNU General Public
License as published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version. You should have received a copy
of the GNU General Public License along with WebHelper. If not, see
<http://www.gnu.org/licenses/>.


Contact
=======

You can email me at <ban(at)herbesfolles(dot)org>, and I may also be on the
#geany channel on FreeNode, under the `b4n` nickname.


Bug reports and feature requests
--------------------------------

To report a bug or ask for a new feature, please use the Geany-Plugins tracker
on SourceForge: http://sourceforge.net/tracker/?group_id=222729
4 changes: 4 additions & 0 deletions pohelper/data/Makefile.am
@@ -0,0 +1,4 @@
include $(top_srcdir)/build/vars.docs.mk
plugin = pohelper

dist_plugindata_DATA = menus.ui
239 changes: 239 additions & 0 deletions pohelper/data/menus.ui
@@ -0,0 +1,239 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-back</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-forward</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-back</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-forward</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-back</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-forward</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-back</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-go-forward</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="image9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="stock">gtk-paste</property>
<property name="icon-size">1</property>
</object>
<object class="GtkMenuItem" id="root_item">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">_Translation Helper</property>
<property name="use_underline">True</property>
<child type="submenu">
<object class="GtkMenu" id="menu">
<property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem" id="previous_string">
<property name="label" translatable="yes">_Previous String</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Go to previous string</property>
<property name="use_underline">True</property>
<property name="image">image1</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="next_string">
<property name="label" translatable="yes">_Next String</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Go to next string</property>
<property name="use_underline">True</property>
<property name="image">image2</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="previous_untranslated">
<property name="label" translatable="yes">Pre_vious Untranslated</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Go to previous untranslated string</property>
<property name="use_underline">True</property>
<property name="image">image3</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="next_untranslated">
<property name="label" translatable="yes">Next _Untranslated</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Go to next untranslated string</property>
<property name="use_underline">True</property>
<property name="image">image4</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator2">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="previous_fuzzy">
<property name="label" translatable="yes">Previous Fu_zzy</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Go to previous fuzzily translated string</property>
<property name="use_underline">True</property>
<property name="image">image5</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="next_fuzzy">
<property name="label" translatable="yes">Next _Fuzzy</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Go to next fuzzily translated string</property>
<property name="use_underline">True</property>
<property name="image">image6</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator3">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="previous_untranslated_or_fuzzy">
<property name="label" translatable="yes">Previous Untranslated or Fuzz_y</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Go to previous untranslated or fuzzy string</property>
<property name="use_underline">True</property>
<property name="image">image7</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="next_untranslated_or_fuzzy">
<property name="label" translatable="yes">Next Untranslated _or Fuzzy</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Go to next untranslated or fuzzy string</property>
<property name="use_underline">True</property>
<property name="image">image8</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator4">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="toggle_fuzziness">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Toggle current translation fuzziness</property>
<property name="label" translatable="yes">_Toggle Fuzziness</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="paste_message_as_translation">
<property name="label" translatable="yes">Paste _Message as Translation</property>
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Paste the original untranslated string to the translation</property>
<property name="use_underline">True</property>
<property name="image">image9</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="reflow_translation">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Reflow the current translation string</property>
<property name="label" translatable="yes">_Reflow Translation</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator5">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkCheckMenuItem" id="update_headers_upon_save">
<property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Whether to update the translation headers (author, revision date, ...) upon file save</property>
<property name="label" translatable="yes">Update _Headers Upon Save</property>
<property name="use_underline">True</property>
</object>
</child>
</object>
</child>
</object>
</interface>
13 changes: 13 additions & 0 deletions pohelper/src/Makefile.am
@@ -0,0 +1,13 @@
include $(top_srcdir)/build/vars.build.mk
plugin = pohelper

geanyplugins_LTLIBRARIES = pohelper.la


pohelper_la_SOURCES = gph-plugin.c
pohelper_la_CPPFLAGS = $(AM_CPPFLAGS) \
-DG_LOG_DOMAIN=\"PoHelper\"
pohelper_la_CFLAGS = $(AM_CFLAGS)
pohelper_la_LIBADD = $(COMMONLIBS)

include $(top_srcdir)/build/cppcheck.mk

0 comments on commit 6b3ccdd

Please sign in to comment.