bfg-common 1.3.595 → 1.3.597

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.
Files changed (31) hide show
  1. package/assets/localization/local_be.json +49 -32
  2. package/assets/localization/local_en.json +49 -32
  3. package/assets/localization/local_hy.json +49 -32
  4. package/assets/localization/local_kk.json +50 -32
  5. package/assets/localization/local_ru.json +49 -32
  6. package/assets/localization/local_zh.json +49 -32
  7. package/components/common/adapterManager/ui/table/Header.vue +1 -1
  8. package/components/common/diagramMain/modals/editSettings/tabs/Security.vue +6 -6
  9. package/components/common/diagramMain/modals/lib/config/adapterModal.ts +1 -1
  10. package/components/common/diagramMain/modals/lib/config/networkModal.ts +4 -4
  11. package/components/common/diagramMain/modals/lib/config/switchModal.ts +4 -4
  12. package/components/common/layout/theHeader/TheHeaderNew.vue +5 -4
  13. package/components/common/layout/theHeader/helpMenu/About.vue +4 -4
  14. package/components/common/layout/theHeader/helpMenu/helpMenuNew/HelpMenuNew.vue +37 -2
  15. package/components/common/layout/theHeader/helpMenu/helpMenuNew/lib/config/dropMenu.ts +3 -0
  16. package/components/common/layout/theHeader/userMenu/userMenuNew/UserMenuNew.vue +9 -2
  17. package/components/common/monitor/advanced/Advanced.vue +7 -4
  18. package/components/common/monitor/advanced/tools/Tools.vue +7 -4
  19. package/components/common/monitor/advanced/tools/chartOptionsModal/ChartOptionsModal.vue +15 -4
  20. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/Counters.vue +3 -2
  21. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/Timespan.vue +3 -2
  22. package/components/common/monitor/advanced/tools/chartOptionsModal/counters/timespan/object/Object.vue +34 -12
  23. package/components/common/monitor/advanced/tools/chartOptionsModal/lib/utils/checkSubmit.ts +8 -3
  24. package/components/common/vm/actions/common/select/storage/lib/config/config.ts +1 -1
  25. package/components/common/wizards/datastore/add/nfs/configuration/Configuration.vue +2 -2
  26. package/components/common/wizards/vm/migrate/select/storage/table/datastore/lib/config/config.ts +1 -1
  27. package/composables/productNameLocal.ts +48 -40
  28. package/composables/useEnvLanguage.ts +2 -2
  29. package/lib/models/interfaces.ts +8 -0
  30. package/lib/models/types.ts +37 -29
  31. package/package.json +2 -2
