@saooti/octopus-sdk 37.0.5 → 37.0.7
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/README.md +2 -2
- package/index.html +1 -0
- package/index.ts +21 -21
- package/package.json +26 -20
- package/public/css/fonts/icomoon.eot +0 -0
- package/public/css/fonts/icomoon.svg +1 -1
- package/public/css/fonts/icomoon.ttf +0 -0
- package/public/css/fonts/icomoon.woff +0 -0
- package/public/css/fonts/montserrat/Montserrat-Black.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-BlackItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Bold.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-BoldItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraBold.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraBoldItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraLight.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ExtraLightItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Italic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Light.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-LightItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Medium.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-MediumItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Regular.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-SemiBold.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-SemiBoldItalic.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-Thin.ttf +0 -0
- package/public/css/fonts/montserrat/Montserrat-ThinItalic.ttf +0 -0
- package/public/css/fonts/montserrat/style.css +28 -0
- package/public/css/fonts/style.css +5 -5
- package/src/App.vue +69 -60
- package/src/api/classicCrud.ts +12 -12
- package/src/api/initialize.ts +1 -1
- package/src/assets/bootstrap.scss +9 -0
- package/src/assets/general.scss +1 -1
- package/src/assets/share.scss +1 -1
- package/src/components/display/aggregator/RssSection.vue +3 -3
- package/src/components/display/categories/CategoryChooser.vue +73 -60
- package/src/components/display/categories/CategoryFilter.vue +134 -90
- package/src/components/display/categories/CategoryList.vue +76 -62
- package/src/components/display/comments/AddCommentModal.vue +44 -44
- package/src/components/display/comments/CommentBasicView.vue +38 -30
- package/src/components/display/comments/CommentInput.vue +122 -110
- package/src/components/display/comments/CommentItem.vue +144 -102
- package/src/components/display/comments/CommentList.vue +117 -85
- package/src/components/display/comments/CommentParentInfo.vue +18 -15
- package/src/components/display/comments/CommentPlayer.vue +39 -41
- package/src/components/display/comments/CommentSection.vue +68 -53
- package/src/components/display/edit/EditBox.vue +7 -7
- package/src/components/display/edit/EditBoxRadio.vue +3 -4
- package/src/components/display/edit/EditCommentBox.vue +34 -36
- package/src/components/display/emission/EmissionInlineList.vue +75 -63
- package/src/components/display/emission/EmissionItem.vue +47 -35
- package/src/components/display/emission/EmissionList.vue +111 -83
- package/src/components/display/emission/EmissionPlayerItem.vue +89 -89
- package/src/components/display/filter/AdvancedSearch.vue +81 -73
- package/src/components/display/filter/CategorySearchFilter.vue +27 -25
- package/src/components/display/filter/DateFilter.vue +38 -38
- package/src/components/display/filter/MonetizableFilter.vue +16 -14
- package/src/components/display/filter/ProductorSearch.vue +55 -47
- package/src/components/display/filter/RubriqueChoice.vue +42 -27
- package/src/components/display/filter/RubriqueFilter.vue +130 -85
- package/src/components/display/filter/SearchOrder.vue +16 -11
- package/src/components/display/list/ListPaginate.vue +72 -70
- package/src/components/display/list/PaginateParams.vue +29 -30
- package/src/components/display/list/PaginateSection.vue +210 -0
- package/src/components/display/list/SwiperList.vue +28 -32
- package/src/components/display/live/CountDown.vue +12 -14
- package/src/components/display/live/LiveHorizontalList.vue +60 -50
- package/src/components/display/live/LiveItem.vue +42 -26
- package/src/components/display/live/LiveList.vue +92 -65
- package/src/components/display/live/RadioCurrently.vue +47 -42
- package/src/components/display/live/RadioImage.vue +40 -42
- package/src/components/display/live/RadioItem.vue +15 -22
- package/src/components/display/live/RadioList.vue +24 -21
- package/src/components/display/live/RadioPlanning.vue +105 -68
- package/src/components/display/organisation/OrganisationChooser.vue +58 -42
- package/src/components/display/organisation/OrganisationChooserLight.vue +27 -19
- package/src/components/display/participant/ParticipantItem.vue +89 -76
- package/src/components/display/participant/ParticipantList.vue +90 -60
- package/src/components/display/playlist/PlaylistItem.vue +32 -35
- package/src/components/display/playlist/PlaylistList.vue +70 -52
- package/src/components/display/playlist/PodcastList.vue +61 -50
- package/src/components/display/playlist/PodcastPlaylistInlineList.vue +47 -38
- package/src/components/display/podcasts/AnimatorsItem.vue +17 -15
- package/src/components/display/podcasts/ParticipantDescription.vue +21 -22
- package/src/components/display/podcasts/PodcastFilterList.vue +28 -26
- package/src/components/display/podcasts/PodcastImage.vue +129 -138
- package/src/components/display/podcasts/PodcastInlineList.vue +33 -29
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +91 -71
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +94 -85
- package/src/components/display/podcasts/PodcastItem.vue +96 -90
- package/src/components/display/podcasts/PodcastItemInfo.vue +63 -65
- package/src/components/display/podcasts/PodcastList.vue +115 -84
- package/src/components/display/podcasts/PodcastModuleBox.vue +95 -104
- package/src/components/display/podcasts/PodcastPlayBar.vue +45 -32
- package/src/components/display/podcasts/PodcastSwiperList.vue +65 -55
- package/src/components/display/podcasts/TagList.vue +33 -37
- package/src/components/display/rubriques/RubriqueChooser.vue +70 -51
- package/src/components/display/rubriques/RubriqueList.vue +117 -89
- package/src/components/display/sharing/PlayerParameters.vue +45 -42
- package/src/components/display/sharing/QrCode.vue +52 -46
- package/src/components/display/sharing/ShareButtons.vue +25 -27
- package/src/components/display/sharing/ShareButtonsIntern.vue +182 -155
- package/src/components/display/sharing/ShareDistribution.vue +101 -67
- package/src/components/display/sharing/SharePlayer.vue +207 -127
- package/src/components/display/sharing/SharePlayerColors.vue +15 -15
- package/src/components/display/sharing/SharePlayerRadio.vue +62 -39
- package/src/components/display/sharing/SharePlayerTypes.vue +93 -55
- package/src/components/display/sharing/SubscribeButtons.vue +83 -32
- package/src/components/display/studio/RecordingItemButton.vue +3 -3
- package/src/components/form/ClassicCheckbox.vue +32 -31
- package/src/components/form/ClassicDatePicker.vue +47 -49
- package/src/components/form/ClassicInputText.vue +99 -98
- package/src/components/form/ClassicLoading.vue +11 -14
- package/src/components/form/ClassicMultiselect.vue +125 -126
- package/src/components/form/ClassicRadio.vue +15 -18
- package/src/components/form/ClassicSearch.vue +17 -23
- package/src/components/form/ClassicSelect.vue +35 -27
- package/src/components/form/{Wysiwyg.vue → ClassicWysiwyg.vue} +94 -109
- package/src/components/misc/AcpmImage.vue +26 -0
- package/src/components/misc/ClassicAccordion.vue +69 -0
- package/src/components/misc/ClassicNav.vue +117 -0
- package/src/components/misc/ClassicPopover.vue +212 -0
- package/src/components/misc/{Spinner.vue → ClassicSpinner.vue} +14 -15
- package/src/components/misc/ErrorMessage.vue +9 -17
- package/src/components/misc/FooterSection.vue +198 -0
- package/src/components/misc/HomeDropdown.vue +67 -64
- package/src/components/misc/LeftMenu.vue +115 -79
- package/src/components/misc/ProgressBar.vue +36 -32
- package/src/components/misc/SnackBar.vue +169 -0
- package/src/components/misc/TopBar.vue +161 -115
- package/src/components/misc/modal/ClassicModal.vue +99 -103
- package/src/components/misc/modal/ClipboardModal.vue +21 -23
- package/src/components/misc/modal/MessageModal.vue +22 -28
- package/src/components/misc/modal/NewsletterModal.vue +139 -113
- package/src/components/misc/modal/QrCodeModal.vue +14 -17
- package/src/components/misc/modal/ShareModalPlayer.vue +44 -60
- package/src/components/misc/player/PlayerCompact.vue +47 -62
- package/src/components/misc/player/{Player.vue → PlayerComponent.vue} +54 -46
- package/src/components/misc/player/PlayerLarge.vue +66 -62
- package/src/components/misc/player/PlayerProgressBar.vue +40 -30
- package/src/components/misc/player/PlayerTimeline.vue +32 -36
- package/src/components/misc/player/radio/RadioHistory.vue +62 -59
- package/src/components/misc/player/radio/RadioProgressBar.vue +44 -35
- package/src/components/mixins/cookies.ts +11 -10
- package/src/components/mixins/displayMethods.ts +5 -4
- package/src/components/mixins/handle403.ts +9 -9
- package/src/components/mixins/imageProxy.ts +14 -7
- package/src/components/mixins/init.ts +31 -16
- package/src/components/mixins/orgaComputed.ts +7 -7
- package/src/components/mixins/organisationFilter.ts +36 -22
- package/src/components/mixins/player/playerComment.ts +46 -37
- package/src/components/mixins/player/playerDisplay.ts +122 -87
- package/src/components/mixins/player/playerLive.ts +65 -43
- package/src/components/mixins/player/playerLogic.ts +133 -88
- package/src/components/mixins/player/playerTranscript.ts +48 -30
- package/src/components/mixins/radio/fetchRadioData.ts +40 -23
- package/src/components/mixins/selenium.ts +2 -2
- package/src/components/mixins/tagOfMixins.ts +11 -11
- package/src/components/pages/CategoryPage.vue +43 -0
- package/src/components/pages/{Emission.vue → EmissionPage.vue} +98 -67
- package/src/components/pages/{Emissions.vue → EmissionsPage.vue} +51 -44
- package/src/components/pages/Error403Page.vue +20 -19
- package/src/components/pages/HomePage.vue +144 -0
- package/src/components/pages/LivesPage.vue +66 -0
- package/src/components/pages/PageNotFound.vue +33 -22
- package/src/components/pages/{Participant.vue → ParticipantPage.vue} +63 -49
- package/src/components/pages/{Participants.vue → ParticipantsPage.vue} +9 -9
- package/src/components/pages/PlaylistPage.vue +175 -0
- package/src/components/pages/{Playlists.vue → PlaylistsPage.vue} +16 -14
- package/src/components/pages/PodcastPage.vue +365 -0
- package/src/components/pages/PodcastsPage.vue +152 -0
- package/src/components/pages/RadioPage.vue +131 -0
- package/src/components/pages/RubriquePage.vue +45 -0
- package/src/components/pages/{Search.vue → SearchPage.vue} +19 -19
- package/src/helper/dom.ts +1 -1
- package/src/helper/duration.ts +10 -4
- package/src/helper/useEventListener.ts +7 -8
- package/src/i18n.ts +31 -30
- package/src/locale/de.ts +263 -257
- package/src/locale/educationen.ts +13 -13
- package/src/locale/educationfr.ts +1 -1
- package/src/locale/en.ts +323 -324
- package/src/locale/es.ts +325 -318
- package/src/locale/fr.ts +330 -324
- package/src/locale/it.ts +332 -328
- package/src/locale/messages.ts +9 -9
- package/src/locale/sl.ts +315 -319
- package/src/main.ts +28 -31
- package/src/router/router.ts +218 -198
- package/src/shims-tsx.d.ts +1 -1
- package/src/shims-vue.d.ts +1 -1
- package/src/stores/ApiStore.ts +44 -44
- package/src/stores/AuthStore.ts +24 -16
- package/src/stores/CommentStore.ts +13 -11
- package/src/stores/FilterStore.ts +25 -15
- package/src/stores/GeneralStore.ts +15 -15
- package/src/stores/ParamSdkStore.ts +179 -137
- package/src/stores/PlayerStore.ts +139 -125
- package/src/stores/class/adserver/adserverConfig.ts +1 -1
- package/src/stores/class/adserver/adserverOtherEmission.ts +9 -9
- package/src/stores/class/cartouchier/cartouche.ts +4 -4
- package/src/stores/class/cartouchier/cartouchier.ts +2 -2
- package/src/stores/class/conference/conference.ts +10 -9
- package/src/stores/class/conference/conferenceMessage.ts +2 -2
- package/src/stores/class/conference/conferenceParticipant.ts +1 -1
- package/src/stores/class/conference/studioCall.ts +6 -6
- package/src/stores/class/contract/contractOrganisation.ts +5 -5
- package/src/stores/class/ftp/ftpEmission.ts +9 -9
- package/src/stores/class/ftp/testFtpEmission.ts +4 -4
- package/src/stores/class/general/audioView.ts +19 -19
- package/src/stores/class/general/category.ts +1 -1
- package/src/stores/class/general/classicSelectType.ts +2 -3
- package/src/stores/class/general/customPlayer.ts +8 -8
- package/src/stores/class/general/emission.ts +20 -21
- package/src/stores/class/general/fetchParam.ts +8 -2
- package/src/stores/class/general/initState.ts +31 -31
- package/src/stores/class/general/interfacePageable.ts +13 -13
- package/src/stores/class/general/ituneCategory.ts +4 -4
- package/src/stores/class/general/listReturn.ts +12 -12
- package/src/stores/class/general/media.ts +7 -7
- package/src/stores/class/general/organisation.ts +9 -10
- package/src/stores/class/general/pageable.ts +10 -10
- package/src/stores/class/general/participant.ts +7 -7
- package/src/stores/class/general/player.ts +30 -28
- package/src/stores/class/general/playlist.ts +17 -19
- package/src/stores/class/general/podcast.ts +19 -19
- package/src/stores/class/general/sortPageable.ts +4 -4
- package/src/stores/class/general/soundcastCategory.ts +7 -7
- package/src/stores/class/ouestFrance/ofTag.ts +34 -34
- package/src/stores/class/ouestFrance/ofTagInfo.ts +9 -9
- package/src/stores/class/ouestFrance/ofTagPage.ts +7 -7
- package/src/stores/class/ouestFrance/ofTagSeo.ts +7 -7
- package/src/stores/class/ouestFrance/ofTagVente.ts +6 -6
- package/src/stores/class/ouestFrance/ofTagWithParents.ts +20 -20
- package/src/stores/class/radio/canal.ts +4 -4
- package/src/stores/class/radio/live.ts +6 -6
- package/src/stores/class/radio/mix.ts +16 -16
- package/src/stores/class/radio/playlistMedia.ts +7 -7
- package/src/stores/class/radio/recurrence.ts +54 -54
- package/src/stores/class/rss/rssEmission.ts +13 -13
- package/src/stores/class/rss/rssInfo.ts +7 -7
- package/src/stores/class/rubrique/rubriquage.ts +2 -2
- package/src/stores/class/rubrique/rubrique.ts +1 -1
- package/src/stores/class/stat/statArrayIncome.ts +5 -5
- package/src/stores/class/stat/statArrayObject.ts +26 -26
- package/src/stores/class/stat/statGraph.ts +6 -6
- package/src/stores/class/user/person.ts +4 -2
- package/src/stores/class/user/profile.ts +4 -2
- package/src/stores/class/user/userKeycloak.ts +4 -5
- package/src/components/display/list/Paginate.vue +0 -181
- package/src/components/misc/Accordion.vue +0 -78
- package/src/components/misc/Footer.vue +0 -165
- package/src/components/misc/Nav.vue +0 -119
- package/src/components/misc/Popover.vue +0 -193
- package/src/components/misc/Snackbar.vue +0 -168
- package/src/components/pages/Category.vue +0 -41
- package/src/components/pages/Home.vue +0 -125
- package/src/components/pages/Lives.vue +0 -64
- package/src/components/pages/Playlist.vue +0 -164
- package/src/components/pages/Podcast.vue +0 -307
- package/src/components/pages/Podcasts.vue +0 -146
- package/src/components/pages/Radio.vue +0 -122
- package/src/components/pages/Rubrique.vue +0 -42
|
@@ -13,48 +13,48 @@
|
|
|
13
13
|
:query="query"
|
|
14
14
|
:first="0"
|
|
15
15
|
:size="20"
|
|
16
|
-
@
|
|
16
|
+
@empty-list="noResult = true"
|
|
17
17
|
/>
|
|
18
18
|
</div>
|
|
19
19
|
</template>
|
|
20
20
|
|
|
21
21
|
<script lang="ts">
|
|
22
|
-
import { state } from
|
|
23
|
-
import ClassicSearch from
|
|
24
|
-
import PodcastList from
|
|
25
|
-
import { defineComponent } from
|
|
22
|
+
import { state } from "../../stores/ParamSdkStore";
|
|
23
|
+
import ClassicSearch from "../form/ClassicSearch.vue";
|
|
24
|
+
import PodcastList from "../display/podcasts/PodcastList.vue";
|
|
25
|
+
import { defineComponent } from "vue";
|
|
26
26
|
export default defineComponent({
|
|
27
|
-
name: "
|
|
27
|
+
name: "SearchPage",
|
|
28
28
|
components: {
|
|
29
29
|
PodcastList,
|
|
30
|
-
ClassicSearch
|
|
30
|
+
ClassicSearch,
|
|
31
31
|
},
|
|
32
32
|
props: {
|
|
33
|
-
queryRoute: { default:
|
|
33
|
+
queryRoute: { default: "", type: String },
|
|
34
34
|
},
|
|
35
35
|
data() {
|
|
36
36
|
return {
|
|
37
|
-
rawQuery:
|
|
37
|
+
rawQuery: "" as string,
|
|
38
38
|
noResult: false as boolean,
|
|
39
39
|
};
|
|
40
40
|
},
|
|
41
41
|
computed: {
|
|
42
|
-
titlePage():string{
|
|
43
|
-
if(!this.hideBar){
|
|
44
|
-
return this.$t(
|
|
42
|
+
titlePage(): string {
|
|
43
|
+
if (!this.hideBar) {
|
|
44
|
+
return this.$t("Podcast search");
|
|
45
45
|
}
|
|
46
|
-
const locale = !this.noResult ?
|
|
46
|
+
const locale = !this.noResult ? "Search results" : "Search - no results";
|
|
47
47
|
return this.$t(locale, { query: this.rawQuery });
|
|
48
48
|
},
|
|
49
49
|
query(): string {
|
|
50
|
-
return this.rawQuery && this.rawQuery.length >= 3 ? this.rawQuery :
|
|
50
|
+
return this.rawQuery && this.rawQuery.length >= 3 ? this.rawQuery : "";
|
|
51
51
|
},
|
|
52
52
|
hideBar(): boolean {
|
|
53
|
-
return
|
|
53
|
+
return state.searchPage.hideBar as boolean;
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
watch: {
|
|
57
|
-
rawQuery(): void{
|
|
57
|
+
rawQuery(): void {
|
|
58
58
|
if (this.hideBar) {
|
|
59
59
|
this.noResult = false;
|
|
60
60
|
}
|
|
@@ -62,9 +62,9 @@ export default defineComponent({
|
|
|
62
62
|
queryRoute: {
|
|
63
63
|
immediate: true,
|
|
64
64
|
handler() {
|
|
65
|
-
|
|
65
|
+
this.rawQuery = this.queryRoute;
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
|
-
})
|
|
70
|
-
</script>
|
|
69
|
+
});
|
|
70
|
+
</script>
|
package/src/helper/dom.ts
CHANGED
package/src/helper/duration.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
formatToString(value: number){
|
|
2
|
+
formatToString(value: number) {
|
|
3
3
|
if (value < 10) {
|
|
4
|
-
return
|
|
4
|
+
return "0" + value;
|
|
5
5
|
}
|
|
6
6
|
return value.toString();
|
|
7
7
|
},
|
|
@@ -9,6 +9,12 @@ export default {
|
|
|
9
9
|
const hours = Math.floor(totalSeconds / 3600);
|
|
10
10
|
const minutes = Math.floor((totalSeconds - hours * 3600) / 60);
|
|
11
11
|
const seconds = totalSeconds - hours * 3600 - minutes * 60;
|
|
12
|
-
return (
|
|
12
|
+
return (
|
|
13
|
+
(hours > 0 ? this.formatToString(hours) + "'" : "") +
|
|
14
|
+
this.formatToString(minutes) +
|
|
15
|
+
"'" +
|
|
16
|
+
this.formatToString(seconds) +
|
|
17
|
+
"''"
|
|
18
|
+
);
|
|
13
19
|
},
|
|
14
|
-
};
|
|
20
|
+
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
import {onBeforeUnmount, onMounted, Ref} from 'vue'
|
|
1
|
+
import { onBeforeUnmount, onMounted, Ref } from "vue";
|
|
3
2
|
|
|
4
3
|
function useEventListener(
|
|
5
4
|
element: Ref<HTMLElement | undefined>,
|
|
6
5
|
event: string,
|
|
7
|
-
callback: EventListener
|
|
6
|
+
callback: EventListener,
|
|
8
7
|
): void {
|
|
9
8
|
onMounted(() => {
|
|
10
|
-
element?.value?.addEventListener(event, callback)
|
|
11
|
-
})
|
|
9
|
+
element?.value?.addEventListener(event, callback);
|
|
10
|
+
});
|
|
12
11
|
|
|
13
12
|
onBeforeUnmount(() => {
|
|
14
|
-
element?.value?.removeEventListener(event, callback)
|
|
15
|
-
})
|
|
13
|
+
element?.value?.removeEventListener(event, callback);
|
|
14
|
+
});
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
export default useEventListener
|
|
17
|
+
export default useEventListener;
|
package/src/i18n.ts
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import dayjs
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import 'dayjs/locale/sl';
|
|
1
|
+
import { nextTick } from "vue";
|
|
2
|
+
import { createI18n } from "vue-i18n";
|
|
3
|
+
import dayjs from "dayjs";
|
|
4
|
+
import "dayjs/locale/de";
|
|
5
|
+
import "dayjs/locale/es";
|
|
6
|
+
import "dayjs/locale/fr";
|
|
7
|
+
import "dayjs/locale/it";
|
|
8
|
+
import "dayjs/locale/sl";
|
|
10
9
|
|
|
11
10
|
export function setupI18n(options: { locale: string }, isEducation: boolean) {
|
|
12
|
-
const i18n = createI18n(options)
|
|
11
|
+
const i18n = createI18n(options);
|
|
13
12
|
loadLocaleMessages(i18n.global, options.locale, isEducation);
|
|
14
13
|
return i18n;
|
|
15
14
|
}
|
|
@@ -17,27 +16,29 @@ export function setupI18n(options: { locale: string }, isEducation: boolean) {
|
|
|
17
16
|
export function setI18nLanguage(i18n: any, locale: string) {
|
|
18
17
|
i18n.locale = locale;
|
|
19
18
|
dayjs.locale(locale);
|
|
20
|
-
const html= document.querySelector(
|
|
21
|
-
if(html){
|
|
22
|
-
html.setAttribute(
|
|
19
|
+
const html = document.querySelector("html");
|
|
20
|
+
if (html) {
|
|
21
|
+
html.setAttribute("lang", locale);
|
|
23
22
|
}
|
|
24
23
|
}
|
|
25
24
|
|
|
26
|
-
export async function loadLocaleMessages(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
25
|
+
export async function loadLocaleMessages(
|
|
26
|
+
i18n: any,
|
|
27
|
+
locale: string,
|
|
28
|
+
isEducation: boolean,
|
|
29
|
+
) {
|
|
30
|
+
if (
|
|
31
|
+
!i18n.messages[locale] ||
|
|
32
|
+
0 === Object.keys(i18n.messages[locale]).length
|
|
33
|
+
) {
|
|
34
|
+
let messages = await import(`./locale/${locale}.ts`);
|
|
35
|
+
messages = messages.default;
|
|
36
|
+
if (isEducation && ("fr" === locale || "en" === locale)) {
|
|
37
|
+
const messagesEdu = await import(`./locale/education${locale}.ts`);
|
|
38
|
+
messages = { ...messages, ...messagesEdu.default };
|
|
39
|
+
}
|
|
40
|
+
i18n.setLocaleMessage(locale, messages);
|
|
41
|
+
}
|
|
42
|
+
setI18nLanguage(i18n, locale);
|
|
42
43
|
return nextTick();
|
|
43
|
-
}
|
|
44
|
+
}
|