Skip to content

Commit

Permalink
🥩feat:添加国际化语言包
Browse files Browse the repository at this point in the history
  • Loading branch information
durunsong committed Nov 18, 2024
1 parent f2e1131 commit 4b288ce
Show file tree
Hide file tree
Showing 18 changed files with 371 additions and 21 deletions.
23 changes: 17 additions & 6 deletions src/components/TourVisible/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
v-for="(item, index) in props.data"
:key="index"
:target="item.target"
:title="item.title ? item.title : `第${currentStep + 1}步`"
:title="
item.title
? item.title
: t('tour_step', { currentStep: currentStep + 1 })
"
:description="item.description"
:prev-button-props="{
children: '上一步',
children: t('tour_prev'),
onClick: handlePrevClick,
}"
:next-button-props="{
Expand All @@ -17,7 +21,9 @@
:placement="item.placement"
></el-tour-step>
<template #indicators>
<el-button size="small" @click="handleSkip">跳过</el-button>
<el-button size="small" @click="handleSkip">{{
t("tour_skip")
}}</el-button>
</template>
</el-tour>
</template>
Expand All @@ -26,7 +32,9 @@
import { ref, computed, type Ref, type ComputedRef } from "vue";
import CACHE_KEY from "@/constants/cache-key";
import { setLocalData } from "@/utils/cache/local-storage";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
const props = defineProps(["data"]);
const emits = defineEmits([
"change",
Expand All @@ -46,11 +54,14 @@ const open: Ref<boolean> = ref(false);
const nextBtnName: ComputedRef<string> = computed(() => {
let name = "";
if (currentStep.value === 0) {
name = "开始";
name = t("tour_start");
} else if (currentStep.value === props.data.length - 1) {
name = "完成";
name = t("tour_complete");
} else {
name = `下一步(${currentStep.value + 1} / ${props.data.length})`;
name = t("tour_nextStep", {
currentStep: currentStep.value + 1,
totalSteps: props.data.length,
});
}
return name;
});
Expand Down
21 changes: 21 additions & 0 deletions src/i18n/package/ara.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,27 @@ const ara = {
Selecting_a_Character: "اختيار الأدوار",
Get_Success: "الحصول على النجاح",
error_occurs: "حدث خطأ",
tour_step: "الخطوة { currentstep }",
tour_start: "نقطة الانطلاق",
tour_complete: "اكتمل",
tour_nextStep: "الخطوة التالية ( { currentstep } / { totalsteps }",
tour_prev: "الصفحة السابقة",
tour_skip: "تخطي",
tour_welcomeTitle: "مرحبا بكم في kilyicms",
tour_welcomeDescription: "انقر على الاستمرار",
tour_menuDescription: "قائمة الشريط الجانبي الأيسر",
tour_toggleButtonDescription: "زر توسيع / للطي",
tour_breadcrumbDescription: "فتات الخبز الملاحة",
tour_tabNavigationDescription: "تبويب الملاحة",
tour_menuSearchDescription: "قائمة البحث",
tour_fullscreenDescription: "كامل الشاشة التبديل",
tour_themeSwitchDescription: "موضوع التبديل",
tour_languageSwitchTitle: "تدويل",
tour_languageSwitchDescription: "لغة التبديل",
tour_notificationDescription: "رسالة الإخطار",
tour_userSettingsDescription: "إعدادات المستخدم",
tour_customSettingsTitle: "إعدادات مخصصة",
tour_customSettingsDescription: "إعدادات النظام",
};

export default ara;
21 changes: 21 additions & 0 deletions src/i18n/package/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,5 +248,26 @@ const de = {
Selecting_a_Character: "Auswählen eines Zeichens",
Get_Success: "Erfolg erzielen",
error_occurs: "Fehler tritt auf",
tour_step: "Schritt {currentStep}",
tour_start: "Start",
tour_complete: "Vollständig",
tour_nextStep: "Nächster Schritt ({currentStep}/ {totalSteps})",
tour_prev: "Vorherige",
tour_skip: "Überspringen",
tour_welcomeTitle: "Willkommen in Kilyicms",
tour_welcomeDescription: "Klicken Sie hier, um die Einführung fortzusetzen",
tour_menuDescription: "Menü der linken Seitenleiste",
tour_toggleButtonDescription: "Schaltfläche Erweitern/Zusammenklappen",
tour_breadcrumbDescription: "Breadcrumb Navigation",
tour_tabNavigationDescription: "Tab-Navigation",
tour_menuSearchDescription: "Menüsuche",
tour_fullscreenDescription: "Vollbild-Umschalter",
tour_themeSwitchDescription: "Theme-Schalter",
tour_languageSwitchTitle: "Internationalisierung",
tour_languageSwitchDescription: "Sprachumschaltung",
tour_notificationDescription: "Mitteilungen",
tour_userSettingsDescription: "Benutzereinstellungen",
tour_customSettingsTitle: "Benutzerdefinierte Einstellungen",
tour_customSettingsDescription: "Systemeinstellungen",
};
export default de;
21 changes: 21 additions & 0 deletions src/i18n/package/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,27 @@ const el = {
Selecting_a_Character: "Επιλογή ενός χαρακτήρα",
Get_Success: "Αποκτήστε επιτυχία",
error_occurs: "Εμφανίζεται σφάλμα",
tour_step: "Βήμα {currentStep}",
tour_start: "Έναρξη",
tour_complete: "Ολοκληρωμένο",
tour_nextStep: "Επόμενο βήμα ({currentStep}/ {totalSteps})",
tour_prev: "Προηγούμενο",
tour_skip: "Παράλειψη",
tour_welcomeTitle: "Καλώς ήρθατε στο Kilyicms",
tour_welcomeDescription: "Κάντε κλικ για να συνεχίσετε την εισαγωγή",
tour_menuDescription: "Μενού αριστερής πλευρικής γραμμής",
tour_toggleButtonDescription: "Κουμπί επέκτασης/συμπίεσης",
tour_breadcrumbDescription: "Πλοήγηση ψωμιού",
tour_tabNavigationDescription: "Πλοήγηση καρτέλας",
tour_menuSearchDescription: "Αναζήτηση μενού",
tour_fullscreenDescription: "Εναλλαγή πλήρους οθόνης",
tour_themeSwitchDescription: "Διακόπτης θέματος",
tour_languageSwitchTitle: "Διεθνοποίηση",
tour_languageSwitchDescription: "Αλλαγή γλώσσας",
tour_notificationDescription: "Ειδοποιήσεις μηνυμάτων",
tour_userSettingsDescription: "Ρυθμίσεις χρήστη",
tour_customSettingsTitle: "Προσαρμοσμένες ρυθμίσεις",
tour_customSettingsDescription: "Ρυθμίσεις συστήματος",
};

export default el;
21 changes: 21 additions & 0 deletions src/i18n/package/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,27 @@ const en = {
Get_Success: "Get Success",
error_occurs: "Error occurs",
router_translation_process: "Translation process",
tour_step: "Step {currentStep}",
tour_start: "Start",
tour_complete: "Complete",
tour_nextStep: "Next Step ({currentStep} / {totalSteps})",
tour_prev: "Previous",
tour_skip: "Skip",
tour_welcomeTitle: "Welcome to Kilyicms",
tour_welcomeDescription: "Click to continue the introduction",
tour_menuDescription: "Left sidebar menu",
tour_toggleButtonDescription: "Expand/Collapse button",
tour_breadcrumbDescription: "Breadcrumb navigation",
tour_tabNavigationDescription: "Tab navigation",
tour_menuSearchDescription: "Menu search",
tour_fullscreenDescription: "Fullscreen toggle",
tour_themeSwitchDescription: "Theme switch",
tour_languageSwitchTitle: "Internationalization",
tour_languageSwitchDescription: "Language switch",
tour_notificationDescription: "Message notifications",
tour_userSettingsDescription: "User settings",
tour_customSettingsTitle: "Custom Settings",
tour_customSettingsDescription: "System settings",
};

export default en;
21 changes: 21 additions & 0 deletions src/i18n/package/fra.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,27 @@ const fra = {
Selecting_a_Character: "Choisir un rôle",
Get_Success: "Obtenir le succès",
error_occurs: "Une erreur est survenue",
tour_step: "Étape {currentstep}",
tour_start: "Point de départ",
tour_complete: "Terminé",
tour_nextStep: "Suivant ({currentstep} / {totalsteps})",
tour_prev: "Page précédente",
tour_skip: "Sauter",
tour_welcomeTitle: "Bienvenue à kilyicms",
tour_welcomeDescription: "Cliquez pour continuer Introduction",
tour_menuDescription: "Menu de la barre latérale gauche",
tour_toggleButtonDescription: "Bouton déplier / plier",
tour_breadcrumbDescription: "Navigation des miettes",
tour_tabNavigationDescription: "Navigation des onglets",
tour_menuSearchDescription: "Menu recherche",
tour_fullscreenDescription: "Commutation plein écran",
tour_themeSwitchDescription: "Changement de thème",
tour_languageSwitchTitle: "Internationalisation",
tour_languageSwitchDescription: "Changement de langue",
tour_notificationDescription: "Notification des messages",
tour_userSettingsDescription: "Paramètres utilisateur",
tour_customSettingsTitle: "Paramètres personnalisés",
tour_customSettingsDescription: "Paramètres du système",
};

export default fra;
21 changes: 21 additions & 0 deletions src/i18n/package/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,27 @@ const it = {
Selecting_a_Character: "Selezione di un carattere",
Get_Success: "Ottenere successo",
error_occurs: "Si verifica un errore",
tour_step: "Passo {currentStep}",
tour_start: "inizio",
tour_complete: "Completato",
tour_nextStep: "Passaggio successivo ({currentStep} / {totalSteps})",
tour_prev: "Precedente",
tour_skip: "Salta",
tour_welcomeTitle: "Benvenuti a Kilyicms",
tour_welcomeDescription: "Clicca per continuare l'introduzione",
tour_menuDescription: "Menu della barra laterale sinistra",
tour_toggleButtonDescription: "Pulsante Espandi/Riduci",
tour_breadcrumbDescription: "Navigazione breadcrumb",
tour_tabNavigationDescription: "Navigazione delle schede",
tour_menuSearchDescription: "Ricerca menu",
tour_fullscreenDescription: "Commutazione a schermo intero",
tour_themeSwitchDescription: "Cambia tema",
tour_languageSwitchTitle: "Internazionalizzazione",
tour_languageSwitchDescription: "Cambio lingua",
tour_notificationDescription: "Notifiche dei messaggi",
tour_userSettingsDescription: "Impostazioni utente",
tour_customSettingsTitle: "Impostazioni personalizzate",
tour_customSettingsDescription: "Impostazioni di sistema",
};

export default it;
21 changes: 21 additions & 0 deletions src/i18n/package/jp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,26 @@ const jp = {
Selecting_a_Character: "ロールの選択",
Get_Success: "取得に成功しました",
error_occurs: "エラーが発生しました",
tour_step: "ステップ{currentStep}",
tour_start: "スタート",
tour_complete: "完了",
tour_nextStep: "次へ({currentStep}/{totalSteps})",
tour_prev: "前へ",
tour_skip: "スキップ",
tour_welcomeTitle: "kilyicmsへようこそ",
tour_welcomeDescription: "続行をクリックして紹介を開始します",
tour_menuDescription: "左のメニューバー",
tour_toggleButtonDescription: "折りたたみボタンを展開",
tour_breadcrumbDescription: "パン屑ナビゲーション",
tour_tabNavigationDescription: "タブページのナビゲーション",
tour_menuSearchDescription: "メニュー検索",
tour_fullscreenDescription: "全画面切り替え",
tour_themeSwitchDescription: "トピックの切り替え",
tour_languageSwitchTitle: "国際化",
tour_languageSwitchDescription: "多言語切り替え",
tour_notificationDescription: "メッセージ通知",
tour_userSettingsDescription: "個人設定",
tour_customSettingsTitle: "カスタム設定",
tour_customSettingsDescription: "システム設定",
};
export default jp;
21 changes: 21 additions & 0 deletions src/i18n/package/kor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,5 +244,26 @@ const kor = {
Selecting_a_Character: "역할 선택",
Get_Success: "성공",
error_occurs: "오류 발생",
tour_step: "{currentStep} 단계",
tour_start: "시작",
tour_complete: "완료",
tour_nextStep: "다음({currentStep} / {totalSteps})",
tour_prev: "이전 단계",
tour_skip: "건너뛰기",
tour_welcomeTitle: "kilyicms에 오신 것을 환영합니다.",
tour_welcomeDescription: "클릭하여 계속 소개 시작",
tour_menuDescription: "왼쪽 메뉴 표시줄",
tour_toggleButtonDescription: "확장 축소 버튼",
tour_breadcrumbDescription: "빵 부스러기 내비게이션",
tour_tabNavigationDescription: "탭 탐색",
tour_menuSearchDescription: "메뉴 검색",
tour_fullscreenDescription: "전체 화면 전환",
tour_themeSwitchDescription: "테마 전환",
tour_languageSwitchTitle: "국제화",
tour_languageSwitchDescription: "다국어 전환",
tour_notificationDescription: "메시지 알림",
tour_userSettingsDescription: "개인 설정",
tour_customSettingsTitle: "사용자 정의 설정",
tour_customSettingsDescription: "시스템 설정",
};
export default kor;
21 changes: 21 additions & 0 deletions src/i18n/package/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,27 @@ const nl = {
Selecting_a_Character: "Een teken selecteren",
Get_Success: "Succes behalen",
error_occurs: "Fout treedt op",
tour_step: "Stap {currentStep}",
tour_start: "Start",
tour_complete: "Compleet",
tour_nextStep: "Volgende stap ({currentStep}/ {totalSteps})",
tour_prev: "Vorige",
tour_skip: "Skip",
tour_welcomeTitle: "Welkom in Kilyicms",
tour_welcomeDescription: "Klik om de introductie voort te zetten",
tour_menuDescription: "Menu aan de linkerkant",
tour_toggleButtonDescription: "Knop uitvouwen/samenvouwen",
tour_breadcrumbDescription: "Broodkrumb navigatie",
tour_tabNavigationDescription: "Tabbladnavigatie",
tour_menuSearchDescription: "Menu zoeken",
tour_fullscreenDescription: "Volledig scherm omschakelen",
tour_themeSwitchDescription: "Themaschakelaar",
tour_languageSwitchTitle: "Internationalisering",
tour_languageSwitchDescription: "Taalschakelaar",
tour_notificationDescription: "Berichtmeldingen",
tour_userSettingsDescription: "Gebruikersinstellingen",
tour_customSettingsTitle: "Aangepaste instellingen",
tour_customSettingsDescription: "Systeeminstellingen",
};

export default nl;
21 changes: 21 additions & 0 deletions src/i18n/package/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,27 @@ const pl = {
Selecting_a_Character: "Wybieranie znaku",
Get_Success: "Uzyskaj sukces",
error_occurs: "Występuje błąd",
tour_step: "Krok {currentStep}",
tour_start: "Uruchom",
tour_complete: "Kompletny",
tour_nextStep: "Następny krok ({currentStep}/ {totalSteps})",
tour_prev: "Poprzednie",
tour_skip: "Pomiń",
tour_welcomeTitle: "Witamy w Kilyicms",
tour_welcomeDescription: "Kliknij, aby kontynuować wprowadzenie",
tour_menuDescription: "Menu na lewym pasku bocznym",
tour_toggleButtonDescription: "Przycisk Rozwiń/Zwiń",
tour_breadcrumbDescription: "Nawigacja chlebowa",
tour_tabNavigationDescription: "Nawigacja kart",
tour_menuSearchDescription: "Wyszukiwanie menu",
tour_fullscreenDescription: "Przełączanie pełnego ekranu",
tour_themeSwitchDescription: "Przełącznik motywu",
tour_languageSwitchTitle: "Międzynarodowienie",
tour_languageSwitchDescription: "Przełącznik języka",
tour_notificationDescription: "Powiadomienia o wiadomościach",
tour_userSettingsDescription: "Ustawienia użytkownika",
tour_customSettingsTitle: "Ustawienia niestandardowe",
tour_customSettingsDescription: "Ustawienia systemowe",
};

export default pl;
21 changes: 21 additions & 0 deletions src/i18n/package/pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,27 @@ const pt = {
Selecting_a_Character: "Seleccionar um Caractere",
Get_Success: "Obter Sucesso",
error_occurs: "Ocorre um erro",
tour_step: "Passo {currentStep}",
tour_start: "Iniciar",
tour_complete: "Completo",
tour_nextStep: "Próximo Passo ({currentStep} / {totalSteps})",
tour_prev: "Anterior",
tour_skip: "Saltar",
tour_welcomeTitle: "Bem-vindos a Kilyicms.",
tour_welcomeDescription: "Carregue para continuar a introdução",
tour_menuDescription: "Menu da barra lateral esquerda",
tour_toggleButtonDescription: "Botão Expandir/Recolher",
tour_breadcrumbDescription: "Navegação do breadcrumb",
tour_tabNavigationDescription: "Navegação de páginas",
tour_menuSearchDescription: "Pesquisa no menu",
tour_fullscreenDescription: "Comutação de Ecrã Completo",
tour_themeSwitchDescription: "Comutador do tema",
tour_languageSwitchTitle: "Internacionalização",
tour_languageSwitchDescription: "Mudança de idioma",
tour_notificationDescription: "Notificações de mensagens",
tour_userSettingsDescription: "Configuração do utilizador",
tour_customSettingsTitle: "Configuração Personalizada",
tour_customSettingsDescription: "Configuração do sistema",
};

export default pt;
21 changes: 21 additions & 0 deletions src/i18n/package/rom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,5 +247,26 @@ const rom = {
Selecting_a_Character: "Selectarea unui caracter",
Get_Success: "Obține succes",
error_occurs: "Eroare apare",
tour_step: "Pasul {curentStep}",
tour_start: "Pornește",
tour_complete: "Complet",
tour_nextStep: "Pasul următor ({currentStep} / {totalSteps})",
tour_prev: "Anterior",
tour_skip: "Sari",
tour_welcomeTitle: "Bun venit la Kilyicms",
tour_welcomeDescription: "Faceți clic pentru a continua introducerea",
tour_menuDescription: "Meniul barei laterale stânga",
tour_toggleButtonDescription: "Butonul Extindere/Reducere",
tour_breadcrumbDescription: "Navigare cu crumb de pâine",
tour_tabNavigationDescription: "Navigare tab",
tour_menuSearchDescription: "Căutare meniu",
tour_fullscreenDescription: "Comutare pe tot ecranul",
tour_themeSwitchDescription: "Comutator tematic",
tour_languageSwitchTitle: "Internaționalizarea",
tour_languageSwitchDescription: "Comutator de limbă",
tour_notificationDescription: "Notificări mesaje",
tour_userSettingsDescription: "Setări utilizator",
tour_customSettingsTitle: "Configurări personalizate",
tour_customSettingsDescription: "Setări sistem",
};
export default rom;
Loading

0 comments on commit 4b288ce

Please sign in to comment.