@@ -1,40 +1,48 @@
1
- import type { UI_I_Localization } from '~/lib/models/interfaces'
2
- import type { UI_T_LanguageKey } from '~/lib/models/types'
3
-
4
- export function productNameLocal(
5
- localization: UI_I_Localization
6
- ): UI_I_Localization {
7
- const config = useRuntimeConfig()
8
-
9
- const productName =
10
- config.public.LOCALIZATION_CODE === 'ru'
11
- ? config.public.PRODUCT_NAME_RU
12
- : config.public.PRODUCT_NAME_EN
13
-
14
- return replaceProductNameRecursion(localization, productName)
15
- }
16
-
17
- const replaceProductNameRecursion = (
18
- localization: UI_I_Localization,
19
- productName: any
20
- ): UI_I_Localization => {
21
- for (const key of Object.keys(localization)) {
22
- const item = localization[key as UI_T_LanguageKey]
23
- // TODO move to config
24
- const localizationKeys = [
25
- 'common',
26
- 'auth',
27
- 'home',
28
- 'tasks',
29
- 'layout',
30
- 'mainNavigation'
31
- ]
32
- if (localizationKeys.includes(key)) {
33
- for (const key2 of Object.keys(item)) {
34
- item[key2] = item[key2].replaceAll('{productName}', productName)
35
- }
36
- }
37
- }
38
-
39
- return localization
40
- }
1
+ import type { UI_I_Localization } from '~/lib/models/interfaces'
2
+ import type { UI_T_LanguageKey } from '~/lib/models/types'
3
+
4
+ export function productNameLocal(
5
+ localization: UI_I_Localization
6
+ ): UI_I_Localization {
7
+ const config = useRuntimeConfig()
8
+
9
+ const productName =
10
+ config.public.LOCALIZATION_CODE === 'ru'
11
+ ? config.public.PRODUCT_NAME_RU
12
+ : config.public.PRODUCT_NAME_EN
13
+
14
+ return replaceProductNameRecursion(localization, productName)
15
+ }
16
+
17
+ const replaceProductNameRecursion = (
18
+ localization: UI_I_Localization,
19
+ productName: any
20
+ ): UI_I_Localization => {
21
+ for (const key of Object.keys(localization)) {
22
+ const item = localization[key as UI_T_LanguageKey]
23
+ // TODO move to config
24
+ const localizationKeys = [
25
+ 'common',
26
+ 'auth',
27
+ 'home',
28
+ 'tasks',
29
+ 'layout',
30
+ 'mainNavigation',
31
+ 'administration',
32
+ 'inventoryConfigure',
33
+ 'datastoreWizard',
34
+ 'inventorySummary',
35
+ 'contextMenu',
36
+ 'networks',
37
+ 'inventory',
38
+ 'inventoryTabs',
39
+ ]
40
+ if (localizationKeys.includes(key)) {
41
+ for (const key2 of Object.keys(item)) {
42
+ item[key2] = item[key2].replaceAll('{productName}', productName)
43
+ }
44
+ }
45
+ }
46
+
47
+ return localization
48
+ }
@@ -3,9 +3,9 @@ export function useEnvLanguage(): string {
3
3
 
4
4
  let localizationCode = 'en_US'
5
5
  const langFromLocalStorage =
6
+ $store.getters['main/getInterfaceLang'] || // Из $store для Сферы, но думаю нужно сделать одинаково из localStorage
6
7
  useLocalStorage('lang') ||
7
- useLocalStorage('languageType') ||
8
- $store.getters['main/getInterfaceLang'] // Из $store для Сферы, но думаю нужно сделать одинаково из localStorage
8
+ useLocalStorage('languageType')
9
9
 
10
10
  if (langFromLocalStorage) {
11
11
  if (
@@ -20,6 +20,14 @@ export interface UI_I_Localization {
20
20
  tasks: UI_I_ArbitraryObject<string>
21
21
  layout: UI_I_ArbitraryObject<string>
22
22
  mainNavigation: UI_I_ArbitraryObject<string>
23
+ administration: UI_I_ArbitraryObject<string>
24
+ inventoryConfigure: UI_I_ArbitraryObject<string>
25
+ datastoreWizard: UI_I_ArbitraryObject<string>
26
+ inventorySummary: UI_I_ArbitraryObject<string>
27
+ contextMenu: UI_I_ArbitraryObject<string>
28
+ networks: UI_I_ArbitraryObject<string>
29
+ inventory: UI_I_ArbitraryObject<string>
30
+ inventoryTabs: UI_I_ArbitraryObject<string>
23
31
  }
24
32
  export interface UI_I_SendTaskParams {
25
33
  method: string
@@ -1,29 +1,37 @@
1
- export type UI_T_Project = 'sphere' | 'procurator'
2
-
3
- export type UI_T_Binary = 'KB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'ZB' | 'YB'
4
- export type UI_T_BinaryLower =
5
- | 'kb'
6
- | 'mb'
7
- | 'gb'
8
- | 'tb'
9
- | 'pb'
10
- | 'eb'
11
- | 'zb'
12
- | 'yb'
13
-
14
- export type UI_T_LangValue =
15
- | 'en_US'
16
- | 'ru_RU'
17
- | 'hy_AM'
18
- | 'zh_CHS'
19
- | 'kk_KZ'
20
- | 'be_BY'
21
- | 'BROWSER'
22
-
23
- export type UI_T_LanguageKey =
24
- | 'common'
25
- | 'auth'
26
- | 'home'
27
- | 'tasks'
28
- | 'layout'
29
- | 'mainNavigation'
1
+ export type UI_T_Project = 'sphere' | 'procurator'
2
+
3
+ export type UI_T_Binary = 'KB' | 'MB' | 'GB' | 'TB' | 'PB' | 'EB' | 'ZB' | 'YB'
4
+ export type UI_T_BinaryLower =
5
+ | 'kb'
6
+ | 'mb'
7
+ | 'gb'
8
+ | 'tb'
9
+ | 'pb'
10
+ | 'eb'
11
+ | 'zb'
12
+ | 'yb'
13
+
14
+ export type UI_T_LangValue =
15
+ | 'en_US'
16
+ | 'ru_RU'
17
+ | 'hy_AM'
18
+ | 'zh_CHS'
19
+ | 'kk_KZ'
20
+ | 'be_BY'
21
+ | 'BROWSER'
22
+
23
+ export type UI_T_LanguageKey =
24
+ | 'common'
25
+ | 'auth'
26
+ | 'home'
27
+ | 'tasks'
28
+ | 'layout'
29
+ | 'mainNavigation'
30
+ | 'administration'
31
+ | 'inventoryConfigure'
32
+ | 'datastoreWizard'
33
+ | 'inventorySummary'
34
+ | 'contextMenu'
35
+ | 'networks'
36
+ | 'inventory'
37
+ | 'inventoryTabs'
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bfg-common",
3
3
  "private": false,
4
- "version": "1.3.595",
4
+ "version": "1.3.597",
5
5
  "scripts": {
6
6
  "build": "nuxt build",
7
7
  "dev": "nuxt dev --port=3002",
@@ -35,7 +35,7 @@
35
35
  "@vueuse/components": "^10.1.2",
36
36
  "date-fns": "^2.29.3",
37
37
  "bfg-nuxt-3-graph": "^1.0.15",
38
- "bfg-uikit": "1.0.88",
38
+ "bfg-uikit": "1.0.91",
39
39
  "html2canvas": "^1.4.1",
40
40
  "prettier-eslint": "^15.0.1"
41
41
  }