invenio-app-rdm 13.0.0b3.dev0__py2.py3-none-any.whl → 13.0.0b3.dev1__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. invenio_app_rdm/__init__.py +1 -1
  2. invenio_app_rdm/administration/records/records.py +4 -4
  3. invenio_app_rdm/administration/user_moderation/user_moderation.py +17 -15
  4. invenio_app_rdm/administration/users/users.py +8 -7
  5. invenio_app_rdm/config.py +3 -1
  6. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/detail.html +3 -2
  7. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/access-form.html +10 -7
  8. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/contact.html +2 -1
  9. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/details/side_bar/licenses.html +5 -5
  10. invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/version.html +3 -2
  11. invenio_app_rdm/records_ui/views/deposits.py +14 -12
  12. invenio_app_rdm/requests_ui/views/requests.py +23 -16
  13. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUser.js +2 -1
  14. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/components/ImpersonateUserForm.js +2 -1
  15. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/RestoreConfirmation.js +2 -1
  16. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/records/TombstoneForm.js +4 -3
  17. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/administration/userModeration/search/SearchResultItemLayout.js +2 -1
  18. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/components/RecordsResultsListItem.js +6 -5
  19. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/deposit/RDMDepositForm.js +12 -7
  20. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/AccessRequestForm.js +14 -5
  21. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/RecordCommunitiesList.js +2 -2
  22. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/landing_page/ShareOptions/AccessLinks/LinksSearchItem.js +5 -4
  23. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/theme.js +7 -0
  24. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/user_dashboard/uploads.js +6 -1
  25. invenio_app_rdm/theme/assets/semantic-ui/js/invenio_app_rdm/utils.js +8 -7
  26. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/files_integrity_report/email/files_integrity_report.html +11 -10
  27. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/footer.html +13 -32
  28. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/header.html +3 -2
  29. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/intro_section.html +13 -15
  30. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/macros/records_list.html +2 -1
  31. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/settings/notifications.html +0 -1
  32. invenio_app_rdm/theme/templates/semantic-ui/invenio_app_rdm/site_footer.html +11 -4
  33. invenio_app_rdm/theme/templates/themes/default/invenio_app_rdm/site_footer.html +12 -19
  34. {invenio_app_rdm-13.0.0b3.dev0.dist-info → invenio_app_rdm-13.0.0b3.dev1.dist-info}/METADATA +6 -2
  35. {invenio_app_rdm-13.0.0b3.dev0.dist-info → invenio_app_rdm-13.0.0b3.dev1.dist-info}/RECORD +39 -99
  36. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/af/messages.po +0 -272
  37. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/af/translations.json +0 -263
  38. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de_AT/messages.po +0 -272
  39. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/de_DE/messages.po +0 -272
  40. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/en_AT/messages.po +0 -272
  41. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/en_HU/messages.po +0 -272
  42. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es_CU/messages.po +0 -272
  43. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/es_MX/messages.po +0 -272
  44. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et_EE/messages.po +0 -272
  45. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/et_EE/translations.json +0 -255
  46. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fa_IR/messages.po +0 -272
  47. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr_CI/messages.po +0 -272
  48. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/fr_FR/messages.po +0 -272
  49. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/gl/messages.po +0 -272
  50. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/gl/translations.json +0 -263
  51. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hi_IN/messages.po +0 -272
  52. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/hu_HU/messages.po +0 -272
  53. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/index.js +0 -69
  54. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/ne/messages.po +0 -272
  55. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/rw/messages.po +0 -272
  56. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/rw/translations.json +0 -255
  57. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/sv_SE/messages.po +0 -272
  58. invenio_app_rdm/theme/assets/semantic-ui/translations/invenio_app_rdm/messages/uk_UA/messages.po +0 -272
  59. invenio_app_rdm/translations/.gitkeep +0 -0
  60. invenio_app_rdm/translations/af/LC_MESSAGES/messages.mo +0 -0
  61. invenio_app_rdm/translations/af/LC_MESSAGES/messages.po +0 -728
  62. invenio_app_rdm/translations/de_AT/LC_MESSAGES/messages.mo +0 -0
  63. invenio_app_rdm/translations/de_AT/LC_MESSAGES/messages.po +0 -728
  64. invenio_app_rdm/translations/de_DE/LC_MESSAGES/messages.mo +0 -0
  65. invenio_app_rdm/translations/de_DE/LC_MESSAGES/messages.po +0 -728
  66. invenio_app_rdm/translations/en_AT/LC_MESSAGES/messages.mo +0 -0
  67. invenio_app_rdm/translations/en_AT/LC_MESSAGES/messages.po +0 -728
  68. invenio_app_rdm/translations/en_HU/LC_MESSAGES/messages.mo +0 -0
  69. invenio_app_rdm/translations/en_HU/LC_MESSAGES/messages.po +0 -728
  70. invenio_app_rdm/translations/es_CU/LC_MESSAGES/messages.mo +0 -0
  71. invenio_app_rdm/translations/es_CU/LC_MESSAGES/messages.po +0 -728
  72. invenio_app_rdm/translations/es_MX/LC_MESSAGES/messages.mo +0 -0
  73. invenio_app_rdm/translations/es_MX/LC_MESSAGES/messages.po +0 -728
  74. invenio_app_rdm/translations/et_EE/LC_MESSAGES/messages.mo +0 -0
  75. invenio_app_rdm/translations/et_EE/LC_MESSAGES/messages.po +0 -728
  76. invenio_app_rdm/translations/fa_IR/LC_MESSAGES/messages.mo +0 -0
  77. invenio_app_rdm/translations/fa_IR/LC_MESSAGES/messages.po +0 -728
  78. invenio_app_rdm/translations/fr_CI/LC_MESSAGES/messages.mo +0 -0
  79. invenio_app_rdm/translations/fr_CI/LC_MESSAGES/messages.po +0 -728
  80. invenio_app_rdm/translations/fr_FR/LC_MESSAGES/messages.mo +0 -0
  81. invenio_app_rdm/translations/fr_FR/LC_MESSAGES/messages.po +0 -728
  82. invenio_app_rdm/translations/gl/LC_MESSAGES/messages.mo +0 -0
  83. invenio_app_rdm/translations/gl/LC_MESSAGES/messages.po +0 -728
  84. invenio_app_rdm/translations/hi_IN/LC_MESSAGES/messages.mo +0 -0
  85. invenio_app_rdm/translations/hi_IN/LC_MESSAGES/messages.po +0 -728
  86. invenio_app_rdm/translations/hu_HU/LC_MESSAGES/messages.mo +0 -0
  87. invenio_app_rdm/translations/hu_HU/LC_MESSAGES/messages.po +0 -728
  88. invenio_app_rdm/translations/ne/LC_MESSAGES/messages.mo +0 -0
  89. invenio_app_rdm/translations/ne/LC_MESSAGES/messages.po +0 -728
  90. invenio_app_rdm/translations/rw/LC_MESSAGES/messages.mo +0 -0
  91. invenio_app_rdm/translations/rw/LC_MESSAGES/messages.po +0 -728
  92. invenio_app_rdm/translations/sv_SE/LC_MESSAGES/messages.mo +0 -0
  93. invenio_app_rdm/translations/sv_SE/LC_MESSAGES/messages.po +0 -728
  94. invenio_app_rdm/translations/uk_UA/LC_MESSAGES/messages.mo +0 -0
  95. invenio_app_rdm/translations/uk_UA/LC_MESSAGES/messages.po +0 -728
  96. {invenio_app_rdm-13.0.0b3.dev0.dist-info → invenio_app_rdm-13.0.0b3.dev1.dist-info}/WHEEL +0 -0
  97. {invenio_app_rdm-13.0.0b3.dev0.dist-info → invenio_app_rdm-13.0.0b3.dev1.dist-info}/entry_points.txt +0 -0
  98. {invenio_app_rdm-13.0.0b3.dev0.dist-info → invenio_app_rdm-13.0.0b3.dev1.dist-info}/licenses/LICENSE +0 -0
  99. {invenio_app_rdm-13.0.0b3.dev0.dist-info → invenio_app_rdm-13.0.0b3.dev1.dist-info}/top_level.txt +0 -0
