Changes

Jump to: navigation, search

Addons development

240 bytes added, 04:35, 27 March 2018
no edit summary
#Gramplet
#Sidebar
#Database (Introduced Gramps 5.x and greater)
Writing an addon is fairly straightforward if you have just a little bit of Python experience. And sharing your addon is the right thing to do. The general steps to writing an addon and sharing your own addons are:
=== Test your addon as you develop ===
 
{{man warn|{{bug|10436}} Symlinks to folders in gramps plugin dir are not scanned}}
 
To test your addon as you develop it is suggested that you insert your NewProjectName plugin into your Gramps user plugin directory with a link to your addon development directory, like so:
Your installed Gramps will search this folder (and subdirectories) for .gpr.py files, and add them to the plugin list.
If you have code that you want to share between addons, you don't need to do anything special. Currently, Gramps adds each directory in which a .gpr.py is found onto the PYTHONPATH which is searched when you perform an import. Thus "import NewProjectName" will work from another addon. You should always make sure you name your addons with a name appropriate for Python imports.
=== Commit your changes ===
For general help on translations in Gramps, see [[Coding for translation]]. However, that will only use translations that come with Gramps, or allows you to contribute translations to the Gramps core. To have your own managed translations that will be packaged with your addon, read the rest of this page.
Note that these instructions will only work for Python strings, if you have a glade file, it will not get translated.
For any addon which you have translations into other languages, you will need to add a way to retrieve the translation. You need to add this to the top of your NewProjectName.py file:

Navigation menu