Skip to content

Commit 63706e6

Browse files
authored
PD-0000 fix print view localhost translations (#2862)
* PD-0000 fix-print-view-localhost * PD-000 fix local host translations
1 parent 03b1a66 commit 63706e6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/assets/print-view/fetch-orcid.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
if (typeof $localize === 'undefined') {
44
self.$localize = function (messageParts) {
55
var substitutions = Array.prototype.slice.call(arguments, 1)
6-
return messageParts.reduce(function (result, part, i) {
6+
// Strip Angular localize metadata: `:description@@id:` (first part) or `:PLACEHOLDER:` (rest)
7+
var parts = Array.prototype.map.call(messageParts, function (part) {
8+
return typeof part === 'string' ? part.replace(/^:[^:]*:/, '') : part
9+
})
10+
return parts.reduce(function (result, part, i) {
711
return (
812
result +
913
(substitutions[i - 1] != null ? substitutions[i - 1] : '') +

0 commit comments

Comments
 (0)