How to Mass Rename All Associations in the Database?

I have several questions regarding the renaming of associations. Perhaps all of them can be solved with one tool.

I have manually created hundreds of paired associations. Here’s the complete list:

  1. “Хрещений син” (translated as “Godson”) - “Хрещений батько” (translated as “Godfather”)
  2. “Хрещений син” (translated as “Godson”) - “Хрещена мати” (translated as “Godmother”)
  3. “Хрещена дочка” (translated as “Goddaughter”) - “Хрещена мати” (translated as “Godmother”)
  4. “Хрещена дочка” (translated as “Goddaughter”) - “Хрещений батько” (translated as “Godfather”)
  5. “Свідок” (translated as “Witness”) - “Свідок” (translated as “Witness”).

I want to perform several consecutive transformations (or maybe a single general one):

1. Rename from Ukrainian to English. The SuperTool add-on can potentially solve this, but I don’t know how to use it yet. I request knowledgeable specialists to explain step by step how to do it without damaging the database.
2. Merge “Godfather” and “Godmother” into one type - “Godparent”.
3. Merge “GodDaughter” and “Godson” into one type - “Godchild”.
4. Rename the witnesses to English. However, if I do this now, I will have the role “Witness” on both sides of the association. I would like to create a paired association:

"Witness - "Witness for" 

I think theoretically (though I don’t know if it will work), I can delete one of the witnesses in each pair, who should become “Witness for.” As a second step, I need to add the “Witness” - “Witness for” pair of associations in the “SyncAssociation” add-on settings. And as a third step, I need to run the “SyncAssociation” add-on.

Please help with detailed steps for renaming associations and let me know if the approach I’ve planned for renaming and transforming the witnesses is correct. I have a particular need for using the “SuperTool” tool.

Thank you for any assistance!

The method with the least steep learning curve is to edit the XML file with Search&Replace in a text editor and import it into a new tree.

  1. backup your Tree (without media)
  2. extract the data.gramps XML file from the .gpkg (or .gramps) backup file with a ZIP tool.
    (If the data.gramps XML is compressed, extract the plain text with the ZIP tool.)
  3. find an instance of the Association XML tag in a text editor
    e.g., search for “Хрещена дочка” (goddaughter)
  4. copy enough of the tag line to differentiate an Association occurrence from text in a Note or Description line.
  5. replace all occurrences of that string with the english “Godchild” equivalent
  6. repeat for each type to convert
  7. import into a new tree
1 Like

I think this method solves almost all I need. Thanks.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.