Skip to content

Commit

Permalink
i18n: mark strings for PIDField.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Samk13 committed Dec 4, 2024
1 parent 27f36ca commit d0f7b71
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file is part of Invenio-RDM-Records
// Copyright (C) 2020-2023 CERN.
// Copyright (C) 2020-2022 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.
Expand Down Expand Up @@ -515,7 +516,9 @@ export class PIDField extends Component {
const { canBeManaged, canBeUnmanaged, fieldPath } = this.props;

if (!canBeManaged && !canBeUnmanaged) {
throw Error(`${fieldPath} must be managed, unmanaged or both.`);
throw Error(
i18next.t("{{fieldPath}} must be managed, unmanaged or both.", { fieldPath })
);
}
};

Expand Down

0 comments on commit d0f7b71

Please sign in to comment.