Skip to content

Commit

Permalink
github: added translations
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandromumo committed Jul 6, 2023
1 parent b22fa2e commit abb80f7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions invenio_rdm_records/services/github/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import yaml
from flask import current_app
from invenio_github.errors import CustomGitHubMetadataError
from invenio_i18n import _
from marshmallow import Schema, ValidationError
from mistune import markdown
from nameparser import HumanName
Expand Down Expand Up @@ -55,7 +56,7 @@ def description(self):
return markdown(self.rdm_release.release_payload["body"])
elif self.rdm_release.repository_payload.get("description"):
return self.rdm_release.repository_payload["description"]
return "No description provided."
return _("No description provided.")

@property
def default_metadata(self):
Expand Down Expand Up @@ -158,9 +159,9 @@ def load_citation_metadata(self, citation_data):

citation_schema = current_app.config.get("GITHUB_CITATION_METADATA_SCHEMA")

assert isinstance(
citation_schema, Schema
), "Citation schema is needed to load citation metadata."
assert isinstance(citation_schema, Schema), _(
"Citation schema is needed to load citation metadata."
)

data = citation_schema().load(citation_data)

Expand Down

0 comments on commit abb80f7

Please sign in to comment.