I’m interested as well! ![]()
Perhaps @Nick-Hall can tell us how an add-on coded in non-english Python is supposed to behave for translation fallback languages? Is there a way to set up the sequence to insert en-US, en-GB, en before eo ? (Priority of english dialects is arguable.)
Is there something similar to the Fallback languages in LingoHub or i18next?
Try repository:
I built on a Mac but make is generic enough to work on linux too. PersonFS does not work on Win AIO, so these are not relevant there.
Add all of these files to the PersonFS folder.
make
or
make english
will create the anglicized version
make esperanto
will revert to the original esperanto version
Let me know if there are issues.
Gary
@GaryGriffin I did the 1st test with the version that I forked, and that worked.
One problem with version 1.4.1 is, that it needs a new package to check the version number of the gedcomx package. And if it can´t find that, it tries to show an error mesage, and then tries to download that package with PIP. And although that seems to be quite user friendly, it’s not, because it uses gettext to display the error, and gettext isn’t loaded yet. That import is a dozen lines down in the code.
When I fixed that, another error showed up, and when I fixed that, another error showed up, which made me give up. I’m working on my laptop now, which doesn´t have that extra package yet, so that I can test this again.
And this revealed that my earlier effort to move the import triggered the other errors, so I simply removed the gettext call, and replaced it with an English text, and that works.
There are a few new strings, that need translations. Did you see those already?
I tried main and 1.4.0 and both seemed to work. I tried 1.4.2 (latest) and it has the gettext issue. The gramps bundle on a Mac uses 3.9, whereas the system version is 3.8 . So running pip puts files in the wrong place.
I will create an issue for the authors and see if they can address before we go down a rabbit hole.
I will review for any new strings and update while waiting for authors to fix pip stuff.
OK, I understand. The latest fix for the gettext issue works here, in Mint, and I reported that to the author.
Are you saying that there is a Python version conflict on your Mac?
Yes, the bundle that jralls makes includes python 3.9 . The system default is 3.8 . So pip installs packages in the wrong place. At this point I am stymied on fixing the dynamic pip. I sent to authors for suggestions.
I updated my repo to include the 3 strings I found in 1.4.2 . Let me know if there are others I missed.
Here you go:
- The 3rd column in the Search screen: Should be something like Surname, given name,
- The Launch button in that same screen. Launch is technically right, according to ChatGPT, but its purpose seems to be to repeat the search, after changing the search fields, so it’s more like a Refresh,
- New hints for the FamilySearch Identification Number and 1-click import buttons in the FS tab.
These 3 are fixed in my repo. Let me know if there are others.
I still see a Launch button here.
Did you get an answer? By opening a Terminal at the Resources folder within the Gramps application bundle, I can run pip3 but I need to study its options to see how to get it to install the packages there.
I have not received an answer.
If I run on my Monterey Mac:
python3 -m pip install …
in a Terminal window, it puts the packages in
~/Library/Python/3.8/lib/python/site-packages.
But the gramps installer puts its packages in
/Applications/Gramps/Contents/Resources/lib/python3.9/site-packages
To get this to work, I manually copied all of the new packages to the same folder as the PersonFS gramplet and then disabled the version check on one of the packages (gedcomx) in the PersonFS.py code. I know this is not correct, but so far is all that I have been able to make work. The gramplet invokes pip (as needed) to get any needed packages, and that fails miserably. So I made sure it does not need to invoke pip.
Maybe I need to use ‘venv’ somehow?
I also have a Mac running Mojave (default python 3.5.3) so solving this may allow me to use this system as the gramplet requires python 3.8 .
I’ve used venv for experimenting with other packages (not Gramps), and when I run pip within that virtual environment, the packages get installed there as desired.
I suppose using a virtual environment for Gramps development would be a good idea, but I defer to the developers as to how they actually do it. The wiki doesn’t mention venv as far I can see.
Meanwhile I see that there’s an “–isolated” option for pip that ignores environment variables and user configuration files. I’ll try that when I get a chance.
And in the mean time, I found a way to run it in Dutch!
I made that translation after I found a shell script named locale/aldLingo, and ran that from the PersonFS directory, with parameter nl. It creates a locale/nl/LC_MESSAGE directory, and then uses another script that creates a new PO file, translates that with Google translate, and compiles that into locale/nl/LC_MESSAGES/addon.mo, which holds the translations.
Here’s the result:
There are a few errors in the translation, like in the label for the Birth date. It says Vogel, which is Dutch for Bird, not Birth! And it also says familietearch somewhere, but overall I’m quite happy with it.
The only problem that I have now is that my database is polluted with lots of duplicate tags in different languages. And luckily, I have enough backups to correct that.
I made a patch which works for linux. I don’t know if it works for windows.
The patch is available in the bug request: 0012866: Crash in Pedigree view related to tag colors - Gramps - Bugtracker – Free Genealogy Software
Listing all the people you’ve added or changed is as straightforward as
from gedcomx import FsSession
fs = FsSession(USERNAME, PASSWORD)
changes = fs.get_url('/service/tree/tree-data/user/contributions/by-person?pageSize=200', {}).json()
for p in changes['persons']:
print(p['id'], p['name'])
while 'nextPageToken' in changes:
changes = fs.get_url('/service/tree/tree-data/user/contributions/by-person?pageSize=200&from='+changes['nextPageToken'], {}).json()
for p in changes['persons']:
print(p['id'], p['name'])
For the private persons you just need to change the url to /service/tree/tree-data/space/CURRENT/persons
Nice! I just put a link to your post in a reply to the author about missing a way to find my own profile from the Gramplet. And on that, he cited an article from FamilySearch, which shows that you can’t search for private persons.
I checked that on the site, and it is indeed not possible for me. There is no Enno to be found, even though I am the man himself, and logged on.
And if you want only the people you’ve added yourself you could do this:
from getmyancestors.classes.session import Session
fs = Session(USERNAME, PASSWORD)
changes = fs.get_url('/service/tree/tree-data/user/contributions/by-date?pageSize=200', {})
for c in changes['contributions']:
if c['type'] == 'CREATE_PERSON':
p = changes['persons'][c['personId']]
print(p['id'], p['name'])
while 'nextPageToken' in changes:
changes = fs.get_url('/service/tree/tree-data/user/contributions/by-date?pageSize=200&from='+changes['nextPageToken'], {})
for c in changes['contributions']:
if c['type'] == 'CREATE_PERSON':
p = changes['persons'][c['personId']]
print(p['id'], p['name'])
(that example uses getmyancestors rather than gedcomx but as you can see it’s pretty much the same)
Hi there, I am new to this forum. I have been using Gramps for 8 months now and have been enjoying it. I noticed in this thread that this Gramplet won’t work with Windows in it’s current state. Will there be a way to have this on windows in the future? This is probably the number one thing I am missing in Gramps as I do a lot with Family Search. I am a novice at all of this but would love to learn more.
There might be, but I wouldn’t count on it. The author wrote that it doesn’t work, and I think that he is focussing on Linux, so it is not likely that he will create a fix for Windows. And I don’t see any fellow developer working on it either.
If you want to work with the tree, you can try windows programs like Ancestral Quest, Legacy Family Tree, and RootsMagic. They all have free versions that can communicate with FamilySearch, and RootsMagic can also synchronize data with Ancestry, and find hints on Find-My-Past and My Heritage.
This way of working means that you have to use GEDCOM files to exchange data between Gramps and these programs, and you need a bit of discipline, to keep your data in sync. You will also see that when you import new brances from FamilySearch with these programs, export those, and import the GEDCOM files back into Gramps, you may need to merge existing persons to connect the imported branch to your tree, and you may also see a few import warnings, because all programs speak a different GEDCOM dialect, and export fields that Gramps may not understand, because they’re not standard. And that is something that you will have to deal with. Gramps’ GEDCOM import is quite good, and I haven’t seen many import errors that Gramps can be blamed for.
