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

i18n: add missing translation #2886

Open
wants to merge 31 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9c117b6
i18n: add missing translation
Oct 19, 2024
7efc7dc
i18n: update admin dropdown menu
Oct 19, 2024
66bf4fa
i18n: mark str for administration views
Samk13 Oct 21, 2024
ff4794f
i18n: mark templates strings for translations
Samk13 Oct 21, 2024
cb33982
i18n: mark strings for translation and fix typos
Samk13 Oct 21, 2024
8577c68
i18n: mark js strings for translations
Samk13 Oct 21, 2024
35e1934
i18n: mark linksSearchItem missing strings
Samk13 Oct 21, 2024
30a8452
i18n: fix uploads descriptionStripped
Samk13 Oct 21, 2024
83e4149
i18n: fix theme and uploads
Samk13 Oct 21, 2024
0bcdc6f
i18n: add utils missing strings localization
Samk13 Oct 21, 2024
e2f4482
i18n: mark search docs for translation
Samk13 Oct 21, 2024
624ec01
i18n: mark files integrity report for translation
Samk13 Oct 21, 2024
93083e7
i18n: add statistics translations
Samk13 Oct 21, 2024
73795f4
i18n: add versioning translations
Samk13 Oct 21, 2024
a06a877
i18n: fix footer
Samk13 Oct 21, 2024
aa5bf15
i18n: fix header template
Samk13 Oct 21, 2024
a449c04
fix: fix nested translations
Samk13 Oct 21, 2024
46f190e
Revert "i18n: mark search docs for translation"
Samk13 Oct 23, 2024
ce297ac
Revert "i18n: add statistics translations"
Samk13 Oct 23, 2024
4f1e069
Revert "i18n: add versioning translations"
Samk13 Oct 23, 2024
3174f87
i18n: strip out unnecessary trans tags
Samk13 Oct 23, 2024
3e014ac
i18n: remove logger translations
Samk13 Oct 23, 2024
573ab69
i18n: remove trans tags
Samk13 Oct 23, 2024
31fc366
i18n: remove trans tags from site_footer
Samk13 Oct 23, 2024
a3e4a90
i18n: remove trans tags from site_footer
Samk13 Oct 23, 2024
d1c2d2b
admin: revert name change
Samk13 Oct 23, 2024
7675c31
Revert "notification: fix typo"
Samk13 Oct 23, 2024
70475e5
Revert convert indentations to spaces"
Samk13 Oct 23, 2024
5507a30
chore: add missing space
Samk13 Oct 23, 2024
36a75a4
i18n: mark missing translations
Samk13 Oct 23, 2024
8676cd7
i18n: mark missing translations
Samk13 Oct 25, 2024
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
12 changes: 6 additions & 6 deletions invenio_app_rdm/administration/records/records.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ class RecordAdminListView(AdminResourceListView):
"""Configuration for OAI-PMH sets list view."""

api_endpoint = "/records"
name = "records"
name = "Records"
resource_config = "records_resource"
search_request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
title = "Records"
category = "Records & files"
title = _("Records")
category = _("Records & files")
icon = "file"
template = "invenio_app_rdm/administration/records/records.html"
extension_name = "invenio-rdm-records"
Expand Down Expand Up @@ -100,11 +100,11 @@ class DraftAdminListView(AdminResourceListView):
"""Configuration for OAI-PMH sets list view."""

api_endpoint = "/user/records"
name = "Drafts"
name = "drafts"
resource_config = "records_resource"
search_request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
title = "Drafts"
category = "Records & files"
title = _("Drafts")
category = _("Records & files")
icon = "upload"
template = "invenio_app_rdm/administration/records/drafts.html"
extension_name = "invenio-rdm-records"
Expand Down
32 changes: 17 additions & 15 deletions invenio_app_rdm/administration/user_moderation/user_moderation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2023-2024 CERN.
# Copyright (C) 2024 KTH Royal Institute of Technology.
#
# Invenio App RDM is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -13,6 +14,7 @@
AdminResourceDetailView,
AdminResourceListView,
)
from invenio_i18n import lazy_gettext as _
from invenio_requests.customizations.user_moderation import UserModerationRequest
from invenio_search_ui.searchconfig import search_app_config

Expand All @@ -25,9 +27,9 @@ class UserModerationListView(AdminResourceListView):
name = "moderation"
resource_config = "requests_resource"
request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
title = "Moderation"
menu_label = "Moderation"
category = "Moderation"
title = _("Moderation")
menu_label = _("Moderation")
category = _("Moderation")
pid_path = "id"
icon = "users"
template = "invenio_app_rdm/administration/user_moderation.html"
Expand All @@ -41,43 +43,43 @@ class UserModerationListView(AdminResourceListView):
item_field_list = {
# custom display of the values - only declared to create columns
"expanded.topic.user": {
"text": "User",
"text": _("User"),
"order": 2,
"width": 4,
},
# custom display of the values - only declared to create columns
"expanded.topic.user.profile.email": {
"text": "Email",
"text": _("Email"),
"order": 3,
"width": 2,
},
# custom display of the values - only declared to create columns
"domain": {
"text": "Email domain",
"text": _("Email domain"),
"order": 4,
"width": 2,
},
# custom display of the values - only declared to create columns
"activity": {
"text": "Activity",
"text": _("Activity"),
"order": 5,
"width": 4,
},
"status": {
"text": "Status",
"text": _("Status"),
"order": 6,
"width": 2,
},
}

