@ndla/ui 56.0.19-alpha.0 → 56.0.20-alpha.0
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.
- package/es/Concept/Concept.js +3 -1
- package/es/Embed/ConceptEmbed.js +4 -1
- package/es/i18n/useComponentTranslations.js +12 -11
- package/es/locale/messages-en.js +13 -9
- package/es/locale/messages-nb.js +13 -9
- package/es/locale/messages-nn.js +13 -9
- package/es/locale/messages-se.js +13 -9
- package/es/locale/messages-sma.js +13 -9
- package/lib/Concept/Concept.d.ts +1 -0
- package/lib/Concept/Concept.js +3 -1
- package/lib/Embed/ConceptEmbed.d.ts +2 -1
- package/lib/Embed/ConceptEmbed.js +4 -1
- package/lib/i18n/useComponentTranslations.d.ts +7 -7
- package/lib/i18n/useComponentTranslations.js +12 -11
- package/lib/locale/messages-en.d.ts +8 -4
- package/lib/locale/messages-en.js +13 -9
- package/lib/locale/messages-nb.d.ts +8 -4
- package/lib/locale/messages-nb.js +13 -9
- package/lib/locale/messages-nn.d.ts +8 -4
- package/lib/locale/messages-nn.js +13 -9
- package/lib/locale/messages-se.d.ts +8 -4
- package/lib/locale/messages-se.js +13 -9
- package/lib/locale/messages-sma.d.ts +8 -4
- package/lib/locale/messages-sma.js +13 -9
- package/package.json +7 -7
- package/src/Concept/Concept.tsx +3 -2
- package/src/Embed/ConceptEmbed.tsx +4 -1
- package/src/i18n/useComponentTranslations.ts +19 -18
- package/src/locale/messages-en.ts +10 -6
- package/src/locale/messages-nb.ts +10 -6
- package/src/locale/messages-nn.ts +10 -6
- package/src/locale/messages-se.ts +10 -6
- package/src/locale/messages-sma.ts +10 -6
package/es/Concept/Concept.js
CHANGED
|
@@ -40,6 +40,7 @@ export const Concept = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
40
40
|
children,
|
|
41
41
|
title,
|
|
42
42
|
source,
|
|
43
|
+
previewAlt,
|
|
43
44
|
...rest
|
|
44
45
|
} = _ref;
|
|
45
46
|
const licenseProps = licenseAttributes(copyright?.license?.license, lang, source);
|
|
@@ -56,7 +57,8 @@ export const Concept = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
56
57
|
}), children]
|
|
57
58
|
}), visualElement?.resource === "image" ? /*#__PURE__*/_jsx(ImageEmbed, {
|
|
58
59
|
embed: visualElement,
|
|
59
|
-
lang: lang
|
|
60
|
+
lang: lang,
|
|
61
|
+
previewAlt: previewAlt
|
|
60
62
|
}) : visualElement?.resource === "brightcove" ? /*#__PURE__*/_jsx(BrightcoveEmbed, {
|
|
61
63
|
embed: visualElement
|
|
62
64
|
}) : visualElement?.resource === "h5p" ? /*#__PURE__*/_jsx(H5pEmbed, {
|
package/es/Embed/ConceptEmbed.js
CHANGED
|
@@ -27,7 +27,8 @@ export const ConceptEmbed = _ref => {
|
|
|
27
27
|
let {
|
|
28
28
|
embed,
|
|
29
29
|
renderContext,
|
|
30
|
-
lang
|
|
30
|
+
lang,
|
|
31
|
+
previewAlt
|
|
31
32
|
} = _ref;
|
|
32
33
|
const parsedContent = useMemo(() => {
|
|
33
34
|
if (embed.status === "error" || !embed.data.concept.content) return undefined;
|
|
@@ -56,6 +57,7 @@ export const ConceptEmbed = _ref => {
|
|
|
56
57
|
}
|
|
57
58
|
if (embed.embedData.type === "inline") {
|
|
58
59
|
return /*#__PURE__*/_jsx(InlineConcept, {
|
|
60
|
+
previewAlt: previewAlt,
|
|
59
61
|
linkText: embed.embedData.linkText,
|
|
60
62
|
copyright: concept.copyright,
|
|
61
63
|
visualElement: visualElement,
|
|
@@ -66,6 +68,7 @@ export const ConceptEmbed = _ref => {
|
|
|
66
68
|
});
|
|
67
69
|
}
|
|
68
70
|
return /*#__PURE__*/_jsx(BlockConcept, {
|
|
71
|
+
previewAlt: previewAlt,
|
|
69
72
|
copyright: concept.copyright,
|
|
70
73
|
visualElement: visualElement,
|
|
71
74
|
lang: lang,
|
|
@@ -93,23 +93,24 @@ export const useImageSearchTranslations = function () {
|
|
|
93
93
|
});
|
|
94
94
|
const paginationTranslations = usePaginationTranslations();
|
|
95
95
|
const {
|
|
96
|
-
|
|
96
|
+
imagePreview,
|
|
97
97
|
paginationTranslations: fallbackPaginationTranslations,
|
|
98
98
|
...remaining
|
|
99
99
|
} = translations;
|
|
100
100
|
return {
|
|
101
|
-
close: t("close"),
|
|
102
101
|
searchPlaceholder: t("searchPlaceholder"),
|
|
103
102
|
searchButtonTitle: t("searchButtonTitle"),
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
103
|
+
imagePreview: {
|
|
104
|
+
creatorsLabel: t("imagePreview.creatorsLabel"),
|
|
105
|
+
license: t("imagePreview.license"),
|
|
106
|
+
caption: t("imagePreview.caption"),
|
|
107
|
+
altText: t("imagePreview.altText"),
|
|
108
|
+
modelRelease: t("imagePreview.modelRelease"),
|
|
109
|
+
tags: t("imagePreview.tags"),
|
|
110
|
+
close: t("close"),
|
|
111
|
+
checkboxLabel: t("imagePreview.checkboxLabel"),
|
|
112
|
+
useImageTitle: t("imagePreview.useImageTitle"),
|
|
113
|
+
...imagePreview
|
|
113
114
|
},
|
|
114
115
|
paginationTranslations: {
|
|
115
116
|
...paginationTranslations,
|
package/es/locale/messages-en.js
CHANGED
|
@@ -995,7 +995,9 @@ const messages = {
|
|
|
995
995
|
title: "Categories",
|
|
996
996
|
posts: "post",
|
|
997
997
|
posts_plural: "posts",
|
|
998
|
-
subcategory: "Subcategories"
|
|
998
|
+
subcategory: "Subcategories",
|
|
999
|
+
votes: "reaction",
|
|
1000
|
+
votes_plural: "reactions"
|
|
999
1001
|
},
|
|
1000
1002
|
cancel: {
|
|
1001
1003
|
title: {
|
|
@@ -1057,7 +1059,9 @@ const messages = {
|
|
|
1057
1059
|
locked: "Lock topic",
|
|
1058
1060
|
unlock: "Unlock topic",
|
|
1059
1061
|
lockDescription: "Do you want do lock this topic? This will prevent this topic from getting more posts.",
|
|
1060
|
-
unlockDescription: "Do you want do unlock this topic? This will prevent this topic from getting more posts."
|
|
1062
|
+
unlockDescription: "Do you want do unlock this topic? This will prevent this topic from getting more posts.",
|
|
1063
|
+
votes: "reaction",
|
|
1064
|
+
votes_plural: "reactions"
|
|
1061
1065
|
},
|
|
1062
1066
|
posts: {
|
|
1063
1067
|
title: "Posts",
|
|
@@ -1086,12 +1090,12 @@ const messages = {
|
|
|
1086
1090
|
maxLength: "The maximum length for the text field is reached",
|
|
1087
1091
|
error: "The field is required"
|
|
1088
1092
|
},
|
|
1089
|
-
bottomText: "Are you missing a category?
|
|
1093
|
+
bottomText: "Are you missing a category? You can request new categories. Use 'Ask NDLA' or send an email to ",
|
|
1090
1094
|
moderatorEmail: "moderator@ndla.no",
|
|
1091
1095
|
notification: {
|
|
1092
1096
|
title: "Notifications",
|
|
1093
1097
|
showAll: "View all notifications",
|
|
1094
|
-
description: "Welcome to
|
|
1098
|
+
description: "Welcome to NDLAs Arena. Here, you can discuss, share and cooperate with other teachers from all over Norway.",
|
|
1095
1099
|
myNotification: "My notifications",
|
|
1096
1100
|
markAll: "Mark all as read",
|
|
1097
1101
|
subscribe: "You will now be notified of new replies to this topic",
|
|
@@ -1469,18 +1473,18 @@ const messages = {
|
|
|
1469
1473
|
page: "Page {{page}}"
|
|
1470
1474
|
},
|
|
1471
1475
|
imageSearch: {
|
|
1472
|
-
close: "Close",
|
|
1473
1476
|
searchPlaceholder: "Search images",
|
|
1474
1477
|
searchButtonTitle: "Search",
|
|
1475
|
-
|
|
1476
|
-
checkboxLabel: "Set as meta image",
|
|
1477
|
-
imageMetadata: {
|
|
1478
|
+
imagePreview: {
|
|
1478
1479
|
creatorsLabel: "Image",
|
|
1479
1480
|
license: "License",
|
|
1480
1481
|
caption: "Caption",
|
|
1481
1482
|
altText: "Alt-text",
|
|
1482
1483
|
modelRelease: "Model released",
|
|
1483
|
-
tags: "Tags"
|
|
1484
|
+
tags: "Tags",
|
|
1485
|
+
checkboxLabel: "Set as meta image",
|
|
1486
|
+
close: "Close",
|
|
1487
|
+
useImageTitle: "Use image"
|
|
1484
1488
|
}
|
|
1485
1489
|
},
|
|
1486
1490
|
audioSearch: {
|
package/es/locale/messages-nb.js
CHANGED
|
@@ -995,7 +995,9 @@ const messages = {
|
|
|
995
995
|
title: "Kategorier",
|
|
996
996
|
posts: "innlegg",
|
|
997
997
|
posts_plural: "innlegg",
|
|
998
|
-
subcategory: "Tema"
|
|
998
|
+
subcategory: "Tema",
|
|
999
|
+
votes: "reaksjon",
|
|
1000
|
+
votes_plural: "reaksjoner"
|
|
999
1001
|
},
|
|
1000
1002
|
publish: "Publiser",
|
|
1001
1003
|
cancel: {
|
|
@@ -1057,7 +1059,9 @@ const messages = {
|
|
|
1057
1059
|
locked: "Lås innlegg",
|
|
1058
1060
|
unlock: "Lås opp innlegg",
|
|
1059
1061
|
lockDescription: "Vil du låse dette innlegget? Dette vil gjøre at innlegget ikke kan få flere kommentarer, og vil vises som låst.",
|
|
1060
|
-
unlockDescription: "Vil du låse opp dette innlegget? Dette vil gjøre at innlegget kan få flere kommentarer."
|
|
1062
|
+
unlockDescription: "Vil du låse opp dette innlegget? Dette vil gjøre at innlegget kan få flere kommentarer.",
|
|
1063
|
+
votes: "reaksjon",
|
|
1064
|
+
votes_plural: "reaksjoner"
|
|
1061
1065
|
},
|
|
1062
1066
|
posts: {
|
|
1063
1067
|
title: "Innlegg",
|
|
@@ -1086,12 +1090,12 @@ const messages = {
|
|
|
1086
1090
|
maxLength: "Maksimal lengde for tekstfeltet er nådd",
|
|
1087
1091
|
error: "Feltet er påkrevd"
|
|
1088
1092
|
},
|
|
1089
|
-
bottomText: "Savner du en kategori?
|
|
1093
|
+
bottomText: "Savner du en kategori? Du kan be om nye kategorier. Bruk 'Spør NDLA' eller send en epost til ",
|
|
1090
1094
|
moderatorEmail: "moderator@ndla.no",
|
|
1091
1095
|
notification: {
|
|
1092
1096
|
title: "Varslinger",
|
|
1093
1097
|
showAll: "Se alle varslinger",
|
|
1094
|
-
description: "Velkommen
|
|
1098
|
+
description: "Velkommen til NDLAs Arena. Her kan du diskutere, dele og samarbeide med andre lærere fra hele Norge.",
|
|
1095
1099
|
myNotification: "Mine varsler",
|
|
1096
1100
|
markAll: "Merk alle som lest",
|
|
1097
1101
|
subscribe: "Du får nå varsling om nye svar på dette innlegget",
|
|
@@ -1469,18 +1473,18 @@ const messages = {
|
|
|
1469
1473
|
page: "Side {{page}}"
|
|
1470
1474
|
},
|
|
1471
1475
|
imageSearch: {
|
|
1472
|
-
close: "Lukk",
|
|
1473
1476
|
searchPlaceholder: "Søk i bilder",
|
|
1474
1477
|
searchButtonTitle: "Søk",
|
|
1475
|
-
|
|
1476
|
-
checkboxLabel: "Sett som metabilde",
|
|
1477
|
-
imageMetadata: {
|
|
1478
|
+
imagePreview: {
|
|
1478
1479
|
creatorsLabel: "Bilde",
|
|
1479
1480
|
license: "Lisens",
|
|
1480
1481
|
caption: "Bildetekst",
|
|
1481
1482
|
altText: "Alt-tekst",
|
|
1482
1483
|
modelRelease: "Modellklarert",
|
|
1483
|
-
tags: "Emneknagger"
|
|
1484
|
+
tags: "Emneknagger",
|
|
1485
|
+
checkboxLabel: "Sett som metabilde",
|
|
1486
|
+
close: "Lukk",
|
|
1487
|
+
useImageTitle: "Bruk bildet"
|
|
1484
1488
|
}
|
|
1485
1489
|
},
|
|
1486
1490
|
audioSearch: {
|
package/es/locale/messages-nn.js
CHANGED
|
@@ -995,7 +995,9 @@ const messages = {
|
|
|
995
995
|
title: "Kategoriar",
|
|
996
996
|
posts: "innlegg",
|
|
997
997
|
posts_plural: "innlegg",
|
|
998
|
-
subcategory: "Tema"
|
|
998
|
+
subcategory: "Tema",
|
|
999
|
+
votes: "reaksjon",
|
|
1000
|
+
votes_plural: "reaksjonar"
|
|
999
1001
|
},
|
|
1000
1002
|
publish: "Publiser",
|
|
1001
1003
|
cancel: {
|
|
@@ -1049,7 +1051,9 @@ const messages = {
|
|
|
1049
1051
|
locked: "Lås innlegg",
|
|
1050
1052
|
unlock: "Lås opp innlegg",
|
|
1051
1053
|
lockDescription: "Vil du låse dette innlegget? Dette vil gjera at innlegget ikkje kan få fleire kommentarar, og vil visast som låst.",
|
|
1052
|
-
unlockDescription: "Vil du låse opp dette innlegget? Dette vil gjera at innlegget kan få fleire kommentarar."
|
|
1054
|
+
unlockDescription: "Vil du låse opp dette innlegget? Dette vil gjera at innlegget kan få fleire kommentarar.",
|
|
1055
|
+
votes: "reaksjon",
|
|
1056
|
+
votes_plural: "reaksjonar"
|
|
1053
1057
|
},
|
|
1054
1058
|
deleted: {
|
|
1055
1059
|
post: "Kommentaren din har blitt sletta.",
|
|
@@ -1086,12 +1090,12 @@ const messages = {
|
|
|
1086
1090
|
maxLength: "Maksimal lengd for tekstfeltet er nådd",
|
|
1087
1091
|
error: "Feltet er påkravd"
|
|
1088
1092
|
},
|
|
1089
|
-
bottomText: "Saknar du ein kategori?
|
|
1093
|
+
bottomText: "Saknar du ein kategori? Du kan be om nye kategoriar. Bruk 'Spør NDLA' eller send ein epost til ",
|
|
1090
1094
|
moderatorEmail: "moderator@ndla.no",
|
|
1091
1095
|
notification: {
|
|
1092
1096
|
title: "Varslingar",
|
|
1093
1097
|
showAll: "Sjå alle varslingar",
|
|
1094
|
-
description: "Velkommen
|
|
1098
|
+
description: "Velkommen til NDLA sin Arena. Her kan du diskutere, dele og samarbeide med andre lærarar frå heile Noreg.",
|
|
1095
1099
|
myNotification: "Mine varsler",
|
|
1096
1100
|
markAll: "Merk alle som lest",
|
|
1097
1101
|
subscribe: "Du får no varsling om nye svar på dette innlegget",
|
|
@@ -1469,18 +1473,18 @@ const messages = {
|
|
|
1469
1473
|
page: "Side {{page}}"
|
|
1470
1474
|
},
|
|
1471
1475
|
imageSearch: {
|
|
1472
|
-
close: "Lukk",
|
|
1473
1476
|
searchPlaceholder: "Søk i bilete",
|
|
1474
1477
|
searchButtonTitle: "Søk",
|
|
1475
|
-
|
|
1476
|
-
checkboxLabel: "Sett som metabilete",
|
|
1477
|
-
imageMetadata: {
|
|
1478
|
+
imagePreview: {
|
|
1478
1479
|
creatorsLabel: "Bilete",
|
|
1479
1480
|
license: "Lisens",
|
|
1480
1481
|
caption: "Bildetekst",
|
|
1481
1482
|
altText: "Alt-tekst",
|
|
1482
1483
|
modelRelease: "Modellklarert",
|
|
1483
|
-
tags: "Emneknaggar"
|
|
1484
|
+
tags: "Emneknaggar",
|
|
1485
|
+
checkboxLabel: "Sett som metabilete",
|
|
1486
|
+
close: "Lukk",
|
|
1487
|
+
useImageTitle: "Bruk biletet"
|
|
1484
1488
|
}
|
|
1485
1489
|
},
|
|
1486
1490
|
audioSearch: {
|
package/es/locale/messages-se.js
CHANGED
|
@@ -995,7 +995,9 @@ const messages = {
|
|
|
995
995
|
title: "Kategorier",
|
|
996
996
|
posts: "innlegg",
|
|
997
997
|
posts_plural: "innlegg",
|
|
998
|
-
subcategory: "Tema"
|
|
998
|
+
subcategory: "Tema",
|
|
999
|
+
votes: "reaksjon",
|
|
1000
|
+
votes_plural: "reaksjoner"
|
|
999
1001
|
},
|
|
1000
1002
|
publish: "Publiser",
|
|
1001
1003
|
cancel: {
|
|
@@ -1057,7 +1059,9 @@ const messages = {
|
|
|
1057
1059
|
locked: "Lås innlegg",
|
|
1058
1060
|
unlock: "Lås opp innlegg",
|
|
1059
1061
|
lockDescription: "Vil du låse dette innlegget? Dette vil gjøre at innlegget ikke kan få flere kommentarer, og vil vises som låst.",
|
|
1060
|
-
unlockDescription: "Vil du låse opp dette innlegget? Dette vil gjøre at innlegget kan få flere kommentarer."
|
|
1062
|
+
unlockDescription: "Vil du låse opp dette innlegget? Dette vil gjøre at innlegget kan få flere kommentarer.",
|
|
1063
|
+
votes: "reaksjon",
|
|
1064
|
+
votes_plural: "reaksjoner"
|
|
1061
1065
|
},
|
|
1062
1066
|
posts: {
|
|
1063
1067
|
title: "Innlegg",
|
|
@@ -1086,12 +1090,12 @@ const messages = {
|
|
|
1086
1090
|
maxLength: "Maksimal lengde for tekstfeltet er nådd",
|
|
1087
1091
|
error: "Feltet er påkrevd"
|
|
1088
1092
|
},
|
|
1089
|
-
bottomText: "Savner du en kategori?
|
|
1093
|
+
bottomText: "Savner du en kategori? Du kan be om nye kategorier. Bruk 'Spør NDLA' eller send en epost til ",
|
|
1090
1094
|
moderatorEmail: "moderator@ndla.no",
|
|
1091
1095
|
notification: {
|
|
1092
1096
|
title: "Varslinger",
|
|
1093
1097
|
showAll: "Se alle varslinger",
|
|
1094
|
-
description: "Velkommen
|
|
1098
|
+
description: "Velkommen til NDLAs Arena. Her kan du diskutere, dele og samarbeide med andre lærere fra hele Norge.",
|
|
1095
1099
|
myNotification: "Mine varsler",
|
|
1096
1100
|
markAll: "Merk alle som lest",
|
|
1097
1101
|
subscribe: "Du får nå varsling om nye svar på dette innlegget",
|
|
@@ -1469,18 +1473,18 @@ const messages = {
|
|
|
1469
1473
|
page: "Side {{page}}"
|
|
1470
1474
|
},
|
|
1471
1475
|
imageSearch: {
|
|
1472
|
-
close: "Lukk",
|
|
1473
1476
|
searchPlaceholder: "Søk i bilder",
|
|
1474
1477
|
searchButtonTitle: "Søk",
|
|
1475
|
-
|
|
1476
|
-
checkboxLabel: "Sett som metabilde",
|
|
1477
|
-
imageMetadata: {
|
|
1478
|
+
imagePreview: {
|
|
1478
1479
|
creatorsLabel: "Bilde",
|
|
1479
1480
|
license: "Lisens",
|
|
1480
1481
|
caption: "Bildetekst",
|
|
1481
1482
|
altText: "Alt-tekst",
|
|
1482
1483
|
modelRelease: "Modellklarert",
|
|
1483
|
-
tags: "Emneknagger"
|
|
1484
|
+
tags: "Emneknagger",
|
|
1485
|
+
checkboxLabel: "Sett som metabilde",
|
|
1486
|
+
close: "Lukk",
|
|
1487
|
+
useImageTitle: "Bruk bildet"
|
|
1484
1488
|
}
|
|
1485
1489
|
},
|
|
1486
1490
|
audioSearch: {
|
|
@@ -995,7 +995,9 @@ const messages = {
|
|
|
995
995
|
title: "Kategorier",
|
|
996
996
|
posts: "innlegg",
|
|
997
997
|
posts_plural: "innlegg",
|
|
998
|
-
subcategory: "Tema"
|
|
998
|
+
subcategory: "Tema",
|
|
999
|
+
votes: "reaksjon",
|
|
1000
|
+
votes_plural: "reaksjoner"
|
|
999
1001
|
},
|
|
1000
1002
|
publish: "Publiser",
|
|
1001
1003
|
cancel: {
|
|
@@ -1057,7 +1059,9 @@ const messages = {
|
|
|
1057
1059
|
locked: "Lås innlegg",
|
|
1058
1060
|
unlock: "Lås opp innlegg",
|
|
1059
1061
|
lockDescription: "Vil du låse dette innlegget? Dette vil gjøre at innlegget ikke kan få flere kommentarer, og vil vises som låst.",
|
|
1060
|
-
unlockDescription: "Vil du låse opp dette innlegget? Dette vil gjøre at innlegget kan få flere kommentarer."
|
|
1062
|
+
unlockDescription: "Vil du låse opp dette innlegget? Dette vil gjøre at innlegget kan få flere kommentarer.",
|
|
1063
|
+
votes: "reaksjon",
|
|
1064
|
+
votes_plural: "reaksjoner"
|
|
1061
1065
|
},
|
|
1062
1066
|
posts: {
|
|
1063
1067
|
title: "Innlegg",
|
|
@@ -1086,12 +1090,12 @@ const messages = {
|
|
|
1086
1090
|
maxLength: "Maksimal lengde for tekstfeltet er nådd",
|
|
1087
1091
|
error: "Feltet er påkrevd"
|
|
1088
1092
|
},
|
|
1089
|
-
bottomText: "Savner du en kategori?
|
|
1093
|
+
bottomText: "Savner du en kategori? Du kan be om nye kategorier. Bruk 'Spør NDLA' eller send en epost til ",
|
|
1090
1094
|
moderatorEmail: "moderator@ndla.no",
|
|
1091
1095
|
notification: {
|
|
1092
1096
|
title: "Varslinger",
|
|
1093
1097
|
showAll: "Se alle varslinger",
|
|
1094
|
-
description: "Velkommen
|
|
1098
|
+
description: "Velkommen til NDLAs Arena. Her kan du diskutere, dele og samarbeide med andre lærere fra hele Norge.",
|
|
1095
1099
|
myNotification: "Mine varsler",
|
|
1096
1100
|
markAll: "Merk alle som lest",
|
|
1097
1101
|
subscribe: "Du får nå varsling om nye svar på dette innlegget",
|
|
@@ -1469,18 +1473,18 @@ const messages = {
|
|
|
1469
1473
|
page: "Side {{page}}"
|
|
1470
1474
|
},
|
|
1471
1475
|
imageSearch: {
|
|
1472
|
-
close: "Lukk",
|
|
1473
1476
|
searchPlaceholder: "Søk i bilder",
|
|
1474
1477
|
searchButtonTitle: "Søk",
|
|
1475
|
-
|
|
1476
|
-
checkboxLabel: "Sett som metabilde",
|
|
1477
|
-
imageMetadata: {
|
|
1478
|
+
imagePreview: {
|
|
1478
1479
|
creatorsLabel: "Bilde",
|
|
1479
1480
|
license: "Lisens",
|
|
1480
1481
|
caption: "Bildetekst",
|
|
1481
1482
|
altText: "Alt-tekst",
|
|
1482
1483
|
modelRelease: "Modellklarert",
|
|
1483
|
-
tags: "Emneknagger"
|
|
1484
|
+
tags: "Emneknagger",
|
|
1485
|
+
checkboxLabel: "Sett som metabilde",
|
|
1486
|
+
close: "Lukk",
|
|
1487
|
+
useImageTitle: "Bruk bildet"
|
|
1484
1488
|
}
|
|
1485
1489
|
},
|
|
1486
1490
|
audioSearch: {
|
package/lib/Concept/Concept.d.ts
CHANGED
|
@@ -15,5 +15,6 @@ export interface ConceptProps extends ComponentPropsWithRef<"figure"> {
|
|
|
15
15
|
title?: string;
|
|
16
16
|
children?: ReactNode;
|
|
17
17
|
source?: string;
|
|
18
|
+
previewAlt?: boolean;
|
|
18
19
|
}
|
|
19
20
|
export declare const Concept: import("react").ForwardRefExoticComponent<Omit<ConceptProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
package/lib/Concept/Concept.js
CHANGED
|
@@ -46,6 +46,7 @@ const Concept = exports.Concept = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref
|
|
|
46
46
|
children,
|
|
47
47
|
title,
|
|
48
48
|
source,
|
|
49
|
+
previewAlt,
|
|
49
50
|
...rest
|
|
50
51
|
} = _ref;
|
|
51
52
|
const licenseProps = (0, _licenseAttributes.licenseAttributes)(copyright?.license?.license, lang, source);
|
|
@@ -62,7 +63,8 @@ const Concept = exports.Concept = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref
|
|
|
62
63
|
}), children]
|
|
63
64
|
}), visualElement?.resource === "image" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Embed.ImageEmbed, {
|
|
64
65
|
embed: visualElement,
|
|
65
|
-
lang: lang
|
|
66
|
+
lang: lang,
|
|
67
|
+
previewAlt: previewAlt
|
|
66
68
|
}) : visualElement?.resource === "brightcove" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Embed.BrightcoveEmbed, {
|
|
67
69
|
embed: visualElement
|
|
68
70
|
}) : visualElement?.resource === "h5p" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Embed.H5pEmbed, {
|
|
@@ -12,11 +12,12 @@ import { ConceptProps } from "../Concept/Concept";
|
|
|
12
12
|
interface BaseProps {
|
|
13
13
|
renderContext?: RenderContext;
|
|
14
14
|
lang?: string;
|
|
15
|
+
previewAlt?: boolean;
|
|
15
16
|
}
|
|
16
17
|
interface Props extends BaseProps {
|
|
17
18
|
embed: ConceptMetaData;
|
|
18
19
|
}
|
|
19
|
-
export declare const ConceptEmbed: ({ embed, renderContext, lang }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export declare const ConceptEmbed: ({ embed, renderContext, lang, previewAlt }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
20
21
|
export interface InlineConceptProps extends ConceptProps, BaseProps {
|
|
21
22
|
linkText?: string;
|
|
22
23
|
source?: string;
|
|
@@ -34,7 +34,8 @@ const ConceptEmbed = _ref => {
|
|
|
34
34
|
let {
|
|
35
35
|
embed,
|
|
36
36
|
renderContext,
|
|
37
|
-
lang
|
|
37
|
+
lang,
|
|
38
|
+
previewAlt
|
|
38
39
|
} = _ref;
|
|
39
40
|
const parsedContent = (0, _react.useMemo)(() => {
|
|
40
41
|
if (embed.status === "error" || !embed.data.concept.content) return undefined;
|
|
@@ -63,6 +64,7 @@ const ConceptEmbed = _ref => {
|
|
|
63
64
|
}
|
|
64
65
|
if (embed.embedData.type === "inline") {
|
|
65
66
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(InlineConcept, {
|
|
67
|
+
previewAlt: previewAlt,
|
|
66
68
|
linkText: embed.embedData.linkText,
|
|
67
69
|
copyright: concept.copyright,
|
|
68
70
|
visualElement: visualElement,
|
|
@@ -73,6 +75,7 @@ const ConceptEmbed = _ref => {
|
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
77
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(BlockConcept, {
|
|
78
|
+
previewAlt: previewAlt,
|
|
76
79
|
copyright: concept.copyright,
|
|
77
80
|
visualElement: visualElement,
|
|
78
81
|
lang: lang,
|
|
@@ -22,23 +22,23 @@ interface AudioSearchTranslations {
|
|
|
22
22
|
noResults: string;
|
|
23
23
|
paginationTranslations: PaginationRootProps["translations"];
|
|
24
24
|
}
|
|
25
|
-
interface
|
|
25
|
+
export interface PreviewTranslations {
|
|
26
26
|
creatorsLabel: string;
|
|
27
27
|
license: string;
|
|
28
28
|
caption: string;
|
|
29
29
|
altText: string;
|
|
30
30
|
modelRelease: string;
|
|
31
31
|
tags: string;
|
|
32
|
+
close: string;
|
|
33
|
+
checkboxLabel?: string;
|
|
34
|
+
missingTitleFallback?: string;
|
|
35
|
+
useImageTitle: string;
|
|
32
36
|
}
|
|
33
|
-
interface ImageSearchTranslations {
|
|
37
|
+
export interface ImageSearchTranslations {
|
|
34
38
|
searchPlaceholder: string;
|
|
35
39
|
searchButtonTitle: string;
|
|
36
|
-
|
|
37
|
-
close: string;
|
|
38
|
-
imageMetadata: MetadataTranslations;
|
|
40
|
+
imagePreview: PreviewTranslations;
|
|
39
41
|
paginationTranslations: PaginationRootProps["translations"];
|
|
40
|
-
missingTitleFallback?: string;
|
|
41
|
-
checkboxLabel?: string;
|
|
42
42
|
}
|
|
43
43
|
export declare const useImageSearchTranslations: (translations?: DeepPartial<ImageSearchTranslations>) => ImageSearchTranslations;
|
|
44
44
|
export declare const useAudioSearchTranslations: (translations?: DeepPartial<AudioSearchTranslations>) => AudioSearchTranslations;
|
|
@@ -102,23 +102,24 @@ const useImageSearchTranslations = function () {
|
|
|
102
102
|
});
|
|
103
103
|
const paginationTranslations = usePaginationTranslations();
|
|
104
104
|
const {
|
|
105
|
-
|
|
105
|
+
imagePreview,
|
|
106
106
|
paginationTranslations: fallbackPaginationTranslations,
|
|
107
107
|
...remaining
|
|
108
108
|
} = translations;
|
|
109
109
|
return {
|
|
110
|
-
close: t("close"),
|
|
111
110
|
searchPlaceholder: t("searchPlaceholder"),
|
|
112
111
|
searchButtonTitle: t("searchButtonTitle"),
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
112
|
+
imagePreview: {
|
|
113
|
+
creatorsLabel: t("imagePreview.creatorsLabel"),
|
|
114
|
+
license: t("imagePreview.license"),
|
|
115
|
+
caption: t("imagePreview.caption"),
|
|
116
|
+
altText: t("imagePreview.altText"),
|
|
117
|
+
modelRelease: t("imagePreview.modelRelease"),
|
|
118
|
+
tags: t("imagePreview.tags"),
|
|
119
|
+
close: t("close"),
|
|
120
|
+
checkboxLabel: t("imagePreview.checkboxLabel"),
|
|
121
|
+
useImageTitle: t("imagePreview.useImageTitle"),
|
|
122
|
+
...imagePreview
|
|
122
123
|
},
|
|
123
124
|
paginationTranslations: {
|
|
124
125
|
...paginationTranslations,
|
|
@@ -986,6 +986,8 @@ declare const messages: {
|
|
|
986
986
|
posts: string;
|
|
987
987
|
posts_plural: string;
|
|
988
988
|
subcategory: string;
|
|
989
|
+
votes: string;
|
|
990
|
+
votes_plural: string;
|
|
989
991
|
};
|
|
990
992
|
cancel: {
|
|
991
993
|
title: {
|
|
@@ -1048,6 +1050,8 @@ declare const messages: {
|
|
|
1048
1050
|
unlock: string;
|
|
1049
1051
|
lockDescription: string;
|
|
1050
1052
|
unlockDescription: string;
|
|
1053
|
+
votes: string;
|
|
1054
|
+
votes_plural: string;
|
|
1051
1055
|
};
|
|
1052
1056
|
posts: {
|
|
1053
1057
|
title: string;
|
|
@@ -1425,18 +1429,18 @@ declare const messages: {
|
|
|
1425
1429
|
page: string;
|
|
1426
1430
|
};
|
|
1427
1431
|
imageSearch: {
|
|
1428
|
-
close: string;
|
|
1429
1432
|
searchPlaceholder: string;
|
|
1430
1433
|
searchButtonTitle: string;
|
|
1431
|
-
|
|
1432
|
-
checkboxLabel: string;
|
|
1433
|
-
imageMetadata: {
|
|
1434
|
+
imagePreview: {
|
|
1434
1435
|
creatorsLabel: string;
|
|
1435
1436
|
license: string;
|
|
1436
1437
|
caption: string;
|
|
1437
1438
|
altText: string;
|
|
1438
1439
|
modelRelease: string;
|
|
1439
1440
|
tags: string;
|
|
1441
|
+
checkboxLabel: string;
|
|
1442
|
+
close: string;
|
|
1443
|
+
useImageTitle: string;
|
|
1440
1444
|
};
|
|
1441
1445
|
};
|
|
1442
1446
|
audioSearch: {
|
|
@@ -1002,7 +1002,9 @@ const messages = {
|
|
|
1002
1002
|
title: "Categories",
|
|
1003
1003
|
posts: "post",
|
|
1004
1004
|
posts_plural: "posts",
|
|
1005
|
-
subcategory: "Subcategories"
|
|
1005
|
+
subcategory: "Subcategories",
|
|
1006
|
+
votes: "reaction",
|
|
1007
|
+
votes_plural: "reactions"
|
|
1006
1008
|
},
|
|
1007
1009
|
cancel: {
|
|
1008
1010
|
title: {
|
|
@@ -1064,7 +1066,9 @@ const messages = {
|
|
|
1064
1066
|
locked: "Lock topic",
|
|
1065
1067
|
unlock: "Unlock topic",
|
|
1066
1068
|
lockDescription: "Do you want do lock this topic? This will prevent this topic from getting more posts.",
|
|
1067
|
-
unlockDescription: "Do you want do unlock this topic? This will prevent this topic from getting more posts."
|
|
1069
|
+
unlockDescription: "Do you want do unlock this topic? This will prevent this topic from getting more posts.",
|
|
1070
|
+
votes: "reaction",
|
|
1071
|
+
votes_plural: "reactions"
|
|
1068
1072
|
},
|
|
1069
1073
|
posts: {
|
|
1070
1074
|
title: "Posts",
|
|
@@ -1093,12 +1097,12 @@ const messages = {
|
|
|
1093
1097
|
maxLength: "The maximum length for the text field is reached",
|
|
1094
1098
|
error: "The field is required"
|
|
1095
1099
|
},
|
|
1096
|
-
bottomText: "Are you missing a category?
|
|
1100
|
+
bottomText: "Are you missing a category? You can request new categories. Use 'Ask NDLA' or send an email to ",
|
|
1097
1101
|
moderatorEmail: "moderator@ndla.no",
|
|
1098
1102
|
notification: {
|
|
1099
1103
|
title: "Notifications",
|
|
1100
1104
|
showAll: "View all notifications",
|
|
1101
|
-
description: "Welcome to
|
|
1105
|
+
description: "Welcome to NDLAs Arena. Here, you can discuss, share and cooperate with other teachers from all over Norway.",
|
|
1102
1106
|
myNotification: "My notifications",
|
|
1103
1107
|
markAll: "Mark all as read",
|
|
1104
1108
|
subscribe: "You will now be notified of new replies to this topic",
|
|
@@ -1476,18 +1480,18 @@ const messages = {
|
|
|
1476
1480
|
page: "Page {{page}}"
|
|
1477
1481
|
},
|
|
1478
1482
|
imageSearch: {
|
|
1479
|
-
close: "Close",
|
|
1480
1483
|
searchPlaceholder: "Search images",
|
|
1481
1484
|
searchButtonTitle: "Search",
|
|
1482
|
-
|
|
1483
|
-
checkboxLabel: "Set as meta image",
|
|
1484
|
-
imageMetadata: {
|
|
1485
|
+
imagePreview: {
|
|
1485
1486
|
creatorsLabel: "Image",
|
|
1486
1487
|
license: "License",
|
|
1487
1488
|
caption: "Caption",
|
|
1488
1489
|
altText: "Alt-text",
|
|
1489
1490
|
modelRelease: "Model released",
|
|
1490
|
-
tags: "Tags"
|
|
1491
|
+
tags: "Tags",
|
|
1492
|
+
checkboxLabel: "Set as meta image",
|
|
1493
|
+
close: "Close",
|
|
1494
|
+
useImageTitle: "Use image"
|
|
1491
1495
|
}
|
|
1492
1496
|
},
|
|
1493
1497
|
audioSearch: {
|