@ndla/ui 56.0.23-alpha.0 → 56.0.24-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/dist/panda.buildinfo.json +7 -7
- package/dist/styles.css +22 -22
- package/es/AudioPlayer/Controls.js +16 -5
- package/es/Embed/ConceptEmbed.js +2 -0
- package/es/Embed/EmbedErrorPlaceholder.js +1 -0
- package/es/Embed/GlossEmbed.js +9 -6
- package/es/Embed/ImageEmbed.js +5 -4
- package/es/Embed/InlineTriggerButton.js +1 -1
- package/es/KeyFigure/KeyFigure.js +2 -1
- package/es/ResourceBox/ResourceBox.js +2 -1
- package/es/i18n/useComponentTranslations.js +18 -0
- package/es/locale/messages-en.js +10 -0
- package/es/locale/messages-nb.js +10 -0
- package/es/locale/messages-nn.js +10 -0
- package/es/locale/messages-se.js +10 -0
- package/es/locale/messages-sma.js +10 -0
- package/es/styles.css +22 -22
- package/lib/AudioPlayer/Controls.js +16 -5
- package/lib/Embed/ConceptEmbed.js +2 -0
- package/lib/Embed/EmbedErrorPlaceholder.js +1 -0
- package/lib/Embed/GlossEmbed.js +9 -6
- package/lib/Embed/ImageEmbed.js +5 -4
- package/lib/Embed/InlineTriggerButton.js +1 -1
- package/lib/KeyFigure/KeyFigure.js +2 -1
- package/lib/ResourceBox/ResourceBox.js +2 -1
- package/lib/i18n/useComponentTranslations.d.ts +13 -2
- package/lib/i18n/useComponentTranslations.js +21 -2
- package/lib/locale/messages-en.d.ts +10 -0
- package/lib/locale/messages-en.js +10 -0
- package/lib/locale/messages-nb.d.ts +10 -0
- package/lib/locale/messages-nb.js +10 -0
- package/lib/locale/messages-nn.d.ts +10 -0
- package/lib/locale/messages-nn.js +10 -0
- package/lib/locale/messages-se.d.ts +10 -0
- package/lib/locale/messages-se.js +10 -0
- package/lib/locale/messages-sma.d.ts +10 -0
- package/lib/locale/messages-sma.js +10 -0
- package/lib/styles.css +22 -22
- package/package.json +8 -8
- package/src/AudioPlayer/Controls.tsx +20 -7
- package/src/Embed/ConceptEmbed.tsx +9 -2
- package/src/Embed/EmbedErrorPlaceholder.tsx +1 -0
- package/src/Embed/GlossEmbed.tsx +8 -5
- package/src/Embed/ImageEmbed.tsx +4 -3
- package/src/Embed/InlineTriggerButton.tsx +1 -1
- package/src/KeyFigure/KeyFigure.tsx +1 -0
- package/src/ResourceBox/ResourceBox.tsx +1 -0
- package/src/i18n/useComponentTranslations.ts +28 -2
- package/src/locale/messages-en.ts +10 -0
- package/src/locale/messages-nb.ts +10 -0
- package/src/locale/messages-nn.ts +10 -0
- package/src/locale/messages-se.ts +10 -0
- package/src/locale/messages-sma.ts +10 -0
|
@@ -84,7 +84,17 @@ interface AudioSearchTranslations {
|
|
|
84
84
|
paginationTranslations: PaginationRootProps["translations"];
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
interface VideoTranslations {
|
|
88
|
+
searchPlaceholder: string;
|
|
89
|
+
searchButtonTitle: string;
|
|
90
|
+
loadMoreVideos: string;
|
|
91
|
+
noResults: string;
|
|
92
|
+
is360Video: string;
|
|
93
|
+
previewVideo: string;
|
|
94
|
+
addVideo: string;
|
|
95
|
+
close: string;
|
|
96
|
+
}
|
|
97
|
+
interface PreviewTranslations {
|
|
88
98
|
creatorsLabel: string;
|
|
89
99
|
license: string;
|
|
90
100
|
caption: string;
|
|
@@ -97,7 +107,7 @@ export interface PreviewTranslations {
|
|
|
97
107
|
useImageTitle: string;
|
|
98
108
|
}
|
|
99
109
|
|
|
100
|
-
|
|
110
|
+
interface ImageSearchTranslations {
|
|
101
111
|
searchPlaceholder: string;
|
|
102
112
|
searchButtonTitle: string;
|
|
103
113
|
imagePreview: PreviewTranslations;
|
|
@@ -149,3 +159,19 @@ export const useAudioSearchTranslations = (
|
|
|
149
159
|
...remaining,
|
|
150
160
|
};
|
|
151
161
|
};
|
|
162
|
+
|
|
163
|
+
export const useVideoSearchTranslations = (translations?: Partial<VideoTranslations>): VideoTranslations => {
|
|
164
|
+
const { t } = useTranslation("translation", { keyPrefix: "component.videoSearch" });
|
|
165
|
+
|
|
166
|
+
return {
|
|
167
|
+
searchPlaceholder: t("searchPlaceholder"),
|
|
168
|
+
searchButtonTitle: t("searchButtonTitle"),
|
|
169
|
+
loadMoreVideos: t("loadMoreVideos"),
|
|
170
|
+
noResults: t("noResults"),
|
|
171
|
+
is360Video: t("is360Video"),
|
|
172
|
+
previewVideo: t("previewVideo"),
|
|
173
|
+
addVideo: t("addVideo"),
|
|
174
|
+
close: t("close"),
|
|
175
|
+
...translations,
|
|
176
|
+
};
|
|
177
|
+
};
|
|
@@ -1526,6 +1526,16 @@ const messages = {
|
|
|
1526
1526
|
useAudio: "Chose audio",
|
|
1527
1527
|
noResults: "No audio files found",
|
|
1528
1528
|
},
|
|
1529
|
+
videoSearch: {
|
|
1530
|
+
searchPlaceholder: "Search videos",
|
|
1531
|
+
searchButtonTitle: "Search",
|
|
1532
|
+
loadMoreVideos: "Load more videos",
|
|
1533
|
+
noResults: "No videos found",
|
|
1534
|
+
addVideo: "Use video",
|
|
1535
|
+
previewVideo: "Preview",
|
|
1536
|
+
is360Video: "VR video",
|
|
1537
|
+
close: "Lukk",
|
|
1538
|
+
},
|
|
1529
1539
|
},
|
|
1530
1540
|
};
|
|
1531
1541
|
|
|
@@ -1526,6 +1526,16 @@ const messages = {
|
|
|
1526
1526
|
useAudio: "Velg lyd",
|
|
1527
1527
|
noResults: "Ingen resultater funnet",
|
|
1528
1528
|
},
|
|
1529
|
+
videoSearch: {
|
|
1530
|
+
searchPlaceholder: "Søk i videoer",
|
|
1531
|
+
searchButtonTitle: "Søk",
|
|
1532
|
+
loadMoreVideos: "Last flere videoer",
|
|
1533
|
+
noResults: "Ingen videoer funnet",
|
|
1534
|
+
addVideo: "Bruk video",
|
|
1535
|
+
previewVideo: "Forhåndsvis",
|
|
1536
|
+
is360Video: "VR-video",
|
|
1537
|
+
close: "Lukk",
|
|
1538
|
+
},
|
|
1529
1539
|
},
|
|
1530
1540
|
};
|
|
1531
1541
|
|
|
@@ -1525,6 +1525,16 @@ const messages = {
|
|
|
1525
1525
|
useAudio: "Velg lyd",
|
|
1526
1526
|
noResults: "Ingen resultat funnet",
|
|
1527
1527
|
},
|
|
1528
|
+
videoSearch: {
|
|
1529
|
+
searchPlaceholder: "Søk i videoar",
|
|
1530
|
+
searchButtonTitle: "Søk",
|
|
1531
|
+
loadMoreVideos: "Last fleire videoar",
|
|
1532
|
+
noResults: "Ingen videoar funnet",
|
|
1533
|
+
addVideo: "Bruk video",
|
|
1534
|
+
previewVideo: "Førehandsvis",
|
|
1535
|
+
is360Video: "VR-video",
|
|
1536
|
+
close: "Lukk",
|
|
1537
|
+
},
|
|
1528
1538
|
},
|
|
1529
1539
|
};
|
|
1530
1540
|
|
|
@@ -1528,6 +1528,16 @@ const messages = {
|
|
|
1528
1528
|
useAudio: "Velg lyd",
|
|
1529
1529
|
noResults: "Ingen resultater funnet",
|
|
1530
1530
|
},
|
|
1531
|
+
videoSearch: {
|
|
1532
|
+
searchPlaceholder: "Søk i videoar",
|
|
1533
|
+
searchButtonTitle: "Søk",
|
|
1534
|
+
loadMoreVideos: "Last fleire videoar",
|
|
1535
|
+
noResults: "Ingen videoar funnet",
|
|
1536
|
+
addVideo: "Bruk video",
|
|
1537
|
+
previewVideo: "Forhåndsvis",
|
|
1538
|
+
is360Video: "VR-video",
|
|
1539
|
+
close: "Lukk",
|
|
1540
|
+
},
|
|
1531
1541
|
},
|
|
1532
1542
|
};
|
|
1533
1543
|
|
|
@@ -1530,6 +1530,16 @@ const messages = {
|
|
|
1530
1530
|
useAudio: "Velg lyd",
|
|
1531
1531
|
noResults: "Ingen resultater funnet",
|
|
1532
1532
|
},
|
|
1533
|
+
videoSearch: {
|
|
1534
|
+
searchPlaceholder: "Søk i videoar",
|
|
1535
|
+
searchButtonTitle: "Søk",
|
|
1536
|
+
loadMoreVideos: "Last fleire videoar",
|
|
1537
|
+
noResults: "Ingen videoar funnet",
|
|
1538
|
+
addVideo: "Bruk video",
|
|
1539
|
+
previewVideo: "Forhåndsvis",
|
|
1540
|
+
is360Video: "VR-video",
|
|
1541
|
+
close: "Lukk",
|
|
1542
|
+
},
|
|
1533
1543
|
},
|
|
1534
1544
|
};
|
|
1535
1545
|
|