Skip to content

Commit 440c91a

Browse files
FalkWolskyludomikula
FalkWolsky
authored andcommitted
Fix in Tour Component imports
1 parent e08a38b commit 440c91a

File tree

3 files changed

+40
-1
lines changed

3 files changed

+40
-1
lines changed

client/packages/lowcoder/src/comps/comps/tourComp/tourPropertyView.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ import { BoolControl } from "../../controls/boolControl";
33
import { ArrowControl, BoolCodeControl, MaskControl } from "../../controls/codeControl";
44
import { Section } from "lowcoder-design";
55
import { TourStepControl } from "@lowcoder-ee/comps/controls/tourStepControl";
6-
import { booleanExposingStateControl, dropdownControl } from "lowcoder-sdk";
6+
import { booleanExposingStateControl } from "comps/controls/codeStateControl";
7+
import { dropdownControl } from "comps/controls/dropdownControl";
78
import { trans } from "i18n";
89
import { PlacementOptions, TypeOptions } from "@lowcoder-ee/comps/comps/tourComp/tourControlConstants";
910
import {
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
import { getI18nObjects, Translator } from "lowcoder-core";
22
import * as localeData from "./locales";
33
import { I18nObjects } from "./locales/types";
4+
import { languagesMetadata } from "./languagesMeta"; // Import the metadata
45

56
export const { trans, transToNode, language } = new Translator<typeof localeData.en>(
67
localeData,
78
REACT_APP_LANGUAGES,
89
['de']
910
);
1011
export const i18nObjs = getI18nObjects<I18nObjects>(localeData, REACT_APP_LANGUAGES);
12+
13+
export const languageList = Object.keys(languagesMetadata).map(code => ({
14+
languageCode: code,
15+
languageName: languagesMetadata[code].languageName,
16+
flag: languagesMetadata[code].flag
17+
}));
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Define the structure for a single language's metadata
2+
export interface LanguageMeta {
3+
languageName: string;
4+
flag: string;
5+
}
6+
7+
// Define the structure for the container of all language metadatas
8+
export interface LanguagesMetadata {
9+
[key: string]: LanguageMeta;
10+
}
11+
12+
// Example metadata object
13+
export const languagesMetadata: LanguagesMetadata = {
14+
en: {
15+
languageName: "English",
16+
flag: "/flags/en.png"
17+
},
18+
de: {
19+
languageName: "Deutsch",
20+
flag: "/flags/de.png"
21+
},
22+
it: {
23+
languageName: "Italiano",
24+
flag: "/flags/it.png"
25+
},
26+
zh: {
27+
languageName: "中文",
28+
flag: "/flags/zh.png"
29+
}
30+
};
31+

0 commit comments

Comments
 (0)