Skip to content

Commit

Permalink
i18n: mark translations for missing strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Samk13 committed Oct 23, 2024
1 parent ec07707 commit 8e236e3
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* // This file is part of Invenio-Communities
* // 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 @@ -85,7 +86,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
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file is part of InvenioRDM
// Copyright (C) 2022-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 @@ -45,7 +46,7 @@ export const CommunityItemComputer = ({ result }) => {
{result.parent && (
<p className="ml-5 display-inline-block">
<Popup
content="Verified community"
content={i18next.t("Verified community")}
trigger={
<Icon size="small" color="green" name="check circle outline" />
}
Expand All @@ -61,7 +62,7 @@ export const CommunityItemComputer = ({ result }) => {
)}
{result.parent && (
<div className="sub header">
Part of{" "}
{i18next.t("Part of")}{" "}
<a href={`/communities/${result.parent.slug}`}>
{result.parent.metadata.title}
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// This file is part of InvenioRDM
// Copyright (C) 2022-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 @@ -91,7 +92,7 @@ export const CommunityItemMobile = ({ result, index }) => {
)}
{result.parent && (
<div className="pl-0 sub header">
Part of{" "}
{i18next.t("Part of")}{" "}
<a href={`/communities/${result.parent.slug}`}>
{result.parent.metadata.title}
</a>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
// This file is part of InvenioRDM
// Copyright (C) 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.

import React from "react";
import PropTypes from "prop-types";
import { Popup } from "semantic-ui-react";
import { i18next } from "@translations/invenio_app_rdm/i18next";

const OrganizationsList = ({ organizations }) => {
const handleClick = (e) => {
Expand All @@ -16,8 +24,12 @@ const OrganizationsList = ({ organizations }) => {
{organizations[0].id ? (
<a
href={`https://ror.org/${organizations[0].id}`}
aria-label={`${organizations[0].name}'s ROR profile`}
title={`${organizations[0].name}'s ROR profile`}
aria-label={i18next.t("{{name}}'s ROR profile", {
name: organizations[0].name,
})}
title={i18next.t("{{name}}'s ROR profile", {
name: organizations[0].name,
})}
target="_blank"
rel="noreferrer"
>
Expand All @@ -26,7 +38,9 @@ const OrganizationsList = ({ organizations }) => {
<img
className="inline-id-icon"
src="/static/images/ror-icon.svg"
alt={`${organizations[0].name}'s ROR profile`}
alt={i18next.t("{{name}}'s ROR profile", {
name: organizations[0].name,
})}
/>
</a>
) : (
Expand All @@ -35,11 +49,13 @@ const OrganizationsList = ({ organizations }) => {
</span>
{organizations.length > 1 && (
<span className="ml-1">
&nbsp;and&nbsp;
&nbsp;{i18next.t("and")}&nbsp;
<Popup
trigger={
<a href="#!" onClick={handleClick}>
{`${organizations.length - 1} more organizations`}
{i18next.t("{{count}} more organizations", {
count: organizations.length - 1,
})}
</a>
}
size="small"
Expand All @@ -51,8 +67,12 @@ const OrganizationsList = ({ organizations }) => {
{org.id ? (
<a
href={`https://ror.org/${org.id}`}
aria-label={`${org.name}'s ROR profile`}
title={`${org.name}'s ROR profile`}
aria-label={i18next.t("{{name}}'s ROR profile", {
name: org.name,
})}
title={i18next.t("{{name}}'s ROR profile", {
name: org.name,
})}
target="_blank"
rel="noreferrer"
>
Expand All @@ -61,7 +81,9 @@ const OrganizationsList = ({ organizations }) => {
<img
className="inline-id-icon"
src="/static/images/ror-icon.svg"
alt={`${organizations[0].name}'s ROR profile`}
alt={i18next.t("{{name}}'s ROR profile", {
name: org.name,
})}
/>
</a>
) : (
Expand Down

0 comments on commit 8e236e3

Please sign in to comment.