Skip to content

Commit

Permalink
fix(migrations): add missing translations
Browse files Browse the repository at this point in the history
Co-Authored-by: Pascal Repond <pascal.repond@rero.ch>
  • Loading branch information
PascalRepond committed Oct 31, 2024
1 parent 462e814 commit 9c6b6d2
Show file tree
Hide file tree
Showing 13 changed files with 274 additions and 33 deletions.
15 changes: 10 additions & 5 deletions rero_ils/modules/migrations/data/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
api_blueprint = Blueprint("api_migration_data", __name__, url_prefix="/migration_data")


def _(x):
"""Identity function used to trigger string extraction."""
return x


class MigrationDataListResource(ContentNegotiatedMethodView):
"""Imports REST resource."""

Expand Down Expand Up @@ -101,16 +106,16 @@ def get(self, **kwargs):
)

# aggregations
search.aggs.bucket("migration", "terms", field="migration_id.raw", size=30)
search.aggs.bucket("batch", "terms", field="deduplication.subset", size=30)
search.aggs.bucket(_("migration"), "terms", field="migration_id.raw", size=30)
search.aggs.bucket(_("batch"), "terms", field="deduplication.subset", size=30)
search.aggs.bucket(
"conversion_status", "terms", field="conversion.status", size=30
_("conversion_status"), "terms", field="conversion.status", size=30
)
search.aggs.bucket(
"deduplication_status", "terms", field="deduplication.status", size=30
_("deduplication_status"), "terms", field="deduplication.status", size=30
)
search.aggs.bucket(
"modified_by", "terms", field="deduplication.modified_by.raw", size=30
_("modified_by"), "terms", field="deduplication.modified_by.raw", size=30
)

# filters
Expand Down
7 changes: 6 additions & 1 deletion rero_ils/modules/migrations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
from .permissions import MigrationPermissionPolicy, check_permission


def _(x):
"""Identity function used to trigger string extraction."""
return x


def simple_search_json_serializer(data, code=200, headers=None):
"""JSON serializer to reproduce a simple invenio search format."""
if code != 200:
Expand Down Expand Up @@ -87,7 +92,7 @@ def get(self, **kwargs):
)
if query:
search = search.query("query_string", query=query)
search.aggs.bucket("status", "terms", field="status", size=30)
search.aggs.bucket(_("status"), "terms", field="status", size=30)
if status := flask_request.args.get("status"):
search = search.filter("term", status=status)
return self.make_response(search.execute().to_dict(), 200)
Expand Down
23 changes: 22 additions & 1 deletion rero_ils/translations/ar/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ msgid ""
msgstr ""
"Project-Id-Version: rero-ils 0.9.1\n"
"Report-Msgid-Bugs-To: software@rero.ch\n"
"POT-Creation-Date: 2024-10-24 16:46+0200\n"
"POT-Creation-Date: 2024-10-31 12:03+0100\n"
"PO-Revision-Date: 2021-10-24 13:38+0000\n"
"Last-Translator: ButterflyOfFire <ButterflyOfFire@protonmail.com>\n"
"Language: ar\n"
Expand Down Expand Up @@ -133,6 +133,7 @@ msgstr ""

#: rero_ils/config.py:2235 rero_ils/config.py:2309 rero_ils/config.py:2393
#: rero_ils/config.py:2497 rero_ils/config.py:2553
#: rero_ils/modules/migrations/views.py:95
msgid "status"
msgstr "الحالة"

Expand Down Expand Up @@ -11575,6 +11576,26 @@ msgstr ""
msgid "match"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:109
msgid "migration"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:110
msgid "batch"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:112
msgid "conversion_status"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:115
msgid "deduplication_status"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:118
msgid "modified_by"
msgstr ""

#: rero_ils/modules/notifications/jsonschemas/notifications/notification-v0.0.1.json:4
#: rero_ils/modules/operation_logs/jsonschemas/operation_logs/operation_log-v0.0.1.json:108
#: rero_ils/modules/patron_transactions/jsonschemas/patron_transactions/patron_transaction-v0.0.1.json:134
Expand Down
31 changes: 26 additions & 5 deletions rero_ils/translations/de/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@ msgid ""
msgstr ""
"Project-Id-Version: rero-ils 0.9.1\n"
"Report-Msgid-Bugs-To: pascal.repond@rero.ch\n"
"POT-Creation-Date: 2024-10-24 16:46+0200\n"
"POT-Creation-Date: 2024-10-31 12:03+0100\n"
"PO-Revision-Date: 2024-10-24 15:06+0000\n"
"Last-Translator: Pascal Repond <pascal.repond@rero.ch>\n"
"Language-Team: German <https://hosted.weblate.org/projects/rero_plus/"
"rero-ils/de/>\n"
"Language: de\n"
"Language-Team: German <https://hosted.weblate.org/projects/rero_plus"
"/rero-ils/de/>\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.8.2-dev\n"
"Generated-By: Babel 2.16.0\n"

