commit
c3ef680f56
|
@ -1412,6 +1412,7 @@
|
|||
"core.openinbrowser": "local_moodlemobileapp",
|
||||
"core.othergroups": "group",
|
||||
"core.pagea": "moodle",
|
||||
"core.parentlanguage": "langconfig",
|
||||
"core.paymentinstant": "moodle",
|
||||
"core.percentagenumber": "local_moodlemobileapp",
|
||||
"core.phone": "moodle",
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"addon.mod_assign.markingworkflowstate": "Grading workflow state",
|
||||
"addon.mod_assign.markingworkflowstateinmarking": "In grading",
|
||||
"addon.mod_assign.markingworkflowstatenotmarked": "Not graded",
|
||||
"addon.mod_assign.markingworkflowstatereadyforreview": "Grading completed",
|
||||
"addon.mod_quiz.marks": "Points",
|
||||
"core.courses.notenroled": "You are not enrolled in this course",
|
||||
"core.decsep": ".",
|
||||
"core.labelsep": ":",
|
||||
"core.listsep": ",",
|
||||
"core.login.loginsteps": "For full access to this site, you first need to create an account.",
|
||||
"core.paymentinstant": "Use the button below to pay and be enrolled within minutes!",
|
||||
"core.settings.license": "License",
|
||||
"core.thisdirection": "ltr",
|
||||
"core.user.lastname": "Last name"
|
||||
}
|
|
@ -6,7 +6,7 @@
|
|||
"versionname" : "3.5.2",
|
||||
"cache_expiration_time" : 300000,
|
||||
"default_lang" : "en",
|
||||
"languages": {"ar": "عربي", "bg": "Български", "ca": "Català", "cs": "Čeština", "da": "Dansk", "de": "Deutsch", "de-du": "Deutsch - Du", "el": "Ελληνικά", "en": "English", "es": "Español", "es-mx": "Español - México", "eu": "Euskara", "fa": "فارسی", "fi": "Suomi", "fr" : "Français", "he" : "עברית", "hu": "magyar", "it": "Italiano", "ja": "日本語", "ko" : "한국어", "lt" : "Lietuvių", "mr": "मराठी", "nl": "Nederlands", "pl": "Polski", "pt-br": "Português - Brasil", "pt": "Português - Portugal", "ro": "Română", "ru": "Русский", "sr-cr": "Српски", "sr-lt": "Srpski", "sv": "Svenska", "tr" : "Türkçe", "uk" : "Українська", "zh-cn" : "简体中文", "zh-tw" : "正體中文"},
|
||||
"languages": {"ar": "عربي", "bg": "Български", "ca": "Català", "cs": "Čeština", "da": "Dansk", "de": "Deutsch", "de-du": "Deutsch - Du", "el": "Ελληνικά", "en": "English", "en-us": "English - United States","es": "Español", "es-mx": "Español - México", "eu": "Euskara", "fa": "فارسی", "fi": "Suomi", "fr" : "Français", "he" : "עברית", "hu": "magyar", "it": "Italiano", "ja": "日本語", "ko" : "한국어", "lt" : "Lietuvių", "mr": "मराठी", "nl": "Nederlands", "pl": "Polski", "pt-br": "Português - Brasil", "pt": "Português - Portugal", "ro": "Română", "ru": "Русский", "sr-cr": "Српски", "sr-lt": "Srpski", "sv": "Svenska", "tr" : "Türkçe", "uk" : "Українська", "zh-cn" : "简体中文", "zh-tw" : "正體中文"},
|
||||
"wsservice" : "moodle_mobile_app",
|
||||
"wsextservice" : "local_mobile",
|
||||
"demo_sites": {"student": {"url": "https://school.demo.moodle.net", "username": "student", "password": "moodle"}, "teacher": {"url": "https://school.demo.moodle.net", "username": "teacher", "password": "moodle"}},
|
||||
|
|
|
@ -174,6 +174,7 @@
|
|||
"openinbrowser": "Open in browser",
|
||||
"othergroups": "Other groups",
|
||||
"pagea": "Page {{$a}}",
|
||||
"parentlanguage": "",
|
||||
"paymentinstant": "Use the button below to pay and be enrolled within minutes!",
|
||||
"percentagenumber": "{{$a}}%",
|
||||
"phone": "Phone",
|
||||
|
|
|
@ -40,8 +40,7 @@ export class CoreLangProvider {
|
|||
|
||||
platform.ready().then(() => {
|
||||
this.getCurrentLanguage().then((language) => {
|
||||
translate.use(language);
|
||||
moment.locale(language);
|
||||
this.changeCurrentLanguage(language);
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -97,7 +96,30 @@ export class CoreLangProvider {
|
|||
// Change the language, resolving the promise when we receive the first value.
|
||||
promises.push(new Promise((resolve, reject): void => {
|
||||
const subscription = this.translate.use(language).subscribe((data) => {
|
||||
resolve(data);
|
||||
// It's a language override, load the original one first.
|
||||
const fallbackLang = this.translate.instant('core.parentlanguage');
|
||||
|
||||
if (fallbackLang != '' && fallbackLang != language) {
|
||||
const fallbackSubs = this.translate.use(fallbackLang).subscribe((fallbackData) => {
|
||||
data = Object.assign(fallbackData, data);
|
||||
resolve(data);
|
||||
|
||||
// Data received, unsubscribe. Use a timeout because we can receive a value immediately.
|
||||
setTimeout(() => {
|
||||
fallbackSubs.unsubscribe();
|
||||
});
|
||||
}, (error) => {
|
||||
// Resolve with the original language.
|
||||
resolve(data);
|
||||
|
||||
// Error received, unsubscribe. Use a timeout because we can receive a value immediately.
|
||||
setTimeout(() => {
|
||||
fallbackSubs.unsubscribe();
|
||||
});
|
||||
});
|
||||
} else {
|
||||
resolve(data);
|
||||
}
|
||||
|
||||
// Data received, unsubscribe. Use a timeout because we can receive a value immediately.
|
||||
setTimeout(() => {
|
||||
|
|
Loading…
Reference in New Issue