erudit 4.0.0-dev.3 → 4.0.0-dev.5
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/.nuxtrc +1 -1
- package/app/app.vue +34 -34
- package/app/components/EruditLink.ts +7 -7
- package/app/components/FancyBold.vue +16 -16
- package/app/components/FancyCard.vue +52 -58
- package/app/components/FancyCardTag.vue +16 -16
- package/app/components/Loading.vue +7 -0
- package/app/components/Prose.vue +55 -51
- package/app/components/ScrollHolder.vue +13 -13
- package/app/components/SmartMedia.vue +107 -112
- package/app/components/ads/Ads.vue +17 -17
- package/app/components/ads/AdsBannerAside.vue +29 -29
- package/app/components/ads/AdsBannerBottom.vue +6 -6
- package/app/components/ads/AdsReplacer.vue +19 -21
- package/app/components/ads/provider/Custom.vue +9 -9
- package/app/components/ads/provider/Yandex.vue +56 -56
- package/app/components/aside/AsideListItem.vue +47 -52
- package/app/components/aside/AsideMajor.vue +6 -6
- package/app/components/aside/AsideMinor.vue +47 -55
- package/app/components/aside/AsidePlainMessage.vue +9 -9
- package/app/components/aside/AsideSwitch.vue +53 -54
- package/app/components/aside/major/PaneHolder.vue +61 -61
- package/app/components/aside/major/PaneSwitcher.vue +50 -55
- package/app/components/aside/major/PaneSwitcherButton.vue +24 -24
- package/app/components/aside/major/PaneTemplate.vue +3 -3
- package/app/components/aside/major/SiteInfo.vue +40 -42
- package/app/components/aside/major/contentNav/PaneBookNav.vue +107 -116
- package/app/components/aside/major/contentNav/PaneGlobalNav.vue +19 -19
- package/app/components/aside/major/contentNav/items/ContentNavBook.vue +8 -8
- package/app/components/aside/major/contentNav/items/ContentNavFolder.vue +55 -56
- package/app/components/aside/major/contentNav/items/ContentNavItem.vue +16 -16
- package/app/components/aside/major/contentNav/items/ContentNavPage.vue +2 -6
- package/app/components/aside/major/contentNav/items/ContentNavSeparator.vue +34 -35
- package/app/components/aside/major/contentNav/items/ContentNavTopic.vue +6 -6
- package/app/components/aside/major/contentNav/items/Flags.vue +31 -33
- package/app/components/aside/major/contentNav/items/ItemTemplate.vue +13 -13
- package/app/components/aside/major/languages/PaneLanguages.vue +40 -40
- package/app/components/aside/major/pages/PanePages.vue +45 -45
- package/app/components/aside/major/search/PaneSearch.vue +111 -100
- package/app/components/aside/major/search/SearchInput.vue +52 -53
- package/app/components/aside/major/search/SearchResult.vue +125 -74
- package/app/components/aside/major/search/SearchStatus.vue +28 -28
- package/app/components/aside/major/search/search.worker.ts +129 -129
- package/app/components/aside/major/settings/BuildTime.vue +15 -15
- package/app/components/aside/major/settings/EngineVersion.vue +8 -7
- package/app/components/aside/major/settings/PaneSettings.vue +8 -8
- package/app/components/aside/major/settings/ThemeSwitcher.vue +38 -36
- package/app/components/aside/major/settings/repository/Repository.vue +18 -18
- package/app/components/aside/major/settings/repository/SecondaryGitHub.vue +47 -47
- package/app/components/aside/minor/AsideMinorPane.vue +5 -5
- package/app/components/aside/minor/AsideMinorPlainHeader.vue +20 -20
- package/app/components/aside/minor/content/AsideMinorContentContributions.vue +47 -51
- package/app/components/aside/minor/content/AsideMinorContentPage.vue +37 -37
- package/app/components/aside/minor/content/AsideMinorContentTopic.vue +61 -66
- package/app/components/aside/minor/content/ButtonPaneContributions.vue +101 -114
- package/app/components/aside/minor/content/ButtonPaneImprove.vue +112 -120
- package/app/components/aside/minor/content/Contribution.vue +36 -36
- package/app/components/aside/minor/content/Toc.vue +163 -163
- package/app/components/aside/minor/content/TocItem.vue +91 -91
- package/app/components/aside/minor/content/TopicPartButton.vue +35 -35
- package/app/components/aside/minor/contributor/AsideMinorContributor.vue +36 -39
- package/app/components/aside/minor/contributor/ItemBook.vue +33 -39
- package/app/components/aside/minor/contributor/ItemContent.vue +17 -17
- package/app/components/aside/minor/news/AsideMinorNews.vue +132 -132
- package/app/components/aside/minor/news/NewsItem.vue +69 -69
- package/app/components/aside/minor/news/RenderNewsElement.vue +42 -42
- package/app/components/aside/minor/news/elements/Mix.vue +11 -11
- package/app/components/aside/minor/news/elements/P.vue +14 -14
- package/app/components/aside/minor/news/elements/Ref.vue +59 -58
- package/app/components/aside/minor/news/elements/Text.vue +18 -18
- package/app/components/indexPage/IndexPagePersons.vue +116 -117
- package/app/components/main/MainAction.vue +26 -20
- package/app/components/main/MainBreadcrumbs.vue +28 -28
- package/app/components/main/MainContentChild.vue +44 -47
- package/app/components/main/MainContentChildren.vue +13 -14
- package/app/components/main/MainDecoration.vue +15 -15
- package/app/components/main/MainDescription.vue +13 -13
- package/app/components/main/MainFlag.vue +129 -133
- package/app/components/main/MainFlags.vue +17 -17
- package/app/components/main/MainGlow.vue +12 -12
- package/app/components/main/MainQuickLink.vue +90 -91
- package/app/components/main/MainQuickLinks.vue +40 -40
- package/app/components/main/MainQuote.vue +149 -159
- package/app/components/main/MainQuoteLoader.vue +86 -86
- package/app/components/main/MainSection.vue +44 -44
- package/app/components/main/MainSectionPreamble.vue +5 -5
- package/app/components/main/MainSubTitle.vue +11 -12
- package/app/components/main/MainTitle.vue +32 -32
- package/app/components/main/MainTopicPartPage.vue +88 -88
- package/app/components/main/MainTopicPartSwitch.vue +67 -71
- package/app/components/main/connections/Deps.vue +30 -34
- package/app/components/main/connections/Externals.vue +80 -104
- package/app/components/main/connections/MainConnections.vue +90 -94
- package/app/components/main/connections/MainConnectionsButton.vue +81 -81
- package/app/components/main/connections/ScrollPane.vue +10 -10
- package/app/components/main/contentStats/Item.vue +28 -34
- package/app/components/main/contentStats/ItemElement.vue +19 -19
- package/app/components/main/contentStats/ItemMaterials.vue +11 -11
- package/app/components/main/contentStats/MainContentStats.vue +50 -53
- package/app/components/preview/Preview.vue +110 -121
- package/app/components/preview/PreviewError.vue +4 -4
- package/app/components/preview/PreviewLoading.vue +3 -3
- package/app/components/preview/PreviewScreen.vue +48 -48
- package/app/components/preview/PreviewScreenButton.vue +27 -27
- package/app/components/preview/screen/ContentPage.vue +27 -30
- package/app/components/preview/screen/DirectLink.vue +13 -13
- package/app/components/preview/screen/Unique.vue +31 -32
- package/app/components/site/SiteAside.vue +50 -51
- package/app/components/site/SiteAsideOverlay.vue +8 -8
- package/app/components/site/SiteMain.vue +11 -11
- package/app/components/transition/Fade.vue +16 -16
- package/app/components/transition/Slide.vue +27 -27
- package/app/components/tree/TreeContainer.vue +3 -3
- package/app/components/tree/TreeItem.vue +27 -31
- package/app/composables/ads.ts +11 -11
- package/app/composables/analytics.ts +102 -102
- package/app/composables/appElements.ts +21 -21
- package/app/composables/aside.ts +15 -15
- package/app/composables/asideMajorPane.ts +82 -82
- package/app/composables/asideMinor.ts +109 -109
- package/app/composables/contentNav.ts +7 -7
- package/app/composables/favicon.ts +103 -108
- package/app/composables/file.ts +4 -3
- package/app/composables/formatText.ts +100 -100
- package/app/composables/loading.ts +26 -2
- package/app/composables/mainContent.ts +22 -22
- package/app/composables/og.ts +184 -182
- package/app/composables/phrases.ts +98 -98
- package/app/composables/preview.ts +44 -44
- package/app/composables/route.ts +4 -2
- package/app/composables/theme.ts +47 -51
- package/app/composables/url.ts +19 -11
- package/app/formatters/ru.ts +14 -14
- package/app/pages/article/[...articleId].vue +12 -12
- package/app/pages/book/[...bookId].vue +56 -56
- package/app/pages/contributor/[contributorId].vue +144 -150
- package/app/pages/contributors.vue +95 -99
- package/app/pages/group/[...groupId].vue +58 -58
- package/app/pages/index.vue +113 -117
- package/app/pages/page/[...pageId].vue +60 -60
- package/app/pages/practice/[...practiceId].vue +12 -12
- package/app/pages/sponsors.vue +88 -91
- package/app/pages/summary/[...summaryId].vue +12 -12
- package/app/plugins/appSetup/client/htmlBranding.ts +6 -6
- package/app/plugins/appSetup/client/welcome.ts +37 -35
- package/app/plugins/appSetup/config.ts +6 -6
- package/app/plugins/appSetup/global.ts +3 -3
- package/app/plugins/appSetup/index.ts +27 -28
- package/app/plugins/prerender.server.ts +40 -40
- package/app/router.options.ts +5 -5
- package/app/scripts/theme.js +21 -24
- package/app/styles/main.css +128 -124
- package/bin/erudit.js +12 -0
- package/modules/erudit/env.ts +8 -0
- package/modules/erudit/globals/content.ts +4 -4
- package/modules/erudit/globals/contributor.ts +1 -1
- package/modules/erudit/globals/eruditConfig.ts +5 -10
- package/modules/erudit/globals/problem.ts +1 -1
- package/modules/erudit/globals/prose.ts +1 -1
- package/modules/erudit/globals/public.ts +18 -18
- package/modules/erudit/index.ts +50 -60
- package/modules/erudit/logger.ts +10 -10
- package/modules/erudit/setup/elements/appTemplate.ts +44 -45
- package/modules/erudit/setup/elements/globalTemplate.ts +82 -82
- package/modules/erudit/setup/elements/globalTypes.ts +259 -273
- package/modules/erudit/setup/elements/setup.ts +163 -167
- package/modules/erudit/setup/elements/shared.ts +10 -10
- package/modules/erudit/setup/elements/tagsTable.ts +28 -28
- package/modules/erudit/setup/fullRestart.ts +61 -71
- package/modules/erudit/setup/globals.ts +206 -196
- package/modules/erudit/setup/publicAssets.ts +43 -52
- package/modules/erudit/setup/runtimeConfig.ts +106 -58
- package/modules/erudit/watcher.ts +20 -27
- package/nuxt.config.ts +102 -84
- package/package.json +51 -55
- package/server/api/aside/major/frontNav/book/[...shortId].ts +10 -10
- package/server/api/aside/major/frontNav/global.ts +5 -5
- package/server/api/aside/major/pages.ts +6 -6
- package/server/api/contributor/list.ts +60 -61
- package/server/api/contributor/page/[contributorId].ts +68 -68
- package/server/api/indexPage.ts +81 -81
- package/server/api/language/functions.ts +11 -11
- package/server/api/language/phrase/[phraseKey].ts +35 -35
- package/server/api/main/content/[...contentTypePath].ts +149 -153
- package/server/api/news/batch/[batchIndex].ts +5 -5
- package/server/api/pageSponsors.ts +56 -58
- package/server/api/prerender/content.ts +79 -82
- package/server/api/prerender/default.ts +35 -35
- package/server/api/prerender/files.ts +10 -10
- package/server/api/prerender/frontNav.ts +13 -13
- package/server/api/prerender/language.ts +7 -7
- package/server/api/prerender/news.ts +8 -8
- package/server/api/prerender/quotes.ts +15 -15
- package/server/api/preview/contentPage/[...contentTypePath].ts +63 -63
- package/server/api/preview/contentUnique/[...contentTypePathUnique].ts +73 -81
- package/server/api/problemScript/[...problemScriptPath].ts +88 -92
- package/server/api/quote/data/[quoteId].ts +84 -87
- package/server/api/quote/ids.ts +3 -3
- package/server/erudit/build.ts +132 -137
- package/server/erudit/cameos/build.ts +161 -161
- package/server/erudit/config.ts +13 -13
- package/server/erudit/content/global/build.ts +300 -297
- package/server/erudit/content/global/singleton.ts +5 -5
- package/server/erudit/content/nav/build.ts +459 -463
- package/server/erudit/content/nav/front.ts +125 -127
- package/server/erudit/content/nav/repository/books.ts +37 -40
- package/server/erudit/content/nav/repository/get.ts +33 -33
- package/server/erudit/content/nav/repository/hasChildren.ts +5 -5
- package/server/erudit/content/nav/repository/hasNav.ts +3 -3
- package/server/erudit/content/nav/repository/hasParent.ts +5 -5
- package/server/erudit/content/nav/repository/id.ts +9 -9
- package/server/erudit/content/nav/repository/index.ts +9 -9
- package/server/erudit/content/nav/repository/order.ts +14 -14
- package/server/erudit/content/nav/repository/previousNext.ts +35 -35
- package/server/erudit/content/nav/repository/walk.ts +127 -127
- package/server/erudit/content/nav/setup.ts +13 -13
- package/server/erudit/content/nav/types.ts +24 -24
- package/server/erudit/content/repository/breadcrumbs.ts +24 -24
- package/server/erudit/content/repository/children.ts +47 -47
- package/server/erudit/content/repository/connections.ts +35 -35
- package/server/erudit/content/repository/contentLink.ts +16 -16
- package/server/erudit/content/repository/decoration.ts +23 -23
- package/server/erudit/content/repository/deps.ts +121 -84
- package/server/erudit/content/repository/description.ts +11 -11
- package/server/erudit/content/repository/elementSnippets.ts +105 -105
- package/server/erudit/content/repository/externals.ts +50 -50
- package/server/erudit/content/repository/flags.ts +33 -33
- package/server/erudit/content/repository/seo.ts +12 -12
- package/server/erudit/content/repository/stats.ts +97 -97
- package/server/erudit/content/repository/title.ts +27 -27
- package/server/erudit/content/repository/topicParts.ts +39 -39
- package/server/erudit/content/repository/unique.ts +76 -76
- package/server/erudit/content/resolve/book.ts +29 -32
- package/server/erudit/content/resolve/group.ts +34 -39
- package/server/erudit/content/resolve/index.ts +272 -290
- package/server/erudit/content/resolve/page.ts +80 -87
- package/server/erudit/content/resolve/topic.ts +220 -246
- package/server/erudit/content/resolve/utils/contentError.ts +10 -10
- package/server/erudit/content/resolve/utils/insertContentItem.ts +113 -122
- package/server/erudit/content/resolve/utils/insertContentResolved.ts +126 -132
- package/server/erudit/content/search.ts +146 -163
- package/server/erudit/contributors/build.ts +158 -166
- package/server/erudit/contributors/global.ts +3 -3
- package/server/erudit/contributors/repository/avatarUrl.ts +10 -10
- package/server/erudit/contributors/repository/contributions.ts +171 -178
- package/server/erudit/contributors/repository/count.ts +3 -3
- package/server/erudit/contributors/search.ts +34 -34
- package/server/erudit/db/repository/pushFile.ts +23 -26
- package/server/erudit/db/repository/pushProblemScript.ts +19 -19
- package/server/erudit/db/repository/pushProseLink.ts +40 -40
- package/server/erudit/db/schema/cameos.ts +7 -7
- package/server/erudit/db/schema/content.ts +18 -18
- package/server/erudit/db/schema/contentContributions.ts +15 -15
- package/server/erudit/db/schema/contentDeps.ts +21 -21
- package/server/erudit/db/schema/contentElementStats.ts +20 -20
- package/server/erudit/db/schema/contentProseLinks.ts +23 -23
- package/server/erudit/db/schema/contentSnippets.ts +15 -15
- package/server/erudit/db/schema/contentToc.ts +16 -16
- package/server/erudit/db/schema/contentUniques.ts +19 -25
- package/server/erudit/db/schema/contributors.ts +12 -12
- package/server/erudit/db/schema/files.ts +11 -11
- package/server/erudit/db/schema/groups.ts +6 -6
- package/server/erudit/db/schema/index.ts +17 -17
- package/server/erudit/db/schema/news.ts +7 -7
- package/server/erudit/db/schema/pages.ts +7 -7
- package/server/erudit/db/schema/problemScripts.ts +14 -14
- package/server/erudit/db/schema/sponsors.ts +9 -9
- package/server/erudit/db/schema/topics.ts +9 -9
- package/server/erudit/db/setup.ts +62 -62
- package/server/erudit/db/types.ts +10 -10
- package/server/erudit/global.ts +38 -33
- package/server/erudit/importer.ts +94 -97
- package/server/erudit/index.ts +96 -90
- package/server/erudit/language/list/en.ts +116 -116
- package/server/erudit/language/list/ru.ts +120 -120
- package/server/erudit/language/list.ts +6 -6
- package/server/erudit/language/setup.ts +36 -36
- package/server/erudit/language/types.ts +16 -16
- package/server/erudit/logger.ts +73 -77
- package/server/erudit/news/build.ts +112 -114
- package/server/erudit/news/repository/batch.ts +61 -61
- package/server/erudit/path.ts +19 -0
- package/server/erudit/prose/repository/finalize.ts +68 -68
- package/server/erudit/prose/repository/get.ts +54 -54
- package/server/erudit/prose/repository/resolve.ts +17 -17
- package/server/erudit/prose/storage/callout.ts +16 -14
- package/server/erudit/prose/storage/image.ts +22 -20
- package/server/erudit/prose/storage/link.ts +222 -226
- package/server/erudit/prose/storage/problemScript.ts +23 -21
- package/server/erudit/prose/storage/video.ts +16 -14
- package/server/erudit/prose/transform/bundleProblemScript.ts +6 -6
- package/server/erudit/prose/transform/extensions.ts +15 -15
- package/server/erudit/quote/repository/ids.ts +31 -31
- package/server/erudit/repository.ts +96 -96
- package/server/erudit/sponsors/build.ts +161 -165
- package/server/erudit/sponsors/repository/avatarUrl.ts +10 -10
- package/server/erudit/sponsors/repository/count.ts +4 -4
- package/server/erudit/staticFile.ts +28 -28
- package/server/plugins/augmentCss.ts +17 -17
- package/server/plugins/lang.ts +5 -7
- package/server/plugins/metaViewport.ts +15 -15
- package/server/plugins/theme.ts +13 -13
- package/server/routes/file/[...path].ts +18 -18
- package/server/routes/robots.txt.ts +9 -9
- package/server/routes/search.json.gz.ts +76 -73
- package/server/routes/sitemap.xml.ts +83 -81
- package/shared/search/encoders.ts +10 -10
- package/shared/types/asideMajorPages.ts +2 -2
- package/shared/types/breadcrumbs.ts +3 -3
- package/shared/types/contentChildren.ts +10 -10
- package/shared/types/contentConnections.ts +27 -27
- package/shared/types/contentStats.ts +6 -6
- package/shared/types/elementSnippet.ts +14 -14
- package/shared/types/frontContentNav.ts +17 -17
- package/shared/types/indexPage.ts +20 -20
- package/shared/types/language.ts +174 -174
- package/shared/types/mainContent.ts +40 -40
- package/shared/types/news.ts +13 -13
- package/shared/types/preview.ts +28 -28
- package/shared/types/runtimeConfig.ts +29 -47
- package/shared/types/search.ts +32 -32
- package/shared/utils/contentTypePath.ts +44 -44
- package/shared/utils/icons.ts +7 -7
- package/shared/utils/pages.ts +19 -20
- package/shared/utils/stringColor.ts +8 -8
- package/shared/utils/toStringEqual.ts +13 -13
- package/shared/utils/zip.ts +64 -64
- package/test/shared/utils/zip.test.ts +8 -8
- package/tsconfig.json +15 -15
- package/bin/erudit.mjs +0 -2
- package/modules/erudit/setup/aliases.ts +0 -17
- package/modules/erudit/setup/baseUrl.ts +0 -19
- package/modules/erudit/setup/nuxtConfig.ts +0 -62
- package/modules/erudit/setup/projectConfig.ts +0 -114
- package/shared/utils/slasher.ts +0 -64
- package/test/shared/utils/slasher.test.ts +0 -75
|
@@ -1,116 +1,116 @@
|
|
|
1
|
-
export const phrases: LanguagePhrases = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
export function m(
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
1
|
+
export const phrases: LanguagePhrases = {
|
|
2
|
+
language_code: 'en',
|
|
3
|
+
language_name: 'English',
|
|
4
|
+
erudit: 'Erudit',
|
|
5
|
+
content_nav: 'Content navigation',
|
|
6
|
+
pages: 'Pages',
|
|
7
|
+
search: 'Search',
|
|
8
|
+
languages: 'Languages',
|
|
9
|
+
settings: 'Settings',
|
|
10
|
+
theme: 'Theme',
|
|
11
|
+
theme_light: 'Light',
|
|
12
|
+
theme_dark: 'Dark',
|
|
13
|
+
theme_system: 'System',
|
|
14
|
+
built: 'Built',
|
|
15
|
+
content: 'Content',
|
|
16
|
+
add_translation: 'Add translation',
|
|
17
|
+
main_page: 'Main page',
|
|
18
|
+
contributors: 'Contributors',
|
|
19
|
+
sponsors: 'Sponsors',
|
|
20
|
+
search_the_site: 'Search the site...',
|
|
21
|
+
searching_more: 'Searching more...',
|
|
22
|
+
no_results: 'No results found',
|
|
23
|
+
no_more_results: 'No more results',
|
|
24
|
+
no_content: 'No content.',
|
|
25
|
+
to_index: 'To index',
|
|
26
|
+
about_textbook: 'About textbook',
|
|
27
|
+
flag_title_dev: 'Development',
|
|
28
|
+
flag_hint_dev:
|
|
29
|
+
'This material is not complete, may contain error and will change in the future! Use with caution!',
|
|
30
|
+
flag_title_advanced: 'Advanced',
|
|
31
|
+
flag_hint_advanced:
|
|
32
|
+
'This material is for learners with a high level of knowledge. It contains information that is not suitable for beginners!',
|
|
33
|
+
flag_title_secondary: 'Additional',
|
|
34
|
+
flag_hint_secondary:
|
|
35
|
+
'This is an optional material is for learners who want to dive deeper and gain additional knowledge and context.',
|
|
36
|
+
ads_replacer:
|
|
37
|
+
'We help you. Help us back.<br><strong style="color: inherit;">Disable your ads blocker!</strong>',
|
|
38
|
+
direct_link: 'Direct link',
|
|
39
|
+
direct_link_explain: 'You are about to open a direct link:',
|
|
40
|
+
book: 'Textbook',
|
|
41
|
+
group: 'Category',
|
|
42
|
+
topic: 'Topic',
|
|
43
|
+
article: 'Article',
|
|
44
|
+
summary: 'Summary',
|
|
45
|
+
practice: 'Practice',
|
|
46
|
+
page: 'Page',
|
|
47
|
+
preview_content_page_description: 'You are about to open a content page:',
|
|
48
|
+
begin_learning: 'Begin Learning!',
|
|
49
|
+
flag_dev: 'Development',
|
|
50
|
+
flag_dev_description:
|
|
51
|
+
'This material is in development! It may change in the future and even contain errors!',
|
|
52
|
+
flag_advanced: 'Advanced',
|
|
53
|
+
flag_advanced_description:
|
|
54
|
+
'This material is for learners with a high level of knowledge. It contains information that is not suitable for beginners!',
|
|
55
|
+
flag_secondary: 'Additional',
|
|
56
|
+
flag_secondary_description:
|
|
57
|
+
'This is an optional material is for learners who want to dive deeper and gain additional knowledge and context.',
|
|
58
|
+
key_elements: 'Key elements',
|
|
59
|
+
stats: 'Statistics',
|
|
60
|
+
connections: 'Connections',
|
|
61
|
+
need_to_know: 'Need to know',
|
|
62
|
+
depends_on: 'Depends on',
|
|
63
|
+
used_by: 'Used by',
|
|
64
|
+
externals: 'Externals',
|
|
65
|
+
add_quote: 'Add your own message!',
|
|
66
|
+
next_quote: 'Next quote',
|
|
67
|
+
sponsors_description:
|
|
68
|
+
'List of people and organizations that support the project financially. Thanks to them, the project can exist and develop. If you want to help the project, you can become a sponsor and get on this page too!',
|
|
69
|
+
become_sponsor: 'Become a sponsor',
|
|
70
|
+
no_sponsors: 'There are no sponsors yet. You can be the first one!',
|
|
71
|
+
contributors_description:
|
|
72
|
+
'List of people who contributed to the project materials: suggested valuable ideas, made corrections to existing material or wrote their own!',
|
|
73
|
+
contributors_invite:
|
|
74
|
+
'You can also help the project, make a contribution and get on this page!',
|
|
75
|
+
contributor_page_description: (name: string) =>
|
|
76
|
+
`Personal page of contributor "${name}" with information about their contributions to the project.`,
|
|
77
|
+
become_contributor: 'Become a contributor',
|
|
78
|
+
no_contributors: 'There are no contributors yet. You can be the first one!',
|
|
79
|
+
contribution: 'Contribution',
|
|
80
|
+
no_contribution: 'No contributions yet.',
|
|
81
|
+
editor: 'Editor',
|
|
82
|
+
materials: 'Materials',
|
|
83
|
+
x_sponsors: (count: number) => m(count, 'Sponsor', 'Sponsors'),
|
|
84
|
+
x_contributors: (count: number) => m(count, 'Contributor', 'Contributors'),
|
|
85
|
+
news: 'News',
|
|
86
|
+
no_news: 'No news.',
|
|
87
|
+
show_more: 'Show more',
|
|
88
|
+
make_contribution: 'Make a contribution',
|
|
89
|
+
improve_material: 'Improve material',
|
|
90
|
+
how_to_improve: 'How to improve?',
|
|
91
|
+
report_issue: 'Report an issue',
|
|
92
|
+
edit_page: 'Edit page',
|
|
93
|
+
no_toc: 'TOC is empty.',
|
|
94
|
+
article_seo_description: (contentTitle: string) =>
|
|
95
|
+
`Clear and interesting explanation of the topic "${contentTitle}". Clear examples, important terms and statements, interesting facts, life applications.`,
|
|
96
|
+
summary_seo_description: (contentTitle: string) =>
|
|
97
|
+
`Summary of the topic "${contentTitle}": key definitions, theorems, properties and examples of their use. All the most important things in a concise form!`,
|
|
98
|
+
practice_seo_description: (contentTitle: string) =>
|
|
99
|
+
`Various problems with hints and answers on the topic "${contentTitle}". Interesting conditions, hints and detailed solutions. Turn knowledge into a skill!`,
|
|
100
|
+
externals_own: 'Own',
|
|
101
|
+
externals_from: 'From',
|
|
102
|
+
|
|
103
|
+
default_index_title: 'Erudit',
|
|
104
|
+
default_index_short: 'Modern digital textbooks!',
|
|
105
|
+
default_site_info_short: 'Modern textbook',
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export function m(
|
|
109
|
+
number: number,
|
|
110
|
+
one: string,
|
|
111
|
+
few: string,
|
|
112
|
+
includeNumber = true,
|
|
113
|
+
) {
|
|
114
|
+
const text = number === 1 ? one : few;
|
|
115
|
+
return includeNumber ? `${number} ${text}` : text;
|
|
116
|
+
}
|
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
export const phrases: LanguagePhrases = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
export function m(
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
) {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
1
|
+
export const phrases: LanguagePhrases = {
|
|
2
|
+
language_code: 'ru',
|
|
3
|
+
language_name: 'Русский',
|
|
4
|
+
erudit: 'Erudit',
|
|
5
|
+
content_nav: 'Оглавление',
|
|
6
|
+
pages: 'Страницы',
|
|
7
|
+
search: 'Поиск',
|
|
8
|
+
languages: 'Языки',
|
|
9
|
+
settings: 'Настройки',
|
|
10
|
+
theme: 'Тема',
|
|
11
|
+
theme_light: 'Светлая',
|
|
12
|
+
theme_dark: 'Темная',
|
|
13
|
+
theme_system: 'Системная',
|
|
14
|
+
built: 'Собрано',
|
|
15
|
+
content: 'Контент',
|
|
16
|
+
add_translation: 'Добавить перевод',
|
|
17
|
+
main_page: 'Главная страница',
|
|
18
|
+
contributors: 'Авторы',
|
|
19
|
+
sponsors: 'Спонсоры',
|
|
20
|
+
search_the_site: 'Поиск по сайту...',
|
|
21
|
+
searching_more: 'Ищем еще...',
|
|
22
|
+
no_results: 'Ничего не найдено',
|
|
23
|
+
no_more_results: 'Больше результатов нет',
|
|
24
|
+
no_content: 'Контента нет.',
|
|
25
|
+
to_index: 'К оглавлению',
|
|
26
|
+
about_textbook: 'Об учебнике',
|
|
27
|
+
flag_title_dev: 'Разработка',
|
|
28
|
+
flag_hint_dev:
|
|
29
|
+
'Этот материал не завершен, может содержать ошибки и измениться в будущем! Используйте с осторожностью!',
|
|
30
|
+
flag_title_advanced: 'Профиль',
|
|
31
|
+
flag_hint_advanced:
|
|
32
|
+
'Этот материал предназначен для учеников с хорошим уровнем понимания предмета. Информация здесь не предназначена для новичков!',
|
|
33
|
+
flag_title_secondary: 'Дополнение',
|
|
34
|
+
flag_hint_secondary:
|
|
35
|
+
'Это материал для тех, кто хочет глубже погрузиться предмет и получить дополнительные знания и контекст.',
|
|
36
|
+
ads_replacer:
|
|
37
|
+
'Помогите улучшить проект.<br><strong style="color: inherit;">Включите показ рекламы!</strong>',
|
|
38
|
+
direct_link: 'Прямая ссылка',
|
|
39
|
+
direct_link_explain: 'Вы собираетесь открыть прямую ссылку:',
|
|
40
|
+
book: 'Учебник',
|
|
41
|
+
group: 'Категория',
|
|
42
|
+
topic: 'Тема',
|
|
43
|
+
article: 'Статья',
|
|
44
|
+
summary: 'Конспект',
|
|
45
|
+
practice: 'Задачи',
|
|
46
|
+
page: 'Страница',
|
|
47
|
+
preview_content_page_description:
|
|
48
|
+
'Вы собираетесь перейти на страницу контента:',
|
|
49
|
+
begin_learning: 'Начать изучение!',
|
|
50
|
+
flag_dev: 'Разработка',
|
|
51
|
+
flag_dev_description:
|
|
52
|
+
'Этот материал в разработке! Он может измениться в будущем и даже содержать ошибки!',
|
|
53
|
+
flag_advanced: 'Профиль',
|
|
54
|
+
flag_advanced_description:
|
|
55
|
+
'Этот материал предназначен для учеников с высоким уровнем понимания предмета. Информация здесь не предназначена для новичков!',
|
|
56
|
+
flag_secondary: 'Дополнение',
|
|
57
|
+
flag_secondary_description:
|
|
58
|
+
'Это дополнительный материал для тех, кто хочет глубже погрузиться предмет и получить дополнительные знания и контекст.',
|
|
59
|
+
key_elements: 'Ключевые элементы',
|
|
60
|
+
stats: 'Статистика',
|
|
61
|
+
connections: 'Связи',
|
|
62
|
+
need_to_know: 'Надо знать',
|
|
63
|
+
depends_on: 'Зависит от',
|
|
64
|
+
used_by: 'Используется в',
|
|
65
|
+
externals: 'Внешние',
|
|
66
|
+
add_quote: 'Добавить свое сообщение!',
|
|
67
|
+
next_quote: 'Следующая цитата',
|
|
68
|
+
sponsors_description:
|
|
69
|
+
'Список людей и организаций, которые поддерживают проект финансово. Благодаря им проект может существовать и развиваться. Если вы хотите помочь проекту, то тоже можете стать спонсором и попасть на эту страницу!',
|
|
70
|
+
become_sponsor: 'Стать спонсором',
|
|
71
|
+
no_sponsors: 'Пока что спонсоров нет. Вы можете стать первым!',
|
|
72
|
+
contributors_description:
|
|
73
|
+
'Список людей, которые внесли вклад в материалы проекта: предложили ценные идеи, вносили корректировки в существующий материал или же написали собственный!',
|
|
74
|
+
contributors_invite:
|
|
75
|
+
'Вы тоже можете помочь проекту, внести свой вклад и попасть на эту страницу!',
|
|
76
|
+
contributor_page_description: (name: string) =>
|
|
77
|
+
`Персональная страница автора "${name}" с данными о вкладе в проект.`,
|
|
78
|
+
become_contributor: 'Стать автором',
|
|
79
|
+
no_contributors: 'Пока что авторов нет. Вы можете стать первым!',
|
|
80
|
+
contribution: 'Вклад',
|
|
81
|
+
no_contribution: 'Пока что вклада нет.',
|
|
82
|
+
editor: 'Редактор',
|
|
83
|
+
materials: 'Материалы',
|
|
84
|
+
x_sponsors: (count: number) => m(count, 'Спонсор', 'Спонсора', 'Спонсоров'),
|
|
85
|
+
x_contributors: (count: number) => m(count, 'Автор', 'Автора', 'Авторов'),
|
|
86
|
+
news: 'Новости',
|
|
87
|
+
no_news: 'Новостей нет.',
|
|
88
|
+
show_more: 'Показать больше',
|
|
89
|
+
make_contribution: 'Внести свой вклад',
|
|
90
|
+
improve_material: 'Улучшить материал',
|
|
91
|
+
how_to_improve: 'Как улучшить?',
|
|
92
|
+
report_issue: 'Сообщить о проблеме',
|
|
93
|
+
edit_page: 'Редактировать страницу',
|
|
94
|
+
no_toc: 'Содержание пусто.',
|
|
95
|
+
article_seo_description: (contentTitle: string) =>
|
|
96
|
+
`Понятное и интересное объяснение темы «${contentTitle}». Показательные примеры, важные свойства, интересные факты, применение в жизни, понятные доказательства. Здесь вы точно разберетесь!`,
|
|
97
|
+
summary_seo_description: (contentTitle: string) =>
|
|
98
|
+
`Конспект темы «${contentTitle}»: ключевые определения, теоремы, свойства и примеры их использвания. Все самое важное и в кратком виде!`,
|
|
99
|
+
practice_seo_description: (contentTitle: string) =>
|
|
100
|
+
`Разнообразные задачи с подсказками и ответами по теме «${contentTitle}». Интересные условия, подсказки и подробные решения. Превратите знания в навык!`,
|
|
101
|
+
externals_own: 'Собственные',
|
|
102
|
+
externals_from: 'Из',
|
|
103
|
+
|
|
104
|
+
default_index_title: 'Erudit',
|
|
105
|
+
default_index_short: 'Современные цифровые учебники!',
|
|
106
|
+
default_site_info_short: 'Современный учебник',
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
export function m(
|
|
110
|
+
number: number,
|
|
111
|
+
one: string,
|
|
112
|
+
two: string,
|
|
113
|
+
five: string,
|
|
114
|
+
includeNumber = true,
|
|
115
|
+
) {
|
|
116
|
+
const text = [five, one, two, two, two, five][
|
|
117
|
+
number % 100 > 10 && number % 100 < 20 ? 0 : Math.min(number % 10, 5)
|
|
118
|
+
]!;
|
|
119
|
+
return includeNumber ? `${number} ${text}` : text;
|
|
120
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ServerLanguageModules } from './types';
|
|
2
|
-
|
|
3
|
-
export const serverLanguages: ServerLanguageModules = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
1
|
+
import type { ServerLanguageModules } from './types';
|
|
2
|
+
|
|
3
|
+
export const serverLanguages: ServerLanguageModules = {
|
|
4
|
+
en: () => import('./list/en'),
|
|
5
|
+
ru: () => import('./list/ru'),
|
|
6
|
+
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { serverLanguages } from './list';
|
|
2
|
-
|
|
3
|
-
export async function setupServerLanguage() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
1
|
+
import { serverLanguages } from './list';
|
|
2
|
+
|
|
3
|
+
export async function setupServerLanguage() {
|
|
4
|
+
ERUDIT.language = {
|
|
5
|
+
phrases: {} as any,
|
|
6
|
+
functions: {},
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
try {
|
|
10
|
+
const targetLanguage = ERUDIT.config.public.language.current;
|
|
11
|
+
|
|
12
|
+
if (!targetLanguage.trim()) {
|
|
13
|
+
throw new Error('No language specified in Erudit config!');
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
if (!(targetLanguage in serverLanguages)) {
|
|
17
|
+
throw new Error(`Language ${targetLanguage} is not supported!`);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const languageModule = await serverLanguages[targetLanguage]();
|
|
21
|
+
|
|
22
|
+
ERUDIT.language.phrases = languageModule.phrases;
|
|
23
|
+
|
|
24
|
+
for (const [funcKey, funcValue] of Object.entries(languageModule)) {
|
|
25
|
+
if (typeof funcValue === 'function') {
|
|
26
|
+
ERUDIT.language.functions[funcKey] = funcValue;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
ERUDIT.log.success(
|
|
31
|
+
`Language "${ERUDIT.log.stress(targetLanguage)}" setup complete!`,
|
|
32
|
+
);
|
|
33
|
+
} catch (error) {
|
|
34
|
+
ERUDIT.log.error(`Failed to setup server language:\n${error}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type { EruditLanguageCode } from '@erudit-js/core/eruditConfig/language';
|
|
2
|
-
|
|
3
|
-
export interface EruditServerLanguage {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export interface ServerLanguageModule {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type ServerLanguageModules = Record<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
>;
|
|
1
|
+
import type { EruditLanguageCode } from '@erudit-js/core/eruditConfig/language';
|
|
2
|
+
|
|
3
|
+
export interface EruditServerLanguage {
|
|
4
|
+
phrases: LanguagePhrases;
|
|
5
|
+
functions: Record<string, Function>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ServerLanguageModule {
|
|
9
|
+
phrases: LanguagePhrases;
|
|
10
|
+
[key: string]: Function | LanguagePhrases;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type ServerLanguageModules = Record<
|
|
14
|
+
EruditLanguageCode,
|
|
15
|
+
() => Promise<ServerLanguageModule>
|
|
16
|
+
>;
|