actions = {
"accept": {
"text": "Approve",
"text": _("Approve"),
"payload_schema": None,
"order": 1,
},
"decline": {
"text": "Block",
"text": _("Block"),
"payload_schema": None,
"order": 2,
},
Expand Down Expand Up @@ -137,7 +139,7 @@ class UserModerationRequestDetailView(AdminResourceDetailView):
api_endpoint = "/requests"
name = "user-moderation-details"
resource_config = "requests_resource"
title = "User moderation"
title = _("User moderation")

display_delete = False
display_edit = False
Expand All @@ -160,14 +162,14 @@ def get_service_schema(cls):

item_field_list = {
"id": {
"text": "ID",
"text": _("ID"),
"order": 1,
},
"topic.user": {
"text": "User",
"text": _("User"),
"order": 3,
}, # TODO we should resolve the user. But this is fetched from the API.
# TODO can we dereference somehow?
"created": {"text": "Created", "order": 2},
"is_open": {"text": "Open", "order": 4},
"created": {"text": _("Created"), "order": 2},
"is_open": {"text": _("Open"), "order": 4},
}
15 changes: 8 additions & 7 deletions invenio_app_rdm/administration/users/users.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2023-2024 CERN.
# Copyright (C) 2024 KTH Royal Institute of Technology.
#
# Invenio App RDM is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -53,9 +54,9 @@ class UsersListView(AdminResourceListView):
extension_name = "invenio-users-resources"
name = "users"
resource_config = "users_resource"
title = "User management"
menu_label = "Users"
category = "User management"
title = _("User management")
menu_label = _("Users")
category = _("User management")
pid_path = "id"
icon = "users"

Expand All @@ -75,22 +76,22 @@ class UsersListView(AdminResourceListView):
# TODO: missing permission based links in resource
actions = {
"approve": {
"text": "Approve",
"text": _("Approve"),
"payload_schema": None,
"order": 1,
},
"restore": {
"text": "Restore",
"text": _("Restore"),
"payload_schema": None,
"order": 2,
},
"block": {
"text": "Block",
"text": _("Block"),
"payload_schema": None,
"order": 2,
},
"Deactivate": {
"text": "Suspend",
"text": _("Suspend"),
"payload_schema": None,
"order": 2,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Copyright (C) 2021-2023 TU Wien.
Copyright (C) 2021 Graz University of Technology.
Copyright (C) 2021 New York University.
Copyright (C) 2024 KTH Royal Institute of Technology.

Invenio RDM Records is free software; you can redistribute it and/or modify
it under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -77,7 +78,7 @@
<p class="ml-2 mb-0 display-inline-block"><i class="green check circle outline icon"></i></p>
{% endif %}
{% if community.parent %}
<div class="sub header">Part of
<div class="sub header">{{ _('Part of') }}
<a
href="{{ url_for('invenio_app_rdm_communities.communities_home', pid_value=community.parent.slug) }}">
{{community.parent.metadata.title}}
Expand Down Expand Up @@ -108,7 +109,7 @@
<div class="ui container">
<div class="header">
<i class="eye icon"></i>
<strong>{{ _ ("Preview") }}</strong>
<strong>{{ _("Preview") }}</strong>
</div>
<p>
{% if not is_draft %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{# Copyright (C) 2023 CERN. Invenio RDM Records is free software; you can redistribute
it and/or modify it under the terms of the MIT License; see LICENSE file for more
details. #}
{#
Copyright (C) 2023 CERN.
Copyright (C) 2024 KTH Royal Institute of Technology.
Invenio RDM Records is free software; you can redistribute it and/or modify
it under the terms of the MIT License; see LICENSE file for more details.
-#}

{% from "invenio_accounts/_macros.html" import render_field, form_errors %}

Expand All @@ -10,8 +13,8 @@
{% set full_name = None %}
<p class="rel-mb-2">
<i aria-hidden="true" class="user secret icon"></i>
<strong>You are currently not logged in</strong>. Do you have an account?
<a href="/login/">Log in here</a>
<strong>{{ _("You are currently not logged in") }}</strong>. {{ _("Do you have an account?") }}
<a href="/login/">{{ _("Log in here") }}</a>
</p>
{% else %}
{% set email = current_user.email %}
Expand All @@ -24,8 +27,8 @@ <h4>{{ _("You are logged in as") }}</h4>
</div>

<p class="mt-0 mb-10">
Not you?
<a href="{{ url_for('security.login') }}">Log out</a> to switch account.
{{ _("Not you?") }}
<a href="{{ url_for('security.login') }}">{{ _("Log out") }}</a> {{ _("to switch account.") }}
</p>
</div>
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{#
Copyright (C) 2020 CERN.
Copyright (C) 2020 Northwestern University.
Copyright (C) 2024 KTH Royal Institute of Technology.

Invenio RDM Records is free software; you can redistribute it and/or modify
it under the terms of the MIT License; see LICENSE file for more details.
#}

<dd>
<a href="/coming-soon" class="ui button"><i class="envelope icon"></i> Send message</a>
<a href="/coming-soon" class="ui button"><i class="envelope icon"></i> {{ _("Send message") }}</a>
</dd>
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
Copyright (C) 2020 Northwestern University.
Copyright (C) 2021 Graz University of Technology.
Copyright (C) 2021 New York University.
Copyright (C) 2024 KTH Royal Institute of Technology.

Invenio RDM Records is free software; you can redistribute it and/or modify
it under the terms of the MIT License; see LICENSE file for more details.
#}

{% macro license_link(license) %}
{% if license.link %}
<a class="license-link" href="{{ license.link }}" target="_blank" title="{{ _('Opens in new tab') }}">Read more</a>
<a class="license-link" href="{{ license.link }}" target="_blank" title="{{ _('Opens in new tab') }}">{{ _('Read more') }}</a>
{% elif license.props and license.props.url %}
<a class="license-link" href="{{ license.props.url }}" target="_blank" title="{{ _('Opens in new tab') }}">Read more</a>
<a class="license-link" href="{{ license.props.url }}" target="_blank" title="{{ _('Opens in new tab') }}">{{ _('Read more') }}</a>
{% endif %}
{% endmacro %}


{% set rights = record.ui.get('rights') %}
{% if rights %}
<div class="sidebar-container">
Expand Down Expand Up @@ -55,9 +55,9 @@ <h2 class="ui medium top attached header mt-0">{{ _('Rights') }}</h2>

<div id="license-description-{{loop.index}}" class="description">
<span class="text-muted">
{{ license.description_l10n or _('No further description.')}}
{{ license.description_l10n or _('No further description.') }}
</span>
{{ license_link(license)}}
{{ license_link(license) }}
</div>
</div>
</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{#
Copyright (C) 2020 CERN.
Copyright (C) 2024 KTH Royal Institute of Technology.

Invenio RDM Records is free software; you can redistribute it and/or modify
it under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -9,8 +10,8 @@
<div class="ui padded grid">
<div class="two column row version-first">
<div class="ten wide column left aligned">
<a href="">Version {{ version }}</a>
{% set doi = doi if doi else "No DOI available" %}
<a href="">{{ _("Version") }} {{ version }}</a>
{% set doi = doi if doi else _("No DOI available") %}
<p class="text-muted font-small">{{ doi }}</p>
</div>
<div class="six wide column right aligned">
Expand Down
4 changes: 2 additions & 2 deletions invenio_app_rdm/records_ui/views/deposits.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Copyright (C) 2019-2024 CERN.
# Copyright (C) 2019-2021 Northwestern University.
# Copyright (C) 2021 TU Wien.
# Copyright (C) 2022 KTH Royal Institute of Technology
# Copyright (C) 2022-2024 KTH Royal Institute of Technology
# Copyright (C) 2023 Graz University of Technology.
#
# Invenio App RDM is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -188,7 +188,7 @@ def subjects(self):
.options(load_only("id"))
.all()
)
limit_to = [{"text": "All", "value": "all"}]
limit_to = [{"text": _("All"), "value": "all"}]
# id is human readable and shorter, so we use it
limit_to += [{"text": s.id, "value": s.id} for s in subjects]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* // This file is part of Invenio-App-Rdm
* // Copyright (C) 2023 CERN.
* // Copyright (C) 2024 KTH Royal Institute of Technology.
* //
* // Invenio-App-Rdm is free software; you can redistribute it and/or modify it
* // under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -72,7 +73,7 @@ export class ImpersonateUser extends Component {
labelPosition="left"
>
<Icon name="spy" />
Impersonate
{i18next.t("Impersonate")}
</Dropdown.Item>
<ActionModal modalOpen={modalOpen} user={user}>
{modalHeader && <Modal.Header>{modalHeader}</Modal.Header>}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* // This file is part of Invenio-App-Rdm
* // Copyright (C) 2023 CERN.
* // Copyright (C) 2024 KTH Royal Institute of Technology.
* //
* // Invenio-App-Rdm is free software; you can redistribute it and/or modify it
* // under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -176,7 +177,7 @@ export class ImpersonateUserForm extends Component {
</Modal.Content>
<Modal.Actions>
<Button onClick={this.handleModalClose} floated="left">
Close
{i18next.t("Close")}
</Button>
<Button
size="small"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* // This file is part of Invenio-App-Rdm
* // Copyright (C) 2023 CERN.
* // Copyright (C) 2024 KTH Royal Institute of Technology.
* //
* // Invenio-App-Rdm is free software; you can redistribute it and/or modify it
* // under the terms of the MIT License; see LICENSE file for more details.
Expand Down Expand Up @@ -81,7 +82,7 @@ export class RestoreConfirmation extends Component {
</Modal.Content>
<Modal.Actions>
<Button onClick={this.handleModalClose} floated="left">
Close
{i18next.t("Close")}
</Button>
<Button
size="small"
Expand Down
Loading