Difference between revisions of "Third-party Plugins"

From Gramps
Jump to: navigation, search
(Installing Plugins in GRAMPS)
m (Redirected page to 3.4 Addons)
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Third-party plugins give you more tools to work with your genealogy data in GRAMPS. This page lists plugins written by users to work with the 3.1.x series version of GRAMPS, to be released in March 2009.
+
#REDIRECT [[3.4 Addons]]
 
+
'''Plugins for the previous version''': [[3.0.x Third-party Plugins]] page.
+
 
+
{{man warn|Please Note:|These plugins may not be officially part of GRAMPS. Feature requests and bugs with these plugins should be directed to the contact information below.}}
+
 
+
[[Category:Plugins]]
+
[[Category:Developers/General]]
+
 
+
= Installing Plugins in GRAMPS =
+
 
+
To install a GRAMPS Plugin:
+
 
+
# click on the download link below
+
# if the download is a file that ends in '''.py''', save it in your [[GRAMPS User Directory]], in the plugins folder
+
# if the download is a file that ends in '''.zip''' or '''.gz''', save the contents of the file in your [[GRAMPS User Directory]], in the plugins folder
+
# restart gramps, '''OR''' reload the plugins from the Help -> Plugin Status -> Reload button.
+
 
+
The Plugin Status window will show you which plugins failed to load, double click on such an entry shows you the error. You can mail this error to the plugin contact.
+
 
+
= Plugin List =
+
 
+
Every plugin listed below should have a '''Version number''' (so one can tell if and when it changes in the future), and also specify what version of GRAMPS it was written for. The '''Rating''' should give an indication of the state of the plugin:
+
 
+
* 0 Stars - initial version, basic framework defined, doesn't work correctly, please help
+
* 1 Star - partially working with some functionality, but much more work is needed; needs testing
+
* 2 Stars - about half done, works, but more work is needed for it to be complete; needs more testing
+
* 3 Stars - some known issues, but mostly complete
+
* 4 Stars - complete, works well, fully tested
+
 
+
The '''Use''' indicates who might make the most out of the plugin. Common categories of users:
+
 
+
* All
+
* Developer
+
* Beginning user
+
* Expert user
+
* Example
+
 
+
The plugins:
+
 
+
{{Template:Plugins}}
+
 
+
= Information for Plugin writers =
+
== Share it==
+
Have you written a plugin for GRAMPS you want to share with the world? Here's how you do it:
+
 
+
* Add the correct license. GRAMPS is GPLv2, you use the GRAMPS plugin system, so make sure you have the correct license at the top of your file. See [[Howto: Contribute to GRAMPS]]
+
* Create a filename.tar.gz or filename.zip file of your plugin code
+
* Upload the code to this wiki
+
* Add an entry of your plugin to the list above.
+
* Create a new wiki page, and refer to that page here, with a short description of what the plugin does
+
 
+
== Internationalize it ==
+
There is a big possibility that you are not a native English speaker and want your report in your mother tongue. To enable others to use your report, and make it easy to include your report later in GRAMPS without large changes, do the following for text:
+
 
+
==== Translation function ====
+
* Suppose you have a string Name, which you want for your own use in French, so Nom. Then write a translation function with the name _.
+
* For every string, pass it through your translation function: _("Name")
+
* Your translation function should then look like this:
+
 
+
mytranslation = {
+
    'Name' : "Nom"
+
    }
+
+
from gettext import gettext
+
import locale
+
lang = locale.getlocale()[0]
+
if lang:
+
    lang = lang.split('_')[0]
+
def _(string):
+
    if lang == 'fr':
+
        return mytranslation.get(string, gettext(string))
+
    else:
+
        return gettext(string)
+
 
+
Change here 'fr' by the language code of your language
+
* If the report becomes part of GRAMPS, it will suffice to delete this code and replace it by
+
from gettext import gettext as _
+
* Note that you only need to include strings that are not yet a part of GRAMPS, as those will be translated automatically by the gettext routine
+
 
+
==== Pitfalls ====
+
* We support right to left languages like Arabic, so never constructs text parts by concatenation of pieces. Always use full sentences/paragraphs with variable substitution, so that a right to left language can translate it correctly.
+
 
+
==== Template ====
+
* There is a possible [[Media:additional.pot.gz|template]] which lists references.
+
Translators may add references to their main translation.
+

Revision as of 23:44, 22 May 2012

Redirect to: