diff --git a/packages/survey-creator-angular/src/toolbox/toolbox-category.component.html b/packages/survey-creator-angular/src/toolbox/toolbox-category.component.html index 2059e66ea8..7de00bb436 100644 --- a/packages/survey-creator-angular/src/toolbox/toolbox-category.component.html +++ b/packages/survey-creator-angular/src/toolbox/toolbox-category.component.html @@ -2,7 +2,7 @@
- {{category.name}} + {{category.title}}
@@ -12,4 +12,4 @@
- \ No newline at end of file + diff --git a/packages/survey-creator-core/src/localization/arabic.ts b/packages/survey-creator-core/src/localization/arabic.ts index 797ad546d9..35d83caf7c 100644 --- a/packages/survey-creator-core/src/localization/arabic.ts +++ b/packages/survey-creator-core/src/localization/arabic.ts @@ -42,6 +42,14 @@ export var arStrings = { signaturepad: "لوحة توقيع", buttongroup: "Button group" }, + toolbox_categories: { + feneral: "قائمة العام", + choice: "أسئلة الاختيار", + text: "أسئلة إدخال النص", + containers: "حاويات", + matrix: "أسئلة المصفوفة", + misc: "متفرقات", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "إفتراضي ({0})", @@ -111,12 +119,6 @@ export var arStrings = { "property-grid": "Properties", propertyGridFilteredTextPlaceholder: "Type to search...", propertyGridNoResultsFound: "لم يتم العثور على نتائج", - toolboxGeneralCategory: "قائمة العام", - toolboxChoiceCategory: "أسئلة الاختيار", - toolboxTextCategory: "أسئلة إدخال النص", - toolboxContainersCategory: "حاويات", - toolboxMatrixCategory: "أسئلة المصفوفة", - toolboxMiscCategory: "متفرقات", correctJSON: "Please correct JSON.", surveyResults: "Survey Results ", surveyResultsTable: "As Table", diff --git a/packages/survey-creator-core/src/localization/bulgarian.ts b/packages/survey-creator-core/src/localization/bulgarian.ts index 12f2b1f222..59cc13ff6f 100644 --- a/packages/survey-creator-core/src/localization/bulgarian.ts +++ b/packages/survey-creator-core/src/localization/bulgarian.ts @@ -42,6 +42,14 @@ export var bgStrings = { signaturepad: "Подпис", buttongroup: "Група бутони" }, + toolbox_categories: { + general: "Общ", + choice: "Въпроси за избор", + text: "Въпроси с въвеждане на текст", + containers: "Контейнери", + matrix: "Матрица с въпроси", + misc: "Разни", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "По подразбиране ({0})", @@ -111,12 +119,6 @@ export var bgStrings = { "property-grid": "Свойства", propertyGridFilteredTextPlaceholder: "Въведи за търсене...", propertyGridNoResultsFound: "Няма намерени резултати", - toolboxGeneralCategory: "Общ", - toolboxChoiceCategory: "Въпроси за избор", - toolboxTextCategory: "Въпроси с въвеждане на текст", - toolboxContainersCategory: "Контейнери", - toolboxMatrixCategory: "Матрица с въпроси", - toolboxMiscCategory: "Разни", correctJSON: "Моля, коригирай JSON.", surveyResults: "Резултати от анкетата ", surveyResultsTable: "Като таблица", diff --git a/packages/survey-creator-core/src/localization/croatian.ts b/packages/survey-creator-core/src/localization/croatian.ts index d890c7d549..113dfc489e 100644 --- a/packages/survey-creator-core/src/localization/croatian.ts +++ b/packages/survey-creator-core/src/localization/croatian.ts @@ -42,6 +42,14 @@ export var hrStrings = { signaturepad: "Jastučić za potpis", buttongroup: "Grupa gumba" }, + toolbox_categories: { + general: "Općenito", + choice: "Pitanja o izboru", + text: "Pitanja o unosu teksta", + containers: "Kontejnere", + matrix: "Matrična pitanja", + misc: "Ostalo", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Zadani ({0})", @@ -111,12 +119,6 @@ export var hrStrings = { "property-grid": "Svojstva", propertyGridFilteredTextPlaceholder: "Upišite za pretraživanje...", propertyGridNoResultsFound: "Nisu pronađeni rezultati", - toolboxGeneralCategory: "Općenito", - toolboxChoiceCategory: "Pitanja o izboru", - toolboxTextCategory: "Pitanja o unosu teksta", - toolboxContainersCategory: "Kontejnere", - toolboxMatrixCategory: "Matrična pitanja", - toolboxMiscCategory: "Ostalo", correctJSON: "Ispravite JSON.", surveyResults: "Rezultat ankete: ", surveyResultsTable: "Kao tablica", diff --git a/packages/survey-creator-core/src/localization/czech.ts b/packages/survey-creator-core/src/localization/czech.ts index 37d64dbb38..b39f11b2cb 100644 --- a/packages/survey-creator-core/src/localization/czech.ts +++ b/packages/survey-creator-core/src/localization/czech.ts @@ -42,6 +42,14 @@ export var czStrings = { signaturepad: "Podpisová podložka", buttongroup: "Skupina tlačítek" }, + toolbox_categories: { + general: "Obecné", + choice: "Výběrové otázky", + text: "Textové otázky", + containers: "Kontejnery", + matrix: "Maticové otázky", + misc: "Ostatní", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Výchozí ({0})", @@ -111,12 +119,6 @@ export var czStrings = { "property-grid": "Vlastnosti", propertyGridFilteredTextPlaceholder: "Zadejte hledaný text...", propertyGridNoResultsFound: "Nebyly nalezeny žádné výsledky", - toolboxGeneralCategory: "Obecné", - toolboxChoiceCategory: "Výběrové otázky", - toolboxTextCategory: "Textové otázky", - toolboxContainersCategory: "Kontejnery", - toolboxMatrixCategory: "Maticové otázky", - toolboxMiscCategory: "Ostatní", correctJSON: "Opravte JSON.", surveyResults: "Výsledek průzkumu: ", surveyResultsTable: "Jako tabulka", diff --git a/packages/survey-creator-core/src/localization/danish.ts b/packages/survey-creator-core/src/localization/danish.ts index d16a23e1fc..18c5504e7e 100644 --- a/packages/survey-creator-core/src/localization/danish.ts +++ b/packages/survey-creator-core/src/localization/danish.ts @@ -42,6 +42,14 @@ export var danishStrings = { signaturepad: "Underskrift", buttongroup: "Knap gruppe" }, + toolbox_categories: { + general: "Generelt", + choice: "Spørgsmål om valg", + text: "Spørgsmål om tekstinput", + containers: "Containere", + matrix: "Matrix spørgsmål", + misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Standard ({0})", @@ -111,12 +119,6 @@ export var danishStrings = { "property-grid": "Egenskaber", propertyGridFilteredTextPlaceholder: "Skriv for at søge...", propertyGridNoResultsFound: "Ingen resultater fundet", - toolboxGeneralCategory: "Generelt", - toolboxChoiceCategory: "Spørgsmål om valg", - toolboxTextCategory: "Spørgsmål om tekstinput", - toolboxContainersCategory: "Containere", - toolboxMatrixCategory: "Matrix spørgsmål", - toolboxMiscCategory: "Misc", correctJSON: "Ret venligst JSON.", surveyResults: "Undersøgelsesresultat: ", surveyResultsTable: "Som tabel", diff --git a/packages/survey-creator-core/src/localization/dutch.ts b/packages/survey-creator-core/src/localization/dutch.ts index 68230fe5ba..8696cdcf63 100644 --- a/packages/survey-creator-core/src/localization/dutch.ts +++ b/packages/survey-creator-core/src/localization/dutch.ts @@ -42,6 +42,14 @@ export var nlStrings = { signaturepad: "Handtekening", buttongroup: "Knoppengroep" }, + toolbox_categories: { + general: "Algemeen", + choice: "Keuzevragen", + text: "Vragen over tekstinvoer", + containers: "Containers", + matrix: "Matrix vragen", + misc: "MISC", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Standaard ({0})", @@ -111,12 +119,6 @@ export var nlStrings = { "property-grid": "Eigenschappen", propertyGridFilteredTextPlaceholder: "Typ om te zoeken...", propertyGridNoResultsFound: "Geen resultaten gevonden", - toolboxGeneralCategory: "Algemeen", - toolboxChoiceCategory: "Keuzevragen", - toolboxTextCategory: "Vragen over tekstinvoer", - toolboxContainersCategory: "Containers", - toolboxMatrixCategory: "Matrix vragen", - toolboxMiscCategory: "MISC", correctJSON: "Corrigeer JSON.", surveyResults: "Enquêteresultaat: ", surveyResultsTable: "Als tabel", diff --git a/packages/survey-creator-core/src/localization/english.ts b/packages/survey-creator-core/src/localization/english.ts index f4a01b7d13..4ee133458f 100644 --- a/packages/survey-creator-core/src/localization/english.ts +++ b/packages/survey-creator-core/src/localization/english.ts @@ -44,6 +44,14 @@ export var enStrings = { signaturepad: "Signature", buttongroup: "Button Group" }, + toolbox_categories: { + general: "General", + choice: "Choice Questions", + text: "Text Input Questions", + containers: "Containers", + matrix: "Matrix Questions", + misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Default ({0})", @@ -113,12 +121,6 @@ export var enStrings = { "property-grid": "Properties", propertyGridFilteredTextPlaceholder: "Type to search...", propertyGridNoResultsFound: "No results found", - toolboxGeneralCategory: "General", - toolboxChoiceCategory: "Choice Questions", - toolboxTextCategory: "Text Input Questions", - toolboxContainersCategory: "Containers", - toolboxMatrixCategory: "Matrix Questions", - toolboxMiscCategory: "Misc", correctJSON: "Please correct JSON.", surveyResults: "Survey Results ", surveyResultsTable: "As Table", diff --git a/packages/survey-creator-core/src/localization/finnish.ts b/packages/survey-creator-core/src/localization/finnish.ts index 14bc1dd0a4..b4730d77d5 100644 --- a/packages/survey-creator-core/src/localization/finnish.ts +++ b/packages/survey-creator-core/src/localization/finnish.ts @@ -42,6 +42,14 @@ export var fiStrings = { signaturepad: "Allekirjoitusalusta", buttongroup: "Painike-ryhmä" }, + toolbox_categories: { + general: "Yleinen", + choice: "Valintaa koskevat kysymykset", + text: "Tekstinsyöttökysymykset", + containers: "Säiliöt", + matrix: "Matriisin kysymykset", + misc: "Muut", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Vakio ({0})", @@ -111,12 +119,6 @@ export var fiStrings = { "property-grid": "Properties", propertyGridFilteredTextPlaceholder: "Kirjoita etsiäksesi...", propertyGridNoResultsFound: "Tuloksia ei löytynyt", - toolboxGeneralCategory: "Yleinen", - toolboxChoiceCategory: "Valintaa koskevat kysymykset", - toolboxTextCategory: "Tekstinsyöttökysymykset", - toolboxContainersCategory: "Säiliöt", - toolboxMatrixCategory: "Matriisin kysymykset", - toolboxMiscCategory: "Muut", correctJSON: "Korjaa JSON.", surveyResults: "Kyselyn tulos:", surveyResultsTable: "Taulukossa", diff --git a/packages/survey-creator-core/src/localization/french.ts b/packages/survey-creator-core/src/localization/french.ts index 587349068c..4a247ef450 100644 --- a/packages/survey-creator-core/src/localization/french.ts +++ b/packages/survey-creator-core/src/localization/french.ts @@ -42,6 +42,14 @@ var frenchTranslation = { signaturepad: "Signature", buttongroup: "Groupe de boutons" }, + toolbox_categories: { + general: "Général", + choice: "Questions à choix", + text: "Questions de saisie libre", + containers: "Conteneurs", + matrix: "Questions matricielles", + misc: "Divers", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Valeur par défaut ({0})", @@ -111,12 +119,6 @@ var frenchTranslation = { "property-grid": "Propriétés", propertyGridFilteredTextPlaceholder: "Tapez pour rechercher...", propertyGridNoResultsFound: "Aucun résultat trouvé", - toolboxGeneralCategory: "Général", - toolboxChoiceCategory: "Questions à choix", - toolboxTextCategory: "Questions de saisie libre", - toolboxContainersCategory: "Conteneurs", - toolboxMatrixCategory: "Questions matricielles", - toolboxMiscCategory: "Divers", correctJSON: "Merci de corriger le JSON", surveyResults: "Résultat du sondage : ", surveyResultsTable: "Format tableau", diff --git a/packages/survey-creator-core/src/localization/german.ts b/packages/survey-creator-core/src/localization/german.ts index 3a81cc2b3c..42aa41c6e5 100644 --- a/packages/survey-creator-core/src/localization/german.ts +++ b/packages/survey-creator-core/src/localization/german.ts @@ -42,6 +42,14 @@ var germanTranslation = { signaturepad: "Unterschrift", buttongroup: "Schaltfläche-Gruppe" }, + toolbox_categories: { + general: "Allgemein", + choice: "Auswahl-Fragen", + text: "Text-Eingabe-Fragen", + containers: "Kontainer", + matrix: "Matrix-Fragen", + misc: "Verschiedenes", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Standard ({0})", @@ -111,12 +119,6 @@ var germanTranslation = { "property-grid": "Eigenschaften", propertyGridFilteredTextPlaceholder: "Tippen, um zu suchen ...", propertyGridNoResultsFound: "Keine Ergebnisse gefunden", - toolboxGeneralCategory: "Allgemein", - toolboxChoiceCategory: "Auswahl-Fragen", - toolboxTextCategory: "Text-Eingabe-Fragen", - toolboxContainersCategory: "Kontainer", - toolboxMatrixCategory: "Matrix-Fragen", - toolboxMiscCategory: "Verschiedenes", correctJSON: "Bitte JSON korrigieren.", surveyResults: "Umfrageergebnis: ", surveyResultsTable: "Als Tabelle", diff --git a/packages/survey-creator-core/src/localization/hebrew.ts b/packages/survey-creator-core/src/localization/hebrew.ts index 94c83bece3..c1f283885d 100644 --- a/packages/survey-creator-core/src/localization/hebrew.ts +++ b/packages/survey-creator-core/src/localization/hebrew.ts @@ -42,6 +42,14 @@ export var hebrewStrings = { signaturepad: "חתימה", buttongroup: "קבוצת כפתורים" }, + toolbox_categories: { + general: "כללי", + choice: "שאלות עם בחירה", + text: "שאלות טקסטואליות", + containers: "מכילים", + matrix: "שאלות מטריצה", + misc: "שונות", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "ברירת מחדל ({0})", @@ -111,12 +119,6 @@ export var hebrewStrings = { "property-grid": "מאפיינים", propertyGridFilteredTextPlaceholder: "הקלד כדי לחפש...", propertyGridNoResultsFound: "לא נמצאו תוצאות", - toolboxGeneralCategory: "כללי", - toolboxChoiceCategory: "שאלות עם בחירה", - toolboxTextCategory: "שאלות טקסטואליות", - toolboxContainersCategory: "מכילים", - toolboxMatrixCategory: "שאלות מטריצה", - toolboxMiscCategory: "שונות", correctJSON: "אנא תקנו את ה-JSON.", surveyResults: "תוצאות הסקר", surveyResultsTable: "כטבלה", diff --git a/packages/survey-creator-core/src/localization/hungarian.ts b/packages/survey-creator-core/src/localization/hungarian.ts index 8fc16ea151..e2b4bada5b 100644 --- a/packages/survey-creator-core/src/localization/hungarian.ts +++ b/packages/survey-creator-core/src/localization/hungarian.ts @@ -42,6 +42,14 @@ export var huStrings = { signaturepad: "Aláírás", buttongroup: "Gombcsoport" }, + toolbox_categories: { + general: "Általános", + choice: "Választási kérdések", + text: "Szövegbeviteli kérdések", + containers: "Konténerek", + matrix: "Mátrix kérdések", + misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Alapértelmezett ({0})", @@ -111,12 +119,6 @@ export var huStrings = { "property-grid": "Kellékek", propertyGridFilteredTextPlaceholder: "Írja be a kereséshez...", propertyGridNoResultsFound: "Nincs találat", - toolboxGeneralCategory: "Általános", - toolboxChoiceCategory: "Választási kérdések", - toolboxTextCategory: "Szövegbeviteli kérdések", - toolboxContainersCategory: "Konténerek", - toolboxMatrixCategory: "Mátrix kérdések", - toolboxMiscCategory: "Misc", correctJSON: "Kérem javítsa a JSON-t.", surveyResults: "Kérdőív eredménye: ", surveyResultsTable: "Táblaként", diff --git a/packages/survey-creator-core/src/localization/indonesian.ts b/packages/survey-creator-core/src/localization/indonesian.ts index 626f0496ed..960f9f2dad 100644 --- a/packages/survey-creator-core/src/localization/indonesian.ts +++ b/packages/survey-creator-core/src/localization/indonesian.ts @@ -42,6 +42,14 @@ export var indonesianStrings = { signaturepad: "Tanda tangan", buttongroup: "Grup Tombol" }, + toolbox_categories: { + general: "Umum", + choice: "Pertanyaan Pilihan", + text: "Pertanyaan Input Teks", + containers: "Wadah", + matrix: "Pertanyaan Matriks", + misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Default ({0})", @@ -111,12 +119,6 @@ export var indonesianStrings = { "property-grid": "Properti", propertyGridFilteredTextPlaceholder: "Ketik untuk mencari...", propertyGridNoResultsFound: "Tidak ada hasil yang ditemukan", - toolboxGeneralCategory: "Umum", - toolboxChoiceCategory: "Pertanyaan Pilihan", - toolboxTextCategory: "Pertanyaan Input Teks", - toolboxContainersCategory: "Wadah", - toolboxMatrixCategory: "Pertanyaan Matriks", - toolboxMiscCategory: "Misc", correctJSON: "Please correct JSON.", surveyResults: "Hasil survei: ", surveyResultsTable: "Sebagai tabel", diff --git a/packages/survey-creator-core/src/localization/italian.ts b/packages/survey-creator-core/src/localization/italian.ts index 438c3fb3fd..4ed73d755d 100644 --- a/packages/survey-creator-core/src/localization/italian.ts +++ b/packages/survey-creator-core/src/localization/italian.ts @@ -42,6 +42,14 @@ var italianTranslation = { signaturepad: "Pad per la firma", buttongroup: "Gruppo di pulsanti" }, + toolbox_categories: { + general: "Generale", + choice: "Domande a scelta", + text: "Domande sull'input di testo", + containers: "Contenitori", + matrix: "Domande sulla matrice", + misc: "Altri", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Default ({0})", @@ -111,12 +119,6 @@ var italianTranslation = { "property-grid": "Proprietà", propertyGridFilteredTextPlaceholder: "Digita per cercare...", propertyGridNoResultsFound: "Nessun risultato trovato", - toolboxGeneralCategory: "Generale", - toolboxChoiceCategory: "Domande a scelta", - toolboxTextCategory: "Domande sull'input di testo", - toolboxContainersCategory: "Contenitori", - toolboxMatrixCategory: "Domande sulla matrice", - toolboxMiscCategory: "Altri", correctJSON: "Correggi il tuo JSON", surveyResults: "Risultati del sondaggio: ", surveyResultsTable: "Come tabella", diff --git a/packages/survey-creator-core/src/localization/japanese.ts b/packages/survey-creator-core/src/localization/japanese.ts index 0ab4ee7b96..86c4e57938 100644 --- a/packages/survey-creator-core/src/localization/japanese.ts +++ b/packages/survey-creator-core/src/localization/japanese.ts @@ -42,6 +42,14 @@ export var jaStrings = { signaturepad: "署名パッド", buttongroup: "ボタングループ" }, + toolbox_categories: { + general: "一般", + choice: "選択の質問", + text: "テキスト入力の質問", + containers: "コンテナー", + matrix: "マトリックスの質問", + misc: "雑貨", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "デフォルト({0})", @@ -111,12 +119,6 @@ export var jaStrings = { "property-grid": "プロパティ", propertyGridFilteredTextPlaceholder: "検索するタイプ...", propertyGridNoResultsFound: "結果が見つかりませんでした", - toolboxGeneralCategory: "一般", - toolboxChoiceCategory: "選択の質問", - toolboxTextCategory: "テキスト入力の質問", - toolboxContainersCategory: "コンテナー", - toolboxMatrixCategory: "マトリックスの質問", - toolboxMiscCategory: "雑貨", correctJSON: "JSONを修正してください。", surveyResults: "アンケート結果: ", surveyResultsTable: "表として", diff --git a/packages/survey-creator-core/src/localization/korean.ts b/packages/survey-creator-core/src/localization/korean.ts index d8be7771a8..a55eda5a38 100644 --- a/packages/survey-creator-core/src/localization/korean.ts +++ b/packages/survey-creator-core/src/localization/korean.ts @@ -42,6 +42,14 @@ export var koreanStrings = { signaturepad: "서명", buttongroup: "단추 그룹" }, + toolbox_categories: { + general: "일반", + choice: "선택 질문", + text: "텍스트 입력 질문", + containers: "컨테이너", + matrix: "행렬 질문", + misc: "기타", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "기본값({0})", @@ -111,12 +119,6 @@ export var koreanStrings = { "property-grid": "속성", propertyGridFilteredTextPlaceholder: "검색하려면 입력...", propertyGridNoResultsFound: "결과를 찾을 수 없습니다.", - toolboxGeneralCategory: "일반", - toolboxChoiceCategory: "선택 질문", - toolboxTextCategory: "텍스트 입력 질문", - toolboxContainersCategory: "컨테이너", - toolboxMatrixCategory: "행렬 질문", - toolboxMiscCategory: "기타", correctJSON: "JSON 데이터를 수정하십시오.", surveyResults: "설문 결과: ", surveyResultsTable: "테이블로", diff --git a/packages/survey-creator-core/src/localization/malay.ts b/packages/survey-creator-core/src/localization/malay.ts index 6dad4e4ec8..a7ec613969 100644 --- a/packages/survey-creator-core/src/localization/malay.ts +++ b/packages/survey-creator-core/src/localization/malay.ts @@ -42,6 +42,14 @@ export var msStrings = { signaturepad: "Pad tandatangan", buttongroup: "Kumpulan Butang" }, + toolbox_categories: { + general: "Umum", + choice: "Soalan Pilihan", + text: "Soalan Input Teks", + containers: "Bekas", + matrix: "Soalan Matriks", + misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Lalai ({0})", @@ -111,12 +119,6 @@ export var msStrings = { "property-grid": "Ciri", propertyGridFilteredTextPlaceholder: "Taip untuk mencari...", propertyGridNoResultsFound: "Tiada keputusan ditemui", - toolboxGeneralCategory: "Umum", - toolboxChoiceCategory: "Soalan Pilihan", - toolboxTextCategory: "Soalan Input Teks", - toolboxContainersCategory: "Bekas", - toolboxMatrixCategory: "Soalan Matriks", - toolboxMiscCategory: "Misc", correctJSON: "Pilih JSON yang betul.", surveyResults: "Keputusan Tinjauan: ", surveyResultsTable: "Sebagai Jadual", diff --git a/packages/survey-creator-core/src/localization/mongolian.ts b/packages/survey-creator-core/src/localization/mongolian.ts index f95d611b88..ebcae7f980 100644 --- a/packages/survey-creator-core/src/localization/mongolian.ts +++ b/packages/survey-creator-core/src/localization/mongolian.ts @@ -42,6 +42,14 @@ export var mnStrings = { signaturepad: "Гарын үсэг", buttongroup: "Багц товч" }, + toolbox_categories: { + general: "Ерөнхий", + choice: "Сонголттой асуултууд", + text: "Хариулт бичих асуултууд", + containers: "Сав", + matrix: "Матрицан асуултууд", + misc: "Бусад", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Үндсэн ({0})", @@ -111,12 +119,6 @@ export var mnStrings = { "property-grid": "Өмнөх", propertyGridFilteredTextPlaceholder: "Хайхын тулд бичнэ үү.....", propertyGridNoResultsFound: "Ямар ч үр дүн олдсонгүй", - toolboxGeneralCategory: "Ерөнхий", - toolboxChoiceCategory: "Сонголттой асуултууд", - toolboxTextCategory: "Хариулт бичих асуултууд", - toolboxContainersCategory: "Сав", - toolboxMatrixCategory: "Матрицан асуултууд", - toolboxMiscCategory: "Бусад", correctJSON: "JSON засна уу.", surveyResults: "Санал асуулгын хариу", surveyResultsTable: "Санал асуулгын хариултыг хүснэгтээр харуулах", diff --git a/packages/survey-creator-core/src/localization/norwegian.ts b/packages/survey-creator-core/src/localization/norwegian.ts index e8ba30d432..9502772984 100644 --- a/packages/survey-creator-core/src/localization/norwegian.ts +++ b/packages/survey-creator-core/src/localization/norwegian.ts @@ -42,6 +42,14 @@ export var nbStrings = { signaturepad: "Signatur", buttongroup: "Knappegruppe" }, + toolbox_categories: { + general: "Generelt", + choice: "Choice Spørsmål", + text: "Spørsmål om tekstinndata", + containers: "Beholdere", + matrix: "Matrise Spørsmål", + misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Standard ({0})", @@ -111,12 +119,6 @@ export var nbStrings = { "property-grid": "Innstillinger", propertyGridFilteredTextPlaceholder: "Skriv for å søke ...", propertyGridNoResultsFound: "Fant ingen resultater", - toolboxGeneralCategory: "Generelt", - toolboxChoiceCategory: "Choice Spørsmål", - toolboxTextCategory: "Spørsmål om tekstinndata", - toolboxContainersCategory: "Beholdere", - toolboxMatrixCategory: "Matrise Spørsmål", - toolboxMiscCategory: "Misc", correctJSON: "Vennligst korriger JSON.", surveyResults: "Skjemaresultat: ", surveyResultsTable: "Som tabell", diff --git a/packages/survey-creator-core/src/localization/persian.ts b/packages/survey-creator-core/src/localization/persian.ts index 43aa8852b8..69305b5083 100644 --- a/packages/survey-creator-core/src/localization/persian.ts +++ b/packages/survey-creator-core/src/localization/persian.ts @@ -42,6 +42,14 @@ var persianStrings = { signaturepad: "قسمت امضا", buttongroup: "گروه دکمه" }, + toolbox_categories: { + general: "عمومی", + choice: "سوالات انتخاب", + text: "سوالات ورودی متن", + containers: "ظروف", + matrix: "سوالات ماتریکس", + misc: "متفرقه", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "پیش فرض ({0})", @@ -111,12 +119,6 @@ var persianStrings = { "property-grid": "ویژگی ها", propertyGridFilteredTextPlaceholder: "جستجو...", propertyGridNoResultsFound: "نتیجه ای یافت نشد", - toolboxGeneralCategory: "عمومی", - toolboxChoiceCategory: "سوالات انتخاب", - toolboxTextCategory: "سوالات ورودی متن", - toolboxContainersCategory: "ظروف", - toolboxMatrixCategory: "سوالات ماتریکس", - toolboxMiscCategory: "متفرقه", correctJSON: "لطفا JSON را تصحیح کنید.", surveyResults: "نتایج نظرسنجی: ", surveyResultsTable: "به صورت جدول", diff --git a/packages/survey-creator-core/src/localization/polish.ts b/packages/survey-creator-core/src/localization/polish.ts index 6a4862bd62..265047ba67 100644 --- a/packages/survey-creator-core/src/localization/polish.ts +++ b/packages/survey-creator-core/src/localization/polish.ts @@ -42,6 +42,14 @@ var polishStrings = { signaturepad: "Podpis", buttongroup: "Grupa przycisków" }, + toolbox_categories: { + general: "Ogólne", + choice: "Pytania wyboru", + text: "Pytania dotyczące wprowadzania tekstu", + containers: "Pojemniki", + matrix: "Pytania macierzowe", + misc: "Różne", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Domyślne ({0})", @@ -111,12 +119,6 @@ var polishStrings = { "property-grid": "Właściwości", propertyGridFilteredTextPlaceholder: "Wpisz, aby wyszukać...", propertyGridNoResultsFound: "Nie znaleziono wyników", - toolboxGeneralCategory: "Ogólne", - toolboxChoiceCategory: "Pytania wyboru", - toolboxTextCategory: "Pytania dotyczące wprowadzania tekstu", - toolboxContainersCategory: "Pojemniki", - toolboxMatrixCategory: "Pytania macierzowe", - toolboxMiscCategory: "Różne", correctJSON: "Please correct JSON.", surveyResults: "Wynik ankiety: ", surveyResultsTable: "Jako tabela", @@ -1642,12 +1644,6 @@ editorLocalization.locales["pl"] = polishStrings; // ed.pasteTooltip: "Paste from clipboard" => "Wklejanie ze schowka" // ed.property-grid: "Properties" => "Właściwości" // ed.propertyGridFilteredTextPlaceholder: "Type to search..." => "Wpisz, aby wyszukać..." -// ed.toolboxGeneralCategory: "General" => "Ogólne" -// ed.toolboxChoiceCategory: "Choice Questions" => "Pytania wyboru" -// ed.toolboxTextCategory: "Text Input Questions" => "Pytania dotyczące wprowadzania tekstu" -// ed.toolboxContainersCategory: "Containers" => "Pojemniki" -// ed.toolboxMatrixCategory: "Matrix Questions" => "Pytania macierzowe" -// ed.toolboxMiscCategory: "Misc" => "Różne" // ed.surveyResultsTable: "As Table" => "Jako tabela" // ed.surveyResultsJson: "As JSON" => "Jako JSON" // ed.resultsTitle: "Question Title" => "Tytuł pytania" diff --git a/packages/survey-creator-core/src/localization/portuguese.ts b/packages/survey-creator-core/src/localization/portuguese.ts index 530bcbfe12..474a0bdfc3 100644 --- a/packages/survey-creator-core/src/localization/portuguese.ts +++ b/packages/survey-creator-core/src/localization/portuguese.ts @@ -42,6 +42,14 @@ var portugueseTranslation = { signaturepad: "Caixa de Assinatura", buttongroup: "Grupo de Botões" }, + toolbox_categories: { + general: "Geral", + choice: "Questões de Escolha", + text: "Questões de Texto", + containers: "Áreas", + matrix: "Questões em Matriz", + misc: "Diversos", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Pré-definido ({0})", @@ -111,12 +119,6 @@ var portugueseTranslation = { "property-grid": "Propriedades", propertyGridFilteredTextPlaceholder: "Escreva para pesquisar...", propertyGridNoResultsFound: "Nenhum resultado encontrado", - toolboxGeneralCategory: "Geral", - toolboxChoiceCategory: "Questões de Escolha", - toolboxTextCategory: "Questões de Texto", - toolboxContainersCategory: "Áreas", - toolboxMatrixCategory: "Questões em Matriz", - toolboxMiscCategory: "Diversos", correctJSON: "Por favor corrija o JSON.", surveyResults: "Resultado da pesquisa: ", surveyResultsTable: "Como Tabela", diff --git a/packages/survey-creator-core/src/localization/russian.ts b/packages/survey-creator-core/src/localization/russian.ts index 62fe12b950..384c165d9e 100644 --- a/packages/survey-creator-core/src/localization/russian.ts +++ b/packages/survey-creator-core/src/localization/russian.ts @@ -42,6 +42,14 @@ export var ruStrings = { signaturepad: "Подпись", buttongroup: "Группа кнопок" }, + toolbox_categories: { + general: "Общие", + choice: "Вопросы выбора", + text: "Вопросы для ввода текста", + containers: "Контейнеры", + matrix: "Матричные вопросы", + misc: "Разное", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "По умолчанию ({0})", @@ -111,12 +119,6 @@ export var ruStrings = { "property-grid": "Свойства", propertyGridFilteredTextPlaceholder: "Введите для поиска...", propertyGridNoResultsFound: "Никаких результатов не найдено", - toolboxGeneralCategory: "Общие", - toolboxChoiceCategory: "Вопросы выбора", - toolboxTextCategory: "Вопросы для ввода текста", - toolboxContainersCategory: "Контейнеры", - toolboxMatrixCategory: "Матричные вопросы", - toolboxMiscCategory: "Разное", correctJSON: "Пожалуйста, исправьте JSON.", surveyResults: "Результаты обследования", surveyResultsTable: "Как таблица", diff --git a/packages/survey-creator-core/src/localization/simplified-chinese.ts b/packages/survey-creator-core/src/localization/simplified-chinese.ts index a8bdb20445..9e7da3542e 100644 --- a/packages/survey-creator-core/src/localization/simplified-chinese.ts +++ b/packages/survey-creator-core/src/localization/simplified-chinese.ts @@ -42,6 +42,14 @@ var simplifiedChineseTranslation = { signaturepad: "签名", buttongroup: "按钮组" }, + toolbox_categories: { + general: "一般", + choice: "选择题", + text: "文本输入问题", + containers: "器皿", + matrix: "矩阵问题", + misc: "杂项", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "默认语言 ({0})", @@ -111,12 +119,6 @@ var simplifiedChineseTranslation = { "property-grid": "性能", propertyGridFilteredTextPlaceholder: "键入以搜索...", propertyGridNoResultsFound: "未找到结果", - toolboxGeneralCategory: "一般", - toolboxChoiceCategory: "选择题", - toolboxTextCategory: "文本输入问题", - toolboxContainersCategory: "器皿", - toolboxMatrixCategory: "矩阵问题", - toolboxMiscCategory: "杂项", correctJSON: "请修正 JSON 数据", surveyResults: "问卷结果: ", surveyResultsTable: "表格形式", diff --git a/packages/survey-creator-core/src/localization/slovak.ts b/packages/survey-creator-core/src/localization/slovak.ts index 348b6cd783..0e39ba4105 100644 --- a/packages/survey-creator-core/src/localization/slovak.ts +++ b/packages/survey-creator-core/src/localization/slovak.ts @@ -42,6 +42,14 @@ export var skStrings = { signaturepad: "Priestor na podpis", buttongroup: "Skupina tlačidiel" }, + toolbox_categories: { + general: "Všeobecné", + choice: "Voľba Otázky", + text: "Otázky na zadávanie textu", + containers: "Kontajnery", + matrix: "Maticové otázky", + misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Predvolené ({0})", @@ -111,12 +119,6 @@ export var skStrings = { "property-grid": "Vlastnosti", propertyGridFilteredTextPlaceholder: "Zadajte reťazec pre vyhľadávanie...", propertyGridNoResultsFound: "Nenašli sa žiadne výsledky", - toolboxGeneralCategory: "Všeobecné", - toolboxChoiceCategory: "Voľba Otázky", - toolboxTextCategory: "Otázky na zadávanie textu", - toolboxContainersCategory: "Kontajnery", - toolboxMatrixCategory: "Maticové otázky", - toolboxMiscCategory: "Misc", correctJSON: "Opravte JSON.", surveyResults: "Výsledok prieskumu: ", surveyResultsTable: "Ako tabuľku", diff --git a/packages/survey-creator-core/src/localization/spanish.ts b/packages/survey-creator-core/src/localization/spanish.ts index c0e56d1082..b95a7444d2 100644 --- a/packages/survey-creator-core/src/localization/spanish.ts +++ b/packages/survey-creator-core/src/localization/spanish.ts @@ -42,6 +42,14 @@ var spanishTranslation = { signaturepad: "Almohadilla de firma", buttongroup: "Grupo de botones" }, + toolbox_categories: { + general: "general", + choice: "Preguntas de selección", + text: "Preguntas entrada de texto", + containers: "Contenedores", + matrix: "Preguntas matriz", + misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Predeterminado ({0})", @@ -111,12 +119,6 @@ var spanishTranslation = { "property-grid": "Propiedades", propertyGridFilteredTextPlaceholder: "Escribe para buscar...", propertyGridNoResultsFound: "No se han encontrado resultados", - toolboxGeneralCategory: "general", - toolboxChoiceCategory: "Preguntas de selección", - toolboxTextCategory: "Preguntas entrada de texto", - toolboxContainersCategory: "Contenedores", - toolboxMatrixCategory: "Preguntas matriz", - toolboxMiscCategory: "Misc", correctJSON: "Por favor, corrija JSON", surveyResults: "Resultado de la encuesta:", surveyResultsTable: "Como Tabla", diff --git a/packages/survey-creator-core/src/localization/swedish.ts b/packages/survey-creator-core/src/localization/swedish.ts index 86335f3966..877ee45314 100644 --- a/packages/survey-creator-core/src/localization/swedish.ts +++ b/packages/survey-creator-core/src/localization/swedish.ts @@ -42,6 +42,14 @@ export let svStrings = { signaturepad: "Underskrift", buttongroup: "Knappgrupp" }, + toolbox_categories: { + general: "Generellt", + choice: "Frågor om val", + text: "Frågor om textinmatning", + containers: "Behållare", + matrix: "Matris frågor", + misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Standard ({0})", @@ -111,12 +119,6 @@ export let svStrings = { "property-grid": "Egenskaper", propertyGridFilteredTextPlaceholder: "Skriv för att söka...", propertyGridNoResultsFound: "Inga resultat hittades", - toolboxGeneralCategory: "Generellt", - toolboxChoiceCategory: "Frågor om val", - toolboxTextCategory: "Frågor om textinmatning", - toolboxContainersCategory: "Behållare", - toolboxMatrixCategory: "Matris frågor", - toolboxMiscCategory: "Misc", correctJSON: "Var vänligen korrigera JSON.", surveyResults: "Enkät resultat: ", surveyResultsTable: "Som tabell", diff --git a/packages/survey-creator-core/src/localization/tajik.ts b/packages/survey-creator-core/src/localization/tajik.ts index 1aac79d013..0bee4ba04c 100644 --- a/packages/survey-creator-core/src/localization/tajik.ts +++ b/packages/survey-creator-core/src/localization/tajik.ts @@ -44,6 +44,14 @@ export var tgStrings = { // signaturepad: "Signature", // buttongroup: "Button Group" }, + toolbox_categories: { + general: "Умумӣ", + // choice: "Choice Questions", + // text: "Text Input Questions", + // containers: "Containers", + // matrix: "Matrix Questions", + // misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Бо нобаёнӣ ({0})", @@ -105,12 +113,6 @@ export var tgStrings = { toolbox: "Бастаи асбобҳо", // "property-grid": "Properties", // propertyGridFilteredTextPlaceholder: "Type to search...", - toolboxGeneralCategory: "Умумӣ", - // toolboxChoiceCategory: "Choice Questions", - // toolboxTextCategory: "Text Input Questions", - // toolboxContainersCategory: "Containers", - // toolboxMatrixCategory: "Matrix Questions", - // toolboxMiscCategory: "Misc", correctJSON: "Илтимос, JSON-ро дуруст кунед.", surveyResults: "Натиҷаи ташхис:", surveyResultsTable: "Ҳамчун ҷадвал", diff --git a/packages/survey-creator-core/src/localization/traditional-chinese.ts b/packages/survey-creator-core/src/localization/traditional-chinese.ts index 54631facf7..4abe97e33e 100644 --- a/packages/survey-creator-core/src/localization/traditional-chinese.ts +++ b/packages/survey-creator-core/src/localization/traditional-chinese.ts @@ -42,6 +42,14 @@ var traditionalChineseTranslation = { signaturepad: "簽名", buttongroup: "按鈕組" }, + toolbox_categories: { + general: "常規", + choice: "選擇題", + text: "文本輸入問題", + containers: "器皿", + matrix: "矩陣問題", + misc: "雜項", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "預設值 ({0})", @@ -111,12 +119,6 @@ var traditionalChineseTranslation = { "property-grid": "性能", propertyGridFilteredTextPlaceholder: "鍵入以搜尋...", propertyGridNoResultsFound: "未找到結果", - toolboxGeneralCategory: "常規", - toolboxChoiceCategory: "選擇題", - toolboxTextCategory: "文本輸入問題", - toolboxContainersCategory: "器皿", - toolboxMatrixCategory: "矩陣問題", - toolboxMiscCategory: "雜項", correctJSON: "修正 JSON", surveyResults: "問卷結果: ", surveyResultsTable: "如表", @@ -1642,12 +1644,6 @@ editorLocalization.locales["zh-tw"] = traditionalChineseTranslation; // ed.pasteTooltip: "Paste from clipboard" => "從剪貼簿粘貼" // ed.property-grid: "Properties" => "性能" // ed.propertyGridFilteredTextPlaceholder: "Type to search..." => "鍵入以搜尋..." -// ed.toolboxGeneralCategory: "General" => "常規" -// ed.toolboxChoiceCategory: "Choice Questions" => "選擇題" -// ed.toolboxTextCategory: "Text Input Questions" => "文本輸入問題" -// ed.toolboxContainersCategory: "Containers" => "器皿" -// ed.toolboxMatrixCategory: "Matrix Questions" => "矩陣問題" -// ed.toolboxMiscCategory: "Misc" => "雜項" // ed.surveyResultsTable: "As Table" => "如表" // ed.surveyResultsJson: "As JSON" => "作為 JSON" // ed.resultsTitle: "Question Title" => "問題標題" diff --git a/packages/survey-creator-core/src/localization/turkish.ts b/packages/survey-creator-core/src/localization/turkish.ts index 855280529b..49f830e80e 100644 --- a/packages/survey-creator-core/src/localization/turkish.ts +++ b/packages/survey-creator-core/src/localization/turkish.ts @@ -42,6 +42,14 @@ export var turkishStrings = { signaturepad: "İmza Defteri", buttongroup: "Düğme Grubu" }, + toolbox_categories: { + general: "Genel", + choice: "Seçim Soruları", + text: "Metin Girişi Soruları", + containers: "Konteyner", + matrix: "Matris Soruları", + misc: "Misc", + }, // Strings in SurveyJS Creator ed: { defaultLocale: "Varyayılan ({0})", @@ -111,12 +119,6 @@ export var turkishStrings = { "property-grid": "Özellikler", propertyGridFilteredTextPlaceholder: "Aramak için yazın...", propertyGridNoResultsFound: "Sonuç bulunamadı", - toolboxGeneralCategory: "Genel", - toolboxChoiceCategory: "Seçim Soruları", - toolboxTextCategory: "Metin Girişi Soruları", - toolboxContainersCategory: "Konteyner", - toolboxMatrixCategory: "Matris Soruları", - toolboxMiscCategory: "Misc", correctJSON: "JSON nesnesini doğrular.", surveyResults: "Anket Sonucu: ", surveyResultsTable: "Tablo olarak", diff --git a/packages/survey-creator-core/src/toolbox.ts b/packages/survey-creator-core/src/toolbox.ts index cab45c1232..25c1aa8a90 100644 --- a/packages/survey-creator-core/src/toolbox.ts +++ b/packages/survey-creator-core/src/toolbox.ts @@ -12,7 +12,8 @@ import { Question, Serializer, SurveyModel, - DragOrClickHelper + DragOrClickHelper, + HashTable } from "survey-core"; import { SurveyCreatorModel, toolboxLocationType } from "./creator-base"; import { editorLocalization, getLocString } from "./editorLocalization"; @@ -62,6 +63,7 @@ export interface IQuestionToolbox { export interface IToolboxCategoryDefinition { category: string; + title?: string; items: Array; } @@ -70,6 +72,7 @@ export class QuestionToolboxCategory extends Base { super(); } @property() name: string; + @property() title: string; @propertyArray() items: Array; @property({ defaultValue: false }) collapsed: boolean; public toggleState() { @@ -114,11 +117,11 @@ export class QuestionToolbox static hiddenTypes = ["buttongroup", "linkvalue", "embeddedsurvey", "spinedit", "color", "fileedit", "textwithreset", "commentwithreset"]; static defaultIconName = "icon-default"; static defaultCategories = { - toolboxChoiceCategory: ["radiogroup", "rating", "checkbox", "dropdown", "tagbox", "boolean", "file", "imagepicker", "ranking"], - toolboxTextCategory: ["text", "comment", "multipletext"], - toolboxContainersCategory: ["panel", "paneldynamic"], - toolboxMatrixCategory: ["matrix", "matrixdropdown", "matrixdynamic"], - toolboxMiscCategory: ["html", "expression", "image", "signaturepad"] + choice: ["radiogroup", "rating", "checkbox", "dropdown", "tagbox", "boolean", "file", "imagepicker", "ranking"], + text: ["text", "comment", "multipletext"], + containers: ["panel", "paneldynamic"], + matrix: ["matrix", "matrixdropdown", "matrixdynamic"], + misc: ["html", "expression", "image", "signaturepad"] } private _orderedQuestions = [ "radiogroup", "rating", "checkbox", "dropdown", "tagbox", "boolean", "file", "imagepicker", "ranking", @@ -220,6 +223,7 @@ export class QuestionToolbox * @see isCompact */ @property() forceCompact: boolean; + private categoriesTitles: HashTable = {}; constructor( private supportedQuestions: Array = null, @@ -254,13 +258,16 @@ export class QuestionToolbox const cat = QuestionToolbox.defaultCategories[key]; cat.forEach((name) => { if (!this.supportedQuestions || this.supportedQuestions.indexOf(name) != -1) { - questionCategoryMap[name] = getLocString("ed." + key); + questionCategoryMap[name] = key; } }); }); return questionCategoryMap; } - + private getCategoryTitle(name: string): string { + if(this.categoriesTitles[name]) return this.categoriesTitles[name]; + return getLocString("toolbox_categories." + name); + } private onActiveCategoryChanged(newValue: string) { const categories: Array = this.categories; //if(!this.allowExpandMultipleCategories) { @@ -493,6 +500,11 @@ export class QuestionToolbox this.updateActionTitle(action); this.updateActionTitle(action.innerItem); }); + if(Array.isArray(this.categories)) { + this.categories.forEach(category => { + category.title = this.getCategoryTitle(category.name); + }); + } } private updateActionTitle(action: IAction): void { const newTitle = editorLocalization.getString("qt." + action.id); @@ -570,8 +582,12 @@ export class QuestionToolbox this.actions.forEach(item => { item.visible = false; }); + this.categoriesTitles = {}; const actionList = new Array(); categories.forEach(category => { + if(!!category.category && !!category.title) { + this.categoriesTitles[category.category] = category.title; + } if (!Array.isArray(category.items)) return; category.items.forEach(obj => { let name = undefined; @@ -597,7 +613,7 @@ export class QuestionToolbox if(!item.visible) { if(displayMisc) { item.visible = true; - item.category = editorLocalization.getString("ed.toolboxMiscCategory"); + item.category = "misc"; } actionList.push(item); } @@ -678,7 +694,7 @@ export class QuestionToolbox categories[i].collapsed = isCollapsed; } } - private getCategoryByName(categoryName: string): any { + public getCategoryByName(categoryName: string): QuestionToolboxCategory { const categories = this.categories; for (var i = 0; i < categories.length; i++) { var category = categories[i]; @@ -693,10 +709,11 @@ export class QuestionToolbox for (let i = 0; i < this.actions.length; i++) { const item = this.actions[i]; if(item.visible === false) continue; - const categoryName = item.category ? item.category : editorLocalization.getString("ed.toolboxGeneralCategory"); + const categoryName = item.category ? item.category : "general"; if (!categoriesHash[categoryName]) { const category = this.createCategory(); category.name = categoryName; + category.title = this.getCategoryTitle(categoryName); category.collapsed = categoryName !== prevActiveCategory && !this.keepAllCategoriesExpanded; categoriesHash[categoryName] = category; categories.push(category); diff --git a/packages/survey-creator-core/tests/localization.tests.ts b/packages/survey-creator-core/tests/localization.tests.ts index d83d685fc7..774880c47a 100644 --- a/packages/survey-creator-core/tests/localization.tests.ts +++ b/packages/survey-creator-core/tests/localization.tests.ts @@ -174,26 +174,35 @@ test("Change Creator locale property", (): any => { }, pe: { title: "Titel", - format: "Format de" + format: "Format de", + survey: { + title: "Survey titel", + } }, qt: { text: "Text" + }, + toolbox_categories: { + choice: "Choices de" } }; editorLocalization.locales["de"] = deutschStrings; const creator = new CreatorTester({ showLogicTab: true, showTranslationTab: true }); + creator.toolbox.showCategoryTitles = true; creator.JSON = { pages: [{ name: "page1", elements: [{ type: "text", name: "q1" }, { type: "expression", name: "q2" }] }] }; - expect(creator.propertyGrid.getQuestionByName("title").title).toEqual("Title"); const tabButton = creator.tabs.filter(item => item.title === "Logic")[0]; const tabPreview = creator.tabs.filter(item => item.title === "Preview")[0]; const textQuestion = creator.toolbox.actions.filter(item => item.title === "Single-Line Input")[0]; const saveAction = creator.toolbar.actions.filter(item => item.title === "Save Survey")[0]; + const choiceCategory = creator.toolbox.categories.filter(item => item.name === "choice")[0]; expect(tabPreview).toBeTruthy(); + const surveyTitle = creator.propertyGrid.getQuestionByName("title").title; creator.locale = "de"; - expect(creator.propertyGrid.getQuestionByName("title").title).toEqual("Titel"); + expect(creator.propertyGrid.getQuestionByName("title").title).toEqual("Survey titel"); expect(tabButton.title).toEqual("Logik"); expect(textQuestion.title).toEqual("Text"); + expect(choiceCategory.title).toEqual("Choices de"); expect(textQuestion.innerItem.title).toEqual("Text"); expect(saveAction.locTitle.text).toEqual("Umfrage speichern"); creator.selectElement(creator.survey.getQuestionByName("q2")); @@ -201,8 +210,9 @@ test("Change Creator locale property", (): any => { creator.selectElement(creator.survey); creator.locale = ""; - expect(creator.propertyGrid.getQuestionByName("title").title).toEqual("Title"); + expect(creator.propertyGrid.getQuestionByName("title").title).toEqual(surveyTitle); expect(tabButton.title).toEqual("Logic"); + expect(choiceCategory.title).toEqual("Choice Questions"); expect(textQuestion.title).toEqual("Single-Line Input"); expect(textQuestion.innerItem.title).toEqual("Single-Line Input"); expect(saveAction.title).toEqual("Save Survey"); diff --git a/packages/survey-creator-core/tests/toolbox.tests.ts b/packages/survey-creator-core/tests/toolbox.tests.ts index ecc3e470b4..57c325bda1 100644 --- a/packages/survey-creator-core/tests/toolbox.tests.ts +++ b/packages/survey-creator-core/tests/toolbox.tests.ts @@ -130,9 +130,9 @@ test("toolbox default categories calculator", (): any => { "matrix" ]); expect(toolbox["getDefaultQuestionCategories"]()).toEqual({ - "radiogroup": "Choice Questions", - "dropdown": "Choice Questions", - "matrix": "Matrix Questions" }); + "radiogroup": "choice", + "dropdown": "choice", + "matrix": "matrix" }); }); test("toolbox default categories actions separator", (): any => { @@ -233,7 +233,7 @@ test("toolbox categories + allowExpandMultipleCategories property", (): any => { { name: "comment", category: "comment" }, { name: "matrix", category: "matrix" } ]); - expect(toolbox.activeCategory).toEqual("General"); + expect(toolbox.activeCategory).toEqual("general"); expect(toolbox.categories[0].collapsed).toBeFalsy(); toolbox.allowExpandMultipleCategories = true; expect(toolbox.categories[0].collapsed).toBeTruthy(); @@ -283,7 +283,7 @@ test("toolbox categories + keepAllCategoriesExpanded property", (): any => { { name: "comment", category: "comment" }, { name: "matrix", category: "matrix" } ]); - expect(toolbox.activeCategory).toEqual("General"); + expect(toolbox.activeCategory).toEqual("general"); expect(toolbox.canCollapseCategories).toBeTruthy(); toolbox.keepAllCategoriesExpanded = true; expect(toolbox.activeCategory).toBeFalsy(); @@ -347,13 +347,14 @@ test("toolbox categories defineCategories, #2", (): any => { expect(items[1].name).toBe("comment"); toolbox.defineCategories([ - { category: "text", items: [{ name: "text" }, "comment"] }, + { category: "text", title: "Single text item", items: [{ name: "text" }, "comment"] }, { category: "select", items: ["dropdown", "checkbox", "radiogroup"] }, ], true); expect(toolbox.categories).toHaveLength(3); expect(toolbox.categories[0].name).toBe("text"); + expect(toolbox.categories[0].title).toBe("Single text item"); expect(toolbox.categories[1].name).toBe("select"); - expect(toolbox.categories[2].name).toBe("Misc"); + expect(toolbox.categories[2].name).toBe("misc"); items = toolbox.categories[0].items; expect(items).toHaveLength(2); expect(items[0].name).toBe("text"); diff --git a/packages/survey-creator-knockout/src/toolbox/adaptive-toolbox.html b/packages/survey-creator-knockout/src/toolbox/adaptive-toolbox.html index 63a1e30d9a..8f684737a3 100644 --- a/packages/survey-creator-knockout/src/toolbox/adaptive-toolbox.html +++ b/packages/survey-creator-knockout/src/toolbox/adaptive-toolbox.html @@ -6,7 +6,7 @@
- +
- +
this.category.toggleState()}> - {this.category.name} + {this.category.title} {this.renderButton()}
); diff --git a/packages/survey-creator-vue/src/toolbox/ToolboxCategory.vue b/packages/survey-creator-vue/src/toolbox/ToolboxCategory.vue index 177459baeb..0ef6faa94d 100644 --- a/packages/survey-creator-vue/src/toolbox/ToolboxCategory.vue +++ b/packages/survey-creator-vue/src/toolbox/ToolboxCategory.vue @@ -12,7 +12,7 @@ toolbox.canCollapseCategories, }" > - {{ category.name }} + {{ category.title }}
{ await t.resizeWindow(2560, 1440); const toolboxElement = Selector(".svc-toolbox"); await setJSON({ pages: [{ name: "page1" }] }); - await ClientFunction(() => { window["creator"].toolbox.changeCategories([{ name: "matrixdropdown", category: "matrix" }]); })(); + await ClientFunction(() => { window["creator"].toolbox.changeCategories([{ name: "matrixdropdown", category: "matrix-custom" }]); })(); await ClientFunction(() => { window["creator"].toolbox.showCategoryTitles = true; })(); await ClientFunction(() => { window["creator"].toolbox.allowExpandMultipleCategories = true; })(); - await t.expect(Selector(".svc-toolbox__category-header--collapsed").withText("matrix").visible).ok(); + await t.expect(Selector(".svc-toolbox__category-header--collapsed").withText("matrix-custom").visible).ok(); await takeElementScreenshot("toolbox-categories-collapsed.png", toolboxElement, t, comparer); }); });