Open main menu

Gramps β

Changes

User:Ahs3/Maintainers

1,646 bytes added, 22:26, 30 May 2025
Commands to compile translations using make.py
# Merge the PR to the upstream <tt>addons</tt> tree.
=== Commands to compile translations using make.py Create/Update Translation Information ===You will need the <tt>gramps.pot </tt> file that is currently being used for the Weblate translations in your local gramps 6.0 tree. It is used to exclude strings from the Addons addons translation component that have already been translated in the core Program component. This isYou can view the file here:
https://github.com/gramps-project/gramps/blob/maintenance/gramps60/po/gramps.pot
Translation The translation workflow with using <tt>make.py</tt> has these steps:# Run Use the command ''init'' command to add any new strings to the addon's <tt>template.pot </tt> file.# The command Use the ''aggregate-pot'' is run command to aggregate collect all of the addon <tt>template.pot </tt> files into a single <tt>po/addons.pot </tt> file which is then used by Weblate for translations. Note: The <tt>GRAMPSPATH </tt> environment variable must be set to a current gramps60 repository for this step. If run with no updates in any <tt>template.pot</tt>, the resulting <tt>addons.pot </tt> file will only have a timestamp update. In this case, it and does not need merged back.
On macOSIn Linux environments, assuming a workspace created as above, the command looks commands would look something like this:
DYLD_LIBRARY_PATH $ cd my_workspace $ cd addons-source $ GRAMPSPATH=path_to_local_gramps_install "../gramps" python3 ./make.py gramps60 init SomeAddonName $ GRAMPSPATH="../gramps" python3 ./make.py gramps60 aggregate-pot $ GRAMPSPATH="../gramps" python3 ./make.py gramps60 extract-po
The Weblate translators can now translate the strings. Weblate generates a pull request. This can be merged on a regular basis. You can do this from the GitHub GUIOn macOS, but '''don’t squash the commits'''.commands look similar:
The local $ cd my_workspace $ cd addons-source $ DYLD_LIBRARY_PATH="path_to_local_gramps_installation" GRAMPSPATH="../gramps" \ python3 ./make.py gramps60 init SomeAddonName $ DYLD_LIBRARY_PATH="path_to_local_gramps_installation" GRAMPSPATH="../gramps" \ python3 ./make.py gramps60 aggregate-pot $ DYLD_LIBRARY_PATH="path_to_local_gramps_installation" GRAMPSPATH="../gramps" \ python3 ./make.po files (which were updated by Weblate) are updated for publishing using the ''py gramps60 extract-po'' command. These updates should be merged back to the gramps60 branch.
The Weblate translators can now translate the strings. Weblate will in turn generate a PR. These translation PRs can usually just be merged on a regular basis. You can do this from the GitHub GUI, or using <tt>gh</tt> but '''DO NOT squash the commits'''. For example, suppose PR #1234 is a set of modifications from Weblate:  $ cd my_workspace $ cd addons-source $ gh pr merge 1234 The <tt>local.po</tt> files (which were updated by Weblate) then need to be updated for publishing using the <tt>extract-po</tt> command in <tt>make.py</tt>. These updates should be merged back to the <tt>maintenance/gramps60</tt> branch of the <tt>addons-source</tt> repository. The commands would look like this: In Linux environments:  $ cd my_workspace $ cd addons-source $ GRAMPSPATH="../gramps" python3 ./make.py gramps60 extract-po On macOS, the commands look similar:  $ cd my_workspace $ cd addons-source $ DYLD_LIBRARY_PATH="path_to_local_gramps_installation" GRAMPSPATH="../gramps" \ python3 ./make.py gramps60 extract-po At this point, the translations are committed but not published. Since publishing updates every addon, the timing for this action is TBDdependent on how many addons are being updated, and any sort of timing or logistical concerns from the Gramps maintainers.
=== Package your addon ===
57
edits