Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate with Gramps' APIs instead of parsing Gramps XML #2444

Draft
wants to merge 3 commits into
base: 0.4.x
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 21 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -100,21 +100,28 @@ jobs:
shell: bash

- name: Run the tests
if: startsWith(runner.os, 'Linux')
run: ./bin/test
shell: bash

- name: Run the tests
if: ${{ ! startsWith(runner.os, 'Linux') }}
run: ./bin/test
run: |
./bin/test-ruff
./bin/test-mypy
./bin/test-pytest betty/tests/gramps/test_loader.py
shell: bash
env:
BETTY_TEST_SKIP_SHELLCHECK: true
BETTY_TEST_SKIP_RUFF: true
BETTY_TEST_SKIP_MYPY: true
BETTY_TEST_SKIP_STYLELINT: true
BETTY_TEST_SKIP_ESLINT: true
BETTY_TEST_SKIP_PLAYWRIGHT: true
# @todo Uncomment this and remove the previous step
# - name: Run the tests
# if: startsWith(runner.os, 'Linux')
# run: ./bin/test
# shell: bash
#
# - name: Run the tests
# if: ${{ ! startsWith(runner.os, 'Linux') }}
# run: ./bin/test
# shell: bash
# env:
# BETTY_TEST_SKIP_SHELLCHECK: true
# BETTY_TEST_SKIP_RUFF: true
# BETTY_TEST_SKIP_MYPY: true
# BETTY_TEST_SKIP_STYLELINT: true
# BETTY_TEST_SKIP_ESLINT: true
# BETTY_TEST_SKIP_PLAYWRIGHT: true

- name: Upload code coverage
uses: codecov/codecov-action@v5
118 changes: 117 additions & 1 deletion betty/assets/locale/ar/betty.po
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-03-22 20:24+0000\n"
"POT-Creation-Date: 2025-03-24 12:55+0000\n"
"PO-Revision-Date: 2024-11-30 19:00+0000\n"
"Last-Translator: Bart Feenstra <bart@bartfeenstra.com>\n"
"Language: ar\n"
@@ -522,6 +522,12 @@ msgstr ""
msgid "Go to the front page"
msgstr ""

#, python-brace-format
msgid ""
"Gramps cannot import {file_path}. Supported file formats are "
"{supported_extensions}."
msgstr ""

msgid "HTTP API Documentation"
msgstr ""

@@ -589,18 +595,68 @@ msgstr ""
msgid "Loaded the configuration from {configuration_file_path}."
msgstr ""

#, python-brace-format
msgid "Loaded {citation_count} citation."
msgid_plural "Loaded {citation_count} citations."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
msgstr[5] ""

#, python-brace-format
msgid "Loaded {citation_count} citations."
msgstr ""

#, python-brace-format
msgid "Loaded {event_count} event."
msgid_plural "Loaded {event_count} events."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
msgstr[5] ""

#, python-brace-format
msgid "Loaded {event_count} events."
msgstr ""

#, python-brace-format
msgid "Loaded {family_count} family."
msgid_plural "Loaded {family_count} families."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
msgstr[5] ""

#, python-brace-format
msgid "Loaded {file_count} files."
msgstr ""

#, python-brace-format
msgid "Loaded {media_count} media objects."
msgid_plural "Loaded {media_count} media objects."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
msgstr[5] ""

#, python-brace-format
msgid "Loaded {note_count} note."
msgid_plural "Loaded {note_count} notes."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
msgstr[5] ""

#, python-brace-format
msgid "Loaded {note_count} notes."
msgstr ""
@@ -609,6 +665,26 @@ msgstr ""
msgid "Loaded {person_count} people."
msgstr ""

#, python-brace-format
msgid "Loaded {person_count} person."
msgid_plural "Loaded {person_count} persons."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
msgstr[5] ""

#, python-brace-format
msgid "Loaded {place_count} place."
msgid_plural "Loaded {place_count} places."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
msgstr[5] ""

#, python-brace-format
msgid "Loaded {place_count} places."
msgstr ""
@@ -617,6 +693,26 @@ msgstr ""
msgid "Loaded {repository_count} repositories as sources."
msgstr ""

#, python-brace-format
msgid "Loaded {repository_count} repository."
msgid_plural "Loaded {repository_count} repositories."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
msgstr[5] ""

#, python-brace-format
msgid "Loaded {source_count} source."
msgid_plural "Loaded {source_count} sources."
msgstr[0] ""
msgstr[1] ""
msgstr[2] ""
msgstr[3] ""
msgstr[4] ""
msgstr[5] ""

#, python-brace-format
msgid "Loaded {source_count} sources."
msgstr ""
@@ -874,6 +970,20 @@ msgid ""
"\"betty:link-{link_name}:url\" attribute. This link was ignored."
msgstr ""

