feat(bisaya-course): enhance German course content and localization support
All checks were successful
Deploy to production / deploy (push) Successful in 2m47s
All checks were successful
Deploy to production / deploy (push) Successful in 2m47s
- Updated the create-german-for-bisaya-course-content.js script to improve lesson pattern retrieval by introducing a new function for generating a lesson pattern pool. - Added new exercises for various topics including 'Wohnung & Nachbarn', 'Besuch empfangen', 'Arzt, Apotheke, Termin', and 'Amt, Dokumente, Anmeldung', enhancing practical language skills for learners. - Improved localization by integrating translation keys for various UI elements and error messages across multiple components, ensuring a consistent user experience in both German and Bisaya. - Enhanced the main.js file to recognize Bisaya language preferences in browser settings, improving accessibility for users.
This commit is contained in:
@@ -54,6 +54,11 @@ const store = createStore({
|
||||
language: (() => {
|
||||
// Verwende die gleiche Logik wie in main.js
|
||||
const browserLanguage = navigator.language || navigator.languages[0];
|
||||
|
||||
if (browserLanguage.startsWith('ceb') || browserLanguage.startsWith('bis')) {
|
||||
return 'ceb';
|
||||
}
|
||||
|
||||
const germanSpeakingCountries = ['de', 'at', 'ch', 'li'];
|
||||
|
||||
if (browserLanguage.startsWith('de')) {
|
||||
@@ -62,6 +67,9 @@ const store = createStore({
|
||||
|
||||
const allLanguages = navigator.languages || [navigator.language];
|
||||
for (const lang of allLanguages) {
|
||||
if (lang.startsWith('ceb') || lang.startsWith('bis')) {
|
||||
return 'ceb';
|
||||
}
|
||||
if (lang.startsWith('de-')) {
|
||||
const countryCode = lang.split('-')[1]?.toLowerCase();
|
||||
if (germanSpeakingCountries.includes(countryCode)) {
|
||||
@@ -104,6 +112,12 @@ const store = createStore({
|
||||
|
||||
// Setze die Sprache auf die Browser-Sprache zurück
|
||||
const browserLanguage = navigator.language || navigator.languages[0];
|
||||
|
||||
if (browserLanguage.startsWith('ceb') || browserLanguage.startsWith('bis')) {
|
||||
state.language = 'ceb';
|
||||
return;
|
||||
}
|
||||
|
||||
const germanSpeakingCountries = ['de', 'at', 'ch', 'li'];
|
||||
|
||||
if (browserLanguage.startsWith('de')) {
|
||||
@@ -112,6 +126,10 @@ const store = createStore({
|
||||
const allLanguages = navigator.languages || [navigator.language];
|
||||
let isGerman = false;
|
||||
for (const lang of allLanguages) {
|
||||
if (lang.startsWith('ceb') || lang.startsWith('bis')) {
|
||||
state.language = 'ceb';
|
||||
return;
|
||||
}
|
||||
if (lang.startsWith('de-')) {
|
||||
const countryCode = lang.split('-')[1]?.toLowerCase();
|
||||
if (germanSpeakingCountries.includes(countryCode)) {
|
||||
|
||||
Reference in New Issue
Block a user