From 90c531a70f856c779131966ed7ee4d6db0d9c246 Mon Sep 17 00:00:00 2001 From: Sam Arbid Date: Fri, 25 Oct 2024 17:39:41 +0200 Subject: [PATCH] i18n: add translation for tasks.py --- invenio_github/tasks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/invenio_github/tasks.py b/invenio_github/tasks.py index 48aa4f3..36755e7 100644 --- a/invenio_github/tasks.py +++ b/invenio_github/tasks.py @@ -2,6 +2,7 @@ # # This file is part of Invenio. # Copyright (C) 2023 CERN. +# Copyright (C) 2024 KTH Royal Institute of Technology. # # Invenio is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,6 +29,7 @@ from celery import shared_task from flask import current_app, g from invenio_db import db +from invenio_i18n import gettext as _ from invenio_oauthclient.models import RemoteAccount from invenio_oauthclient.proxies import current_oauthclient @@ -82,7 +84,7 @@ def disconnect_github(access_token, repo_hooks): hook = ghrepo.hook(repo_hook) if hook and hook.delete(): current_app.logger.info( - "Deleted hook from github repository.", + _("Deleted hook from github repository."), extra={"hook": hook.id, "repo": ghrepo.full_name}, ) # If we finished our clean-up successfully, we can revoke the token