#, python-brace-format
msgid ""
"The Gramps {gramps_entity_type} {gramps_entity_id} entity has a "
"\"betty:link-{link_name}:media_type\" attribute with value "
"\"{media_type}\", which is not a valid IANA media type. This media type "
"was ignored."
msgstr ""

#, python-brace-format
msgid ""
"The Gramps {gramps_entity_type} {gramps_entity_id} entity requires a "
"\"betty:link-{link_name}:url\" attribute. This link was ignored."
msgstr ""

msgid "The URL must include a host."
msgstr ""

@@ -887,6 +997,12 @@ msgid ""
"{entity_id} ({entity_label}), which was ignored."
msgstr ""

#, python-brace-format
msgid ""
"The betty:privacy Gramps attribute must have a value of \"public\" or "
"\"private\", but \"{privacy_value}\" was given, which was ignored."
msgstr ""

#, python-brace-format
msgid ""
"The entity reference must be for an entity of type "
82 changes: 81 additions & 1 deletion betty/assets/locale/betty.pot
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Betty VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-03-22 20:24+0000\n"
"POT-Creation-Date: 2025-03-24 12:55+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -510,6 +510,12 @@ msgstr ""
msgid "Go to the front page"
msgstr ""

#, python-brace-format
msgid ""
"Gramps cannot import {file_path}. Supported file formats are "
"{supported_extensions}."
msgstr ""

msgid "HTTP API Documentation"
msgstr ""

@@ -577,18 +583,48 @@ msgstr ""
msgid "Loaded the configuration from {configuration_file_path}."
msgstr ""

#, python-brace-format
msgid "Loaded {citation_count} citation."
msgid_plural "Loaded {citation_count} citations."
msgstr[0] ""
msgstr[1] ""

#, python-brace-format
msgid "Loaded {citation_count} citations."
msgstr ""

#, python-brace-format
msgid "Loaded {event_count} event."
msgid_plural "Loaded {event_count} events."
msgstr[0] ""
msgstr[1] ""

#, python-brace-format
msgid "Loaded {event_count} events."
msgstr ""

#, python-brace-format
msgid "Loaded {family_count} family."
msgid_plural "Loaded {family_count} families."
msgstr[0] ""
msgstr[1] ""

#, python-brace-format
msgid "Loaded {file_count} files."
msgstr ""

#, python-brace-format
msgid "Loaded {media_count} media objects."
msgid_plural "Loaded {media_count} media objects."
msgstr[0] ""
msgstr[1] ""

#, python-brace-format
msgid "Loaded {note_count} note."
msgid_plural "Loaded {note_count} notes."
msgstr[0] ""
msgstr[1] ""

#, python-brace-format
msgid "Loaded {note_count} notes."
msgstr ""
@@ -597,6 +633,18 @@ msgstr ""
msgid "Loaded {person_count} people."
msgstr ""

#, python-brace-format
msgid "Loaded {person_count} person."
msgid_plural "Loaded {person_count} persons."
msgstr[0] ""
msgstr[1] ""

#, python-brace-format
msgid "Loaded {place_count} place."
msgid_plural "Loaded {place_count} places."
msgstr[0] ""
msgstr[1] ""

#, python-brace-format
msgid "Loaded {place_count} places."
msgstr ""
@@ -605,6 +653,18 @@ msgstr ""
msgid "Loaded {repository_count} repositories as sources."
msgstr ""

#, python-brace-format
msgid "Loaded {repository_count} repository."
msgid_plural "Loaded {repository_count} repositories."
msgstr[0] ""
msgstr[1] ""

#, python-brace-format
msgid "Loaded {source_count} source."
msgid_plural "Loaded {source_count} sources."
msgstr[0] ""
msgstr[1] ""

#, python-brace-format
msgid "Loaded {source_count} sources."
msgstr ""
@@ -862,6 +922,20 @@ msgid ""
"\"betty:link-{link_name}:url\" attribute. This link was ignored."
msgstr ""

#, python-brace-format
msgid ""
"The Gramps {gramps_entity_type} {gramps_entity_id} entity has a "
"\"betty:link-{link_name}:media_type\" attribute with value "
"\"{media_type}\", which is not a valid IANA media type. This media type "
"was ignored."
msgstr ""

#, python-brace-format
msgid ""
"The Gramps {gramps_entity_type} {gramps_entity_id} entity requires a "
"\"betty:link-{link_name}:url\" attribute. This link was ignored."
msgstr ""

msgid "The URL must include a host."
msgstr ""

@@ -875,6 +949,12 @@ msgid ""
"{entity_id} ({entity_label}), which was ignored."
msgstr ""

#, python-brace-format
msgid ""
"The betty:privacy Gramps attribute must have a value of \"public\" or "
"\"private\", but \"{privacy_value}\" was given, which was ignored."
msgstr ""

#, python-brace-format
msgid ""
"The entity reference must be for an entity of type "
Loading