@@ -17,6 +17,6 @@
17
17
  #
18
18
  # See PEP 0440 for details - https://www.python.org/dev/peps/pep-0440
19
19
 
20
- __version__ = "13.0.0b3.dev0"
20
+ __version__ = "13.0.0b3.dev1"
21
21
 
22
22
  __all__ = ("__version__",)
@@ -25,9 +25,9 @@ class RecordAdminListView(AdminResourceListView):
25
25
  name = "records"
26
26
  resource_config = "records_resource"
27
27
  search_request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
28
- title = "Records"
28
+ title = _("Records")
29
29
  menu_label = _("Records")
30
- category = "Records & files"
30
+ category = _("Records & files")
31
31
  icon = "file"
32
32
  template = "invenio_app_rdm/administration/records/records.html"
33
33
  extension_name = "invenio-rdm-records"
@@ -109,9 +109,9 @@ class DraftAdminListView(AdminResourceListView):
109
109
  name = "drafts"
110
110
  resource_config = "records_resource"
111
111
  search_request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
112
- title = "Drafts"
112
+ title = _("Drafts")
113
113
  menu_label = _("Drafts")
114
- category = "Records & files"
114
+ category = _("Records & files")
115
115
  icon = "upload"
116
116
  template = "invenio_app_rdm/administration/records/drafts.html"
117
117
  extension_name = "invenio-rdm-records"
@@ -1,6 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # Copyright (C) 2023-2024 CERN.
4
+ # Copyright (C) 2024 KTH Royal Institute of Technology.
4
5
  #
5
6
  # Invenio App RDM is free software; you can redistribute it and/or modify it
6
7
  # under the terms of the MIT License; see LICENSE file for more details.
@@ -13,6 +14,7 @@ from invenio_administration.views.base import (
13
14
  AdminResourceDetailView,
14
15
  AdminResourceListView,
15
16
  )
17
+ from invenio_i18n import lazy_gettext as _
16
18
  from invenio_requests.customizations.user_moderation import UserModerationRequest
17
19
  from invenio_search_ui.searchconfig import search_app_config
18
20
 
@@ -25,9 +27,9 @@ class UserModerationListView(AdminResourceListView):
25
27
  name = "moderation"
26
28
  resource_config = "requests_resource"
27
29
  request_headers = {"Accept": "application/vnd.inveniordm.v1+json"}
28
- title = "Moderation"
29
- menu_label = "Moderation"
30
- category = "Moderation"
30
+ title = _("Moderation")
31
+ menu_label = _("Moderation")
32
+ category = _("Moderation")
31
33
  pid_path = "id"
32
34
  icon = "users"
33
35
  template = "invenio_app_rdm/administration/user_moderation.html"
@@ -41,30 +43,30 @@ class UserModerationListView(AdminResourceListView):
41
43
  item_field_list = {
42
44
  # custom display of the values - only declared to create columns
43
45
  "expanded.topic.user": {
44
- "text": "User",
46
+ "text": _("User"),
45
47
  "order": 2,
46
48
  "width": 4,
47
49
  },
48
50
  # custom display of the values - only declared to create columns
49
51
  "expanded.topic.user.profile.email": {
50
- "text": "Email",
52
+ "text": _("Email"),
51
53
  "order": 3,
52
54
  "width": 2,
53
55
  },
54
56
  # custom display of the values - only declared to create columns
55
57
  "domain": {
56
- "text": "Email domain",
58
+ "text": _("Email domain"),
57
59
  "order": 4,
58
60
  "width": 2,
59
61
  },
60
62
  # custom display of the values - only declared to create columns
61
63
  "activity": {
62
- "text": "Activity",
64
+ "text": _("Activity"),
63
65
  "order": 5,
64
66
  "width": 4,
65
67
  },
66
68
  "status": {
67
- "text": "Status",
69
+ "text": _("Status"),
68
70
  "order": 6,
69
71
  "width": 2,
70
72
  },
@@ -72,12 +74,12 @@ class UserModerationListView(AdminResourceListView):
72
74
 
73
75
  actions = {
74
76
  "accept": {
75
- "text": "Approve",
77
+ "text": _("Approve"),
76
78
  "payload_schema": None,
77
79
  "order": 1,
78
80
  },
79
81
  "decline": {
80
- "text": "Block",
82
+ "text": _("Block"),
81
83
  "payload_schema": None,
82
84
  "order": 2,
83
85
  },
@@ -137,7 +139,7 @@ class UserModerationRequestDetailView(AdminResourceDetailView):
137
139
  api_endpoint = "/requests"
138
140
  name = "user-moderation-details"
139
141
  resource_config = "requests_resource"
140
- title = "User moderation"
142
+ title = _("User moderation")
141
143
 
142
144
  display_delete = False
143
145
  display_edit = False
@@ -160,14 +162,14 @@ class UserModerationRequestDetailView(AdminResourceDetailView):
160
162
 
161
163
  item_field_list = {
162
164
  "id": {
163
- "text": "ID",
165
+ "text": _("ID"),
164
166
  "order": 1,
165
167
  },
166
168
  "topic.user": {
167
- "text": "User",
169
+ "text": _("User"),
168
170
  "order": 3,
169
171
  }, # TODO we should resolve the user. But this is fetched from the API.
170
172
  # TODO can we dereference somehow?
171
- "created": {"text": "Created", "order": 2},
172
- "is_open": {"text": "Open", "order": 4},
173
+ "created": {"text": _("Created"), "order": 2},
174
+ "is_open": {"text": _("Open"), "order": 4},
173
175
  }
@@ -1,6 +1,7 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  #
3
3
  # Copyright (C) 2023-2024 CERN.
4
+ # Copyright (C) 2024 KTH Royal Institute of Technology.
4
5
  #
5
6
  # Invenio App RDM is free software; you can redistribute it and/or modify it
6
7
  # under the terms of the MIT License; see LICENSE file for more details.
@@ -53,9 +54,9 @@ class UsersListView(AdminResourceListView):
53
54
  extension_name = "invenio-users-resources"
54
55
  name = "users"
55
56
  resource_config = "users_resource"
56
- title = "User management"
57
- menu_label = "Users"
58
- category = "User management"
57
+ title = _("User management")
58
+ menu_label = _("Users")
59
+ category = _("User management")
59
60
  pid_path = "id"
60
61
  icon = "users"
61
62
 
@@ -75,22 +76,22 @@ class UsersListView(AdminResourceListView):
75
76
  # TODO: missing permission based links in resource
76
77
  actions = {
77
78
  "approve": {
78
- "text": "Approve",
79
+ "text": _("Approve"),
79
80
  "payload_schema": None,
80
81
  "order": 1,
81
82
  },
82
83
  "restore": {
83
- "text": "Restore",
84
+ "text": _("Restore"),
84
85
  "payload_schema": None,
85
86
  "order": 2,
86
87
  },
87
88
  "block": {
88
- "text": "Block",
89
+ "text": _("Block"),
89
90
  "payload_schema": None,
90
91
  "order": 2,
91
92
  },
92
93
  "Deactivate": {
93
- "text": "Suspend",
94
+ "text": _("Suspend"),
94
95
  "payload_schema": None,
95
96
  "order": 2,
96
97
  },
invenio_app_rdm/config.py CHANGED
@@ -1115,7 +1115,6 @@ IIIF_FORMATS_PIL_MAP = {
1115
1115
  "jp2": "jpeg2000",
1116
1116
  "jpeg": "jpeg",
1117
1117
  "jpg": "jpeg",
1118
- "pdf": "pdf",
1119
1118
  "png": "png",
1120
1119
  "tif": "tiff",
1121
1120
  "tiff": "tiff",
@@ -1142,6 +1141,9 @@ PREVIEWER_PREFERENCE = [
1142
1141
  ]
1143
1142
  """Preferred previewers."""
1144
1143
 
1144
+ RECORDS_RESOURCES_IMAGE_FORMATS = ["." + ext for ext in IIIF_FORMATS.keys()]
1145
+ """RECORDS_RESOURCES_IMAGE_FORMATS must contain all possible IIIF formats to ensure their metadata is extracted."""
1146
+
1145
1147
  # Invenio-Pages
1146
1148
  # =============
1147
1149
  # See https://invenio-pages.readthedocs.io/en/latest/configuration.html
@@ -4,6 +4,7 @@
4
4
  Copyright (C) 2021-2023 TU Wien.
5
5
  Copyright (C) 2021 Graz University of Technology.
6
6
  Copyright (C) 2021 New York University.
7
+ Copyright (C) 2024 KTH Royal Institute of Technology.
7
8
 
8
9
  Invenio RDM Records is free software; you can redistribute it and/or modify
9
10
  it under the terms of the MIT License; see LICENSE file for more details.
@@ -77,7 +78,7 @@
77
78
  <p class="ml-2 mb-0 display-inline-block"><i class="green check circle outline icon"></i></p>
78
79
  {% endif %}
79
80
  {% if community.parent %}
80
- <div class="sub header">Part of
81
+ <div class="sub header">{{ _('Part of') }}
81
82
  <a
82
83
  href="{{ url_for('invenio_app_rdm_communities.communities_home', pid_value=community.parent.slug) }}">
83
84
  {{community.parent.metadata.title}}
@@ -108,7 +109,7 @@
108
109
  <div class="ui container">
109
110
  <div class="header">
110
111
  <i class="eye icon"></i>
111
- <strong>{{ _ ("Preview") }}</strong>
112
+ <strong>{{ _("Preview") }}</strong>
112
113
  </div>
113
114
  <p>
114
115
  {% if not is_draft %}
@@ -1,6 +1,9 @@
1
- {# Copyright (C) 2023 CERN. Invenio RDM Records is free software; you can redistribute
2
- it and/or modify it under the terms of the MIT License; see LICENSE file for more
3
- details. #}
1
+ {#
2
+ Copyright (C) 2023 CERN.
3
+ Copyright (C) 2024 KTH Royal Institute of Technology.
4
+ Invenio RDM Records is free software; you can redistribute it and/or modify
5
+ it under the terms of the MIT License; see LICENSE file for more details.
6
+ -#}
4
7
 
5
8
  {% from "invenio_accounts/_macros.html" import render_field, form_errors %}
6
9
 
@@ -10,8 +13,8 @@ details. #}
10
13
  {% set full_name = None %}
11
14
  <p class="rel-mb-2">
12
15
  <i aria-hidden="true" class="user secret icon"></i>
13
- <strong>You are currently not logged in</strong>. Do you have an account?
14
- <a href="/login/">Log in here</a>
16
+ <strong>{{ _("You are currently not logged in") }}</strong>. {{ _("Do you have an account?") }}
17
+ <a href="/login/">{{ _("Log in here") }}</a>
15
18
  </p>
16
19
  {% else %}
17
20
  {% set email = current_user.email %}
@@ -24,8 +27,8 @@ details. #}
24
27
  </div>
25
28
 
26
29
  <p class="mt-0 mb-10">
27
- Not you?
28
- <a href="{{ url_for('security.login') }}">Log out</a> to switch account.
30
+ {{ _("Not you?") }}
31
+ <a href="{{ url_for('security.login') }}">{{ _("Log out") }}</a> {{ _("to switch account.") }}
29
32
  </p>
30
33
  </div>
31
34
  {% endif %}
@@ -1,11 +1,12 @@
1
1
  {#
2
2
  Copyright (C) 2020 CERN.
3
3
  Copyright (C) 2020 Northwestern University.
4
+ Copyright (C) 2024 KTH Royal Institute of Technology.
4
5
 
5
6
  Invenio RDM Records is free software; you can redistribute it and/or modify
6
7
  it under the terms of the MIT License; see LICENSE file for more details.
7
8
  #}
8
9
 
9
10
  <dd>
10
- <a href="/coming-soon" class="ui button"><i class="envelope icon"></i> Send message</a>
11
+ <a href="/coming-soon" class="ui button"><i class="envelope icon"></i> {{ _("Send message") }}</a>
11
12
  </dd>
@@ -3,6 +3,7 @@
3
3
  Copyright (C) 2020 Northwestern University.
4
4
  Copyright (C) 2021 Graz University of Technology.
5
5
  Copyright (C) 2021 New York University.
6
+ Copyright (C) 2024 KTH Royal Institute of Technology.
6
7
 
7
8
  Invenio RDM Records is free software; you can redistribute it and/or modify
8
9
  it under the terms of the MIT License; see LICENSE file for more details.
@@ -10,13 +11,12 @@
10
11
 
11
12
  {% macro license_link(license) %}
12
13
  {% if license.link %}
13
- <a class="license-link" href="{{ license.link }}" target="_blank" title="{{ _('Opens in new tab') }}">Read more</a>
14
+ <a class="license-link" href="{{ license.link }}" target="_blank" title="{{ _('Opens in new tab') }}">{{ _('Read more') }}</a>
14
15
  {% elif license.props and license.props.url %}
15
- <a class="license-link" href="{{ license.props.url }}" target="_blank" title="{{ _('Opens in new tab') }}">Read more</a>
16
+ <a class="license-link" href="{{ license.props.url }}" target="_blank" title="{{ _('Opens in new tab') }}">{{ _('Read more') }}</a>
16
17
  {% endif %}
17
18
  {% endmacro %}
18
19
 
19
-
20
20
  {% set rights = record.ui.get('rights') %}
21
21
  {% if rights %}
22
22
  <div class="sidebar-container">
@@ -55,9 +55,9 @@
55
55
 
56
56
  <div id="license-description-{{loop.index}}" class="description">
57
57
  <span class="text-muted">
58
- {{ license.description_l10n or _('No further description.')}}
58
+ {{ license.description_l10n or _('No further description.') }}
59
59
  </span>
60
- {{ license_link(license)}}
60
+ {{ license_link(license) }}
61
61
  </div>
62
62
  </div>
63
63
  </li>
@@ -1,5 +1,6 @@
1
1
  {#
2
2
  Copyright (C) 2020 CERN.
3
+ Copyright (C) 2024 KTH Royal Institute of Technology.
3
4
 
4
5
  Invenio RDM Records is free software; you can redistribute it and/or modify
5
6
  it under the terms of the MIT License; see LICENSE file for more details.
@@ -9,8 +10,8 @@
9
10
  <div class="ui padded grid">
10
11
  <div class="two column row version-first">
11
12
  <div class="ten wide column left aligned">
12
- <a href="">Version {{ version }}</a>
13
- {% set doi = doi if doi else "No DOI available" %}
13
+ <a href="">{{ _("Version") }} {{ version }}</a>
14
+ {% set doi = doi if doi else _("No DOI available") %}
14
15
  <p class="text-muted font-small">{{ doi }}</p>
15
16
  </div>
16
17
  <div class="six wide column right aligned">
@@ -3,7 +3,7 @@
3
3
  # Copyright (C) 2019-2024 CERN.
4
4
  # Copyright (C) 2019-2021 Northwestern University.
5
5
  # Copyright (C) 2021 TU Wien.
6
- # Copyright (C) 2022 KTH Royal Institute of Technology
6
+ # Copyright (C) 2022-2024 KTH Royal Institute of Technology
7
7
  # Copyright (C) 2023-2024 Graz University of Technology.
8
8
  #
9
9
  # Invenio App RDM is free software; you can redistribute it and/or modify it
@@ -103,21 +103,23 @@ def get_form_pids_config(record=None):
103
103
  "pid_placeholder": "Copy/paste your existing DOI here...",
104
104
  "can_be_managed": can_be_managed,
105
105
  "can_be_unmanaged": can_be_unmanaged,
106
- "btn_label_discard_pid": _("Discard the reserved {scheme_label}.").format(
107
- scheme_label=scheme_label
106
+ "btn_label_discard_pid": _(
107
+ "Discard the reserved %(scheme_label)s.", scheme_label=scheme_label
108
108
  ),
109
- "btn_label_get_pid": _("Get a {scheme_label} now!").format(
110
- scheme_label=scheme_label
109
+ "btn_label_get_pid": _(
110
+ "Get a %(scheme_label)s now!", scheme_label=scheme_label
111
111
  ),
112
112
  "managed_help_text": _(
113
- "Reserve a {scheme_label} by pressing the button "
113
+ "Reserve a %(scheme_label)s by pressing the button "
114
114
  "(so it can be included in files prior to upload). "
115
- "The {scheme_label} is registered when your upload is published."
116
- ).format(scheme_label=scheme_label),
115
+ "The %(scheme_label)s is registered when your upload is published.",
116
+ scheme_label=scheme_label,
117
+ ),
117
118
  "unmanaged_help_text": _(
118
- "A {scheme_label} allows your upload to be easily and "
119
- "unambiguously cited. Example: 10.1234/foo.bar"
120
- ).format(scheme_label=scheme_label),
119
+ "A %(scheme_label)s allows your upload to be easily and "
120
+ "unambiguously cited. Example: 10.1234/foo.bar",
121
+ scheme_label=scheme_label,
122
+ ),
121
123
  "default_selected": default_selected,
122
124
  "optional_doi_transitions": optional_doi_transitions,
123
125
  }
@@ -226,7 +228,7 @@ class VocabulariesOptions:
226
228
  .options(load_only(VocabularyScheme.id))
227
229
  .all()
228
230
  )
229
- limit_to = [{"text": "All", "value": "all"}]
231
+ limit_to = [{"text": _("All"), "value": "all"}]
230
232
  # id is human readable and shorter, so we use it
231
233
  limit_to += [{"text": s.id, "value": s.id} for s in subjects]
232
234
 
@@ -53,9 +53,10 @@ def _resolve_topic_record(request):
53
53
  user_owns_request = str(creator_id) == str(current_user.id)
54
54
 
55
55
  if request["is_closed"] and not user_owns_request:
56
- return dict(permissions={}, record_ui=None, record=None)
56
+ return dict(permissions={}, record_ui=None, record=None, record_uuid=None)
57
57
 
58
58
  record = None
59
+ record_uuid = None
59
60
  # parse the topic field to get the draft/record pid `record:abcd-efgh`
60
61
  entity = ResolverRegistry.resolve_entity_proxy(request["topic"])
61
62
  pid = entity._parse_ref_dict_id()
@@ -84,11 +85,15 @@ def _resolve_topic_record(request):
84
85
  break
85
86
  # read published record
86
87
  record = current_rdm_records_service.read(g.identity, pid, expand=True)
88
+ record_uuid = current_rdm_records_service.record_cls.pid.resolve(pid).id
87
89
  else:
88
90
  # read draft
89
91
  record = current_rdm_records_service.read_draft(
90
92
  g.identity, pid, expand=True
91
93
  )
94
+ record_uuid = current_rdm_records_service.draft_cls.pid.resolve(
95
+ pid, registered_only=False
96
+ ).id
92
97
  except (NoResultFound, PIDDoesNotExistError):
93
98
  # We catch PIDDoesNotExistError because a published record with
94
99
  # a soft-deleted draft will raise this error. The lines below
@@ -98,6 +103,7 @@ def _resolve_topic_record(request):
98
103
  try:
99
104
  # read published record
100
105
  record = current_rdm_records_service.read(g.identity, pid, expand=True)
106
+ record_uuid = current_rdm_records_service.record_cls.pid.resolve(pid).id
101
107
  except NoResultFound:
102
108
  # record tab not displayed when the record is not found
103
109
  # the request is probably not open anymore
@@ -116,9 +122,14 @@ def _resolve_topic_record(request):
116
122
  "read",
117
123
  ]
118
124
  )
119
- return dict(permissions=permissions, record_ui=record_ui, record=record)
125
+ return dict(
126
+ permissions=permissions,
127
+ record_ui=record_ui,
128
+ record=record,
129
+ record_uuid=record_uuid,
130
+ )
120
131
 
121
- return dict(permissions={}, record_ui=None, record=None)
132
+ return dict(permissions={}, record_ui=None, record=None, record_uuid=None)
122
133
 
123
134
 
124
135
  def _resolve_record_or_draft_files(record, request):
@@ -163,7 +174,7 @@ def _resolve_record_or_draft_media_files(record, request):
163
174
  return None
164
175
 
165
176
 
166
- def _resolve_checks(record, request, community=None):
177
+ def _resolve_checks(record_uuid, request, community=None):
167
178
  """Resolve the checks for this draft/record related to the community and the request."""
168
179
  # FIXME: Move this logic to invenio-checks
169
180
 
@@ -181,6 +192,10 @@ def _resolve_checks(record, request, community=None):
181
192
  if not is_draft_submission and not is_record_inclusion:
182
193
  return None
183
194
 
195
+ # Early exit if there is no record UUID (for instance for some closed requests)
196
+ if not record_uuid:
197
+ return None
198
+
184
199
  # Resolve the target community from the request if the community was not passed as an argument
185
200
  if not community:
186
201
  community_uuid = request["receiver"]["community"]
@@ -196,16 +211,6 @@ def _resolve_checks(record, request, community=None):
196
211
  communities.append(community_parent_id)
197
212
  communities.append(community.id)
198
213
 
199
- # Resolve the record UUID
200
- if is_record_inclusion:
201
- record_uuid = current_rdm_records_service.record_cls.pid.resolve(
202
- record["id"]
203
- ).id
204
- else:
205
- record_uuid = current_rdm_records_service.draft_cls.pid.resolve(
206
- record["id"], registered_only=False
207
- ).id
208
-
209
214
  # Early exit if no check config found for the communities
210
215
  from invenio_checks.models import CheckConfig, CheckRun
211
216
 
@@ -254,8 +259,9 @@ def user_dashboard_request_view(request, **kwargs):
254
259
  topic = _resolve_topic_record(request)
255
260
  record_ui = topic["record_ui"]
256
261
  record = topic["record"]
262
+ record_uuid = topic["record_uuid"]
257
263
  is_draft = record_ui["is_draft"] if record_ui else False
258
- checks = _resolve_checks(record, request)
264
+ checks = _resolve_checks(record_uuid, request)
259
265
 
260
266
  files = _resolve_record_or_draft_files(record_ui, request)
261
267
  media_files = _resolve_record_or_draft_media_files(record_ui, request)
@@ -333,8 +339,9 @@ def community_dashboard_request_view(request, community, community_ui, **kwargs)
333
339
  topic = _resolve_topic_record(request)
334
340
  record_ui = topic["record_ui"]
335
341
  record = topic["record"]
342
+ record_uuid = topic["record_uuid"]
336
343
  is_draft = record_ui["is_draft"] if record_ui else False
337
- checks = _resolve_checks(record, request, community)
344
+ checks = _resolve_checks(record_uuid, request, community)
338
345
 
339
346
  permissions.update(topic["permissions"])
340
347
  files = _resolve_record_or_draft_files(record_ui, request)
@@ -1,6 +1,7 @@
1
1
  /*
2
2
  * // This file is part of Invenio-App-Rdm
3
3
  * // Copyright (C) 2023 CERN.
4
+ * // Copyright (C) 2024 KTH Royal Institute of Technology.
4
5
  * //
5
6
  * // Invenio-App-Rdm is free software; you can redistribute it and/or modify it
6
7
  * // under the terms of the MIT License; see LICENSE file for more details.
@@ -72,7 +73,7 @@ export class ImpersonateUser extends Component {
72
73
  labelPosition="left"
73
74
  >
74
75
  <Icon name="spy" />
75
- Impersonate
76
+ {i18next.t("Impersonate")}
76
77
  </Dropdown.Item>
77
78
  <ActionModal modalOpen={modalOpen} user={user}>
78
79
  {modalHeader && <Modal.Header>{modalHeader}</Modal.Header>}
@@ -1,6 +1,7 @@
1
1
  /*
2
2
  * // This file is part of Invenio-App-Rdm
3
3
  * // Copyright (C) 2023 CERN.
4
+ * // Copyright (C) 2024 KTH Royal Institute of Technology.
4
5
  * //
5
6
  * // Invenio-App-Rdm is free software; you can redistribute it and/or modify it
6
7
  * // under the terms of the MIT License; see LICENSE file for more details.
@@ -175,7 +176,7 @@ export class ImpersonateUserForm extends Component {
175
176
  </Modal.Content>
176
177
  <Modal.Actions>
177
178
  <Button onClick={this.handleModalClose} floated="left">
178
- Close
179
+ {i18next.t("Close")}
179
180
  </Button>
180
181
  <Button
181
182
  size="small"
@@ -1,6 +1,7 @@
1
1
  /*
2
2
  * // This file is part of Invenio-App-Rdm
3
3
  * // Copyright (C) 2023 CERN.
4
+ * // Copyright (C) 2024 KTH Royal Institute of Technology.
4
5
  * //
5
6
  * // Invenio-App-Rdm is free software; you can redistribute it and/or modify it
6
7
  * // under the terms of the MIT License; see LICENSE file for more details.
@@ -81,7 +82,7 @@ export class RestoreConfirmation extends Component {
81
82
  </Modal.Content>
82
83
  <Modal.Actions>
83
84
  <Button onClick={this.handleModalClose} floated="left">
84
- Close
85
+ {i18next.t("Close")}
85
86
  </Button>
86
87
  <Button
87
88
  size="small"
@@ -1,6 +1,7 @@
1
1
  /*
2
2
  * // This file is part of Invenio-App-Rdm
3
3
  * // Copyright (C) 2023 CERN.
4
+ * // Copyright (C) 2024 KTH Royal Institute of Technology.
4
5
  * //
5
6
  * // Invenio-App-Rdm is free software; you can redistribute it and/or modify it
6
7
  * // under the terms of the MIT License; see LICENSE file for more details.
@@ -129,7 +130,7 @@ export default class TombstoneForm extends Component {
129
130
  this.handleVisibility(setFieldValue, true)
130
131
  }
131
132
  >
132
- Public
133
+ {i18next.t("Public")}
133
134
  </Button>
134
135
  <Button
135
136
  active={!values.is_visible}
@@ -139,7 +140,7 @@ export default class TombstoneForm extends Component {
139
140
  this.handleVisibility(setFieldValue, false)
140
141
  }
141
142
  >
142
- Hidden
143
+ {i18next.t("Hidden")}
143
144
  </Button>
144
145
  </Button.Group>
145
146
  {!values.is_visible && isPublic && (
@@ -182,7 +183,7 @@ export default class TombstoneForm extends Component {
182
183
  </Modal.Content>
183
184
  <Modal.Actions>
184
185
  <Button onClick={this.handleModalClose} floated="left">
185
- Close
186
+ {i18next.t("Close")}
186
187
  </Button>
187
188
  <Button
188
189
  size="small"
@@ -1,6 +1,7 @@
1
1
  /*
2
2
  * This file is part of Invenio.
3
3
  * Copyright (C) 2022 CERN.
4
+ * Copyright (C) 2024 KTH Royal Institute of Technology.
4
5
  *
5
6
  * Invenio is free software; you can redistribute it and/or modify it
6
7
  * under the terms of the MIT License; see LICENSE file for more details.
@@ -85,7 +86,7 @@ class SearchResultItemComponent extends Component {
85
86
  )}
86
87
  >
87
88
  <Icon name="paperclip" />
88
- Records
89
+ {i18next.t("Records")}
89
90
  </a>
90
91
  </Table.Cell>
91
92
  <Table.Cell data-label={i18next.t("Status")}>
@@ -1,5 +1,6 @@
1
1
  // This file is part of InvenioRDM
2
2
  // Copyright (C) 2022-2024 CERN.
3
+ // Copyright (C) 2024 KTH Royal Institute of Technology.
3
4
  //
4
5
  // Invenio RDM is free software; you can redistribute it and/or modify it
5
6
  // under the terms of the MIT License; see LICENSE file for more details.
@@ -25,7 +26,7 @@ class RecordsResultsListItem extends Component {
25
26
  const createdDate = _get(
26
27
  result,
27
28
  "ui.created_date_l10n_long",
28
- "No creation date found."
29
+ i18next.t("No creation date found.")
29
30
  );
30
31
 
31
32
  const creators = result.ui.creators.creators;
@@ -33,21 +34,21 @@ class RecordsResultsListItem extends Component {
33
34
  const descriptionStripped = _get(
34
35
  result,
35
36
  "ui.description_stripped",
36
- "No description"
37
+ i18next.t("No description")
37
38
  );
38
39
 
39
40
  const publicationDate = _get(
40
41
  result,
41
42
  "ui.publication_date_l10n_long",
42
- "No publication date found."
43
+ i18next.t("No publication date found.")
43
44
  );
44
45
  const resourceType = _get(
45
46
  result,
46
47
  "ui.resource_type.title_l10n",
47
- "No resource type"
48
+ i18next.t("No resource type")
48
49
  );
49
50
  const subjects = _get(result, "ui.subjects", []);
50
- const title = _get(result, "metadata.title", "No title");
51
+ const title = _get(result, "metadata.title", i18next.t("No title"));
51
52
  const version = _get(result, "ui.version", null);
52
53
  const versions = _get(result, "versions");
53
54
  const uniqueViews = _get(result, "stats.all_versions.unique_views", 0);