diff --git a/src/assets/print-view/fetch-orcid.js b/src/assets/print-view/fetch-orcid.js index 3dba0d5db..90749660b 100644 --- a/src/assets/print-view/fetch-orcid.js +++ b/src/assets/print-view/fetch-orcid.js @@ -3,7 +3,11 @@ if (typeof $localize === 'undefined') { self.$localize = function (messageParts) { var substitutions = Array.prototype.slice.call(arguments, 1) - return messageParts.reduce(function (result, part, i) { + // Strip Angular localize metadata: `:description@@id:` (first part) or `:PLACEHOLDER:` (rest) + var parts = Array.prototype.map.call(messageParts, function (part) { + return typeof part === 'string' ? part.replace(/^:[^:]*:/, '') : part + }) + return parts.reduce(function (result, part, i) { return ( result + (substitutions[i - 1] != null ? substitutions[i - 1] : '') +