#: rero_ils/accounts_views.py:57
Expand Down Expand Up @@ -142,6 +141,7 @@ msgstr "Standort"

#: rero_ils/config.py:2235 rero_ils/config.py:2309 rero_ils/config.py:2393
#: rero_ils/config.py:2497 rero_ils/config.py:2553
#: rero_ils/modules/migrations/views.py:95
msgid "status"
msgstr "Status"

Expand Down Expand Up @@ -11558,6 +11558,26 @@ msgstr "keine Korrespondenz"
msgid "match"
msgstr "Korrespondenz"

#: rero_ils/modules/migrations/data/views.py:109
msgid "migration"
msgstr "Migration"

#: rero_ils/modules/migrations/data/views.py:110
msgid "batch"
msgstr "Stapel"

#: rero_ils/modules/migrations/data/views.py:112
msgid "conversion_status"
msgstr "Konvertierungsstatus"

#: rero_ils/modules/migrations/data/views.py:115
msgid "deduplication_status"
msgstr "Deduplizierungsstatus"

#: rero_ils/modules/migrations/data/views.py:118
msgid "modified_by"
msgstr "geändert von"

#: rero_ils/modules/notifications/jsonschemas/notifications/notification-v0.0.1.json:4
#: rero_ils/modules/operation_logs/jsonschemas/operation_logs/operation_log-v0.0.1.json:108
#: rero_ils/modules/patron_transactions/jsonschemas/patron_transactions/patron_transaction-v0.0.1.json:134
Expand Down Expand Up @@ -13271,3 +13291,4 @@ msgstr "Inveio-Assets"

#~ msgid "Checkouts are allowed or not."
#~ msgstr "Ausleihen sind erlaubt oder nicht."

31 changes: 26 additions & 5 deletions rero_ils/translations/en/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,16 @@ msgid ""
msgstr ""
"Project-Id-Version: rero-ils 0.9.1\n"
"Report-Msgid-Bugs-To: pascal.repond@rero.ch\n"
"POT-Creation-Date: 2024-10-24 16:46+0200\n"
"POT-Creation-Date: 2024-10-31 12:03+0100\n"
"PO-Revision-Date: 2024-10-24 15:03+0000\n"
"Last-Translator: Pascal Repond <pascal.repond@rero.ch>\n"
"Language-Team: English <https://hosted.weblate.org/projects/rero_plus/"
"rero-ils/en/>\n"
"Language: en\n"
"Language-Team: English <https://hosted.weblate.org/projects/rero_plus"
"/rero-ils/en/>\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.8.2-dev\n"
"Generated-By: Babel 2.16.0\n"

#: rero_ils/accounts_views.py:57
Expand Down Expand Up @@ -143,6 +142,7 @@ msgstr "location"

#: rero_ils/config.py:2235 rero_ils/config.py:2309 rero_ils/config.py:2393
#: rero_ils/config.py:2497 rero_ils/config.py:2553
#: rero_ils/modules/migrations/views.py:95
msgid "status"
msgstr "status"

Expand Down Expand Up @@ -11503,6 +11503,26 @@ msgstr "no match"
msgid "match"
msgstr "match"

#: rero_ils/modules/migrations/data/views.py:109
msgid "migration"
msgstr "migration"

#: rero_ils/modules/migrations/data/views.py:110
msgid "batch"
msgstr "batch"

#: rero_ils/modules/migrations/data/views.py:112
msgid "conversion_status"
msgstr "conversion status"

#: rero_ils/modules/migrations/data/views.py:115
msgid "deduplication_status"
msgstr "deduplication status"

#: rero_ils/modules/migrations/data/views.py:118
msgid "modified_by"
msgstr "modified by"

#: rero_ils/modules/notifications/jsonschemas/notifications/notification-v0.0.1.json:4
#: rero_ils/modules/operation_logs/jsonschemas/operation_logs/operation_log-v0.0.1.json:108
#: rero_ils/modules/patron_transactions/jsonschemas/patron_transactions/patron_transaction-v0.0.1.json:134
Expand Down Expand Up @@ -13182,3 +13202,4 @@ msgstr "Invenio assets"

#~ msgid "Checkouts are allowed or not."
#~ msgstr "Checkouts are allowed or not."

23 changes: 22 additions & 1 deletion rero_ils/translations/eo/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: rero-ils 1.0.1\n"
"Report-Msgid-Bugs-To: software@rero.ch\n"
"POT-Creation-Date: 2024-10-24 16:46+0200\n"
"POT-Creation-Date: 2024-10-31 12:03+0100\n"
"PO-Revision-Date: 2021-06-09 13:00+0000\n"
"Last-Translator: Nicolas Prongué <n.prongue@outlook.com>\n"
"Language: eo\n"
Expand Down Expand Up @@ -130,6 +130,7 @@ msgstr "loko"

#: rero_ils/config.py:2235 rero_ils/config.py:2309 rero_ils/config.py:2393
#: rero_ils/config.py:2497 rero_ils/config.py:2553
#: rero_ils/modules/migrations/views.py:95
msgid "status"
msgstr "stato"

Expand Down Expand Up @@ -11328,6 +11329,26 @@ msgstr ""
msgid "match"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:109
msgid "migration"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:110
msgid "batch"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:112
msgid "conversion_status"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:115
msgid "deduplication_status"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:118
msgid "modified_by"
msgstr ""

#: rero_ils/modules/notifications/jsonschemas/notifications/notification-v0.0.1.json:4
#: rero_ils/modules/operation_logs/jsonschemas/operation_logs/operation_log-v0.0.1.json:108
#: rero_ils/modules/patron_transactions/jsonschemas/patron_transactions/patron_transaction-v0.0.1.json:134
Expand Down
23 changes: 22 additions & 1 deletion rero_ils/translations/es/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ msgid ""
msgstr ""
"Project-Id-Version: rero-ils 0.9.1\n"
"Report-Msgid-Bugs-To: pascal.repond@rero.ch\n"
"POT-Creation-Date: 2024-10-24 16:46+0200\n"
"POT-Creation-Date: 2024-10-31 12:03+0100\n"
"PO-Revision-Date: 2024-03-26 11:02+0000\n"
"Last-Translator: Pascal Repond <pascal.repond@rero.ch>\n"
"Language: es\n"
Expand Down Expand Up @@ -134,6 +134,7 @@ msgstr "ubicación"

#: rero_ils/config.py:2235 rero_ils/config.py:2309 rero_ils/config.py:2393
#: rero_ils/config.py:2497 rero_ils/config.py:2553
#: rero_ils/modules/migrations/views.py:95
msgid "status"
msgstr "estado"

Expand Down Expand Up @@ -11542,6 +11543,26 @@ msgstr ""
msgid "match"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:109
msgid "migration"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:110
msgid "batch"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:112
msgid "conversion_status"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:115
msgid "deduplication_status"
msgstr ""

#: rero_ils/modules/migrations/data/views.py:118
msgid "modified_by"
msgstr ""

#: rero_ils/modules/notifications/jsonschemas/notifications/notification-v0.0.1.json:4
#: rero_ils/modules/operation_logs/jsonschemas/operation_logs/operation_log-v0.0.1.json:108
#: rero_ils/modules/patron_transactions/jsonschemas/patron_transactions/patron_transaction-v0.0.1.json:134
Expand Down
31 changes: 26 additions & 5 deletions rero_ils/translations/fr/LC_MESSAGES/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@ msgid ""
msgstr ""
"Project-Id-Version: rero-ils 0.9.1\n"
"Report-Msgid-Bugs-To: pascal.repond@rero.ch\n"
"POT-Creation-Date: 2024-10-24 16:46+0200\n"
"POT-Creation-Date: 2024-10-31 12:03+0100\n"
"PO-Revision-Date: 2024-10-24 15:06+0000\n"
"Last-Translator: Pascal Repond <pascal.repond@rero.ch>\n"
"Language-Team: French <https://hosted.weblate.org/projects/rero_plus/"
"rero-ils/fr/>\n"
"Language: fr\n"
"Language-Team: French <https://hosted.weblate.org/projects/rero_plus"
"/rero-ils/fr/>\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
"X-Generator: Weblate 5.8.2-dev\n"
"Generated-By: Babel 2.16.0\n"

#: rero_ils/accounts_views.py:57
Expand Down Expand Up @@ -146,6 +145,7 @@ msgstr "localisation"

#: rero_ils/config.py:2235 rero_ils/config.py:2309 rero_ils/config.py:2393
#: rero_ils/config.py:2497 rero_ils/config.py:2553
#: rero_ils/modules/migrations/views.py:95
msgid "status"
msgstr "statut"

Expand Down Expand Up @@ -11573,6 +11573,26 @@ msgstr "pas de correspondance"
msgid "match"
msgstr "correspondance"

#: rero_ils/modules/migrations/data/views.py:109
msgid "migration"
msgstr "migration"

#: rero_ils/modules/migrations/data/views.py:110
msgid "batch"
msgstr "lot"

#: rero_ils/modules/migrations/data/views.py:112
msgid "conversion_status"
msgstr "statut conversion"

#: rero_ils/modules/migrations/data/views.py:115
msgid "deduplication_status"
msgstr "statut dédoublonnage"

#: rero_ils/modules/migrations/data/views.py:118
msgid "modified_by"
msgstr "modifié par"

#: rero_ils/modules/notifications/jsonschemas/notifications/notification-v0.0.1.json:4
#: rero_ils/modules/operation_logs/jsonschemas/operation_logs/operation_log-v0.0.1.json:108
#: rero_ils/modules/patron_transactions/jsonschemas/patron_transactions/patron_transaction-v0.0.1.json:134
Expand Down Expand Up @@ -13280,3 +13300,4 @@ msgstr "Assets Invenio"

#~ msgid "Checkouts are allowed or not."
#~ msgstr "Autorise ou non les prêts."

Loading

0 comments on commit 9c6b6d2

Please sign in to comment.