forked from EVOgeek/Vmeda.Online
		
	Merge pull request #1957 from crazyserver/MOBILE-3039
MOBILE-3039 lang: Fix ratings lang index
This commit is contained in:
		
						commit
						a92f4b8ae4
					
				| @ -485,7 +485,7 @@ | ||||
|   "addon.mod_forum.addanewquestion": "forum", | ||||
|   "addon.mod_forum.addanewtopic": "forum", | ||||
|   "addon.mod_forum.addtofavourites": "forum", | ||||
|   "addon.mod_forum.advanced": "forum", | ||||
|   "addon.mod_forum.advanced": "moodle", | ||||
|   "addon.mod_forum.cannotadddiscussion": "forum", | ||||
|   "addon.mod_forum.cannotadddiscussionall": "forum", | ||||
|   "addon.mod_forum.cannotcreatediscussion": "forum", | ||||
| @ -1645,14 +1645,14 @@ | ||||
|   "core.question.questionno": "question", | ||||
|   "core.question.requiresgrading": "question", | ||||
|   "core.quotausage": "moodle", | ||||
|   "core.rating.aggregateavg": "moodle", | ||||
|   "core.rating.aggregatecount": "moodle", | ||||
|   "core.rating.aggregatemax": "moodle", | ||||
|   "core.rating.aggregatemin": "moodle", | ||||
|   "core.rating.aggregatesum": "moodle", | ||||
|   "core.rating.noratings": "moodle", | ||||
|   "core.rating.rating": "moodle", | ||||
|   "core.rating.ratings": "moodle", | ||||
|   "core.rating.aggregateavg": "rating", | ||||
|   "core.rating.aggregatecount": "rating", | ||||
|   "core.rating.aggregatemax": "rating", | ||||
|   "core.rating.aggregatemin": "rating", | ||||
|   "core.rating.aggregatesum": "rating", | ||||
|   "core.rating.noratings": "rating", | ||||
|   "core.rating.rating": "rating", | ||||
|   "core.rating.ratings": "rating", | ||||
|   "core.redirectingtosite": "local_moodlemobileapp", | ||||
|   "core.refresh": "moodle", | ||||
|   "core.remove": "moodle", | ||||
|  | ||||
| @ -34,9 +34,11 @@ $config_langs = array_keys(get_object_vars($config['languages'])); | ||||
| // Set languages to do. If script is called using a language it will be used as unique.
 | ||||
| if (isset($argv[1]) && !empty($argv[1])) { | ||||
|     $forcedetect = false; | ||||
|     define('TOTRANSLATE', true); | ||||
|     $languages = explode(',', $argv[1]); | ||||
| } else { | ||||
|     $forcedetect = true; | ||||
|     define('TOTRANSLATE', false); | ||||
|     $languages = $config_langs; | ||||
| } | ||||
| 
 | ||||
| @ -160,6 +162,9 @@ function build_lang($lang, $keys, $total) { | ||||
|         $file = LANGPACKSFOLDER.'/'.$langfoldername.'/'.$value->file.'.php'; | ||||
|         // Apply translations.
 | ||||
|         if (!file_exists($file)) { | ||||
|             if (TOTRANSLATE) { | ||||
|                 echo "\n\t\To translate $value->string on $value->file"; | ||||
|             } | ||||
|             continue; | ||||
|         } | ||||
| 
 | ||||
| @ -169,7 +174,7 @@ function build_lang($lang, $keys, $total) { | ||||
|         if (!isset($string[$value->string])) { | ||||
|             // Not yet translated. Do not override.
 | ||||
|             if (!$langFile) { | ||||
|                 // Load lang fils just once.
 | ||||
|                 // Load lang files just once.
 | ||||
|                 $langFile = file_get_contents(ASSETSPATH.$lang.'.json'); | ||||
|                 $langFile = (array) json_decode($langFile); | ||||
|             } | ||||
| @ -177,6 +182,9 @@ function build_lang($lang, $keys, $total) { | ||||
|                 $translations[$key] = $langFile[$key]; | ||||
|                 $local++; | ||||
|             } | ||||
|             if (TOTRANSLATE) { | ||||
|                 echo "\n\t\tTo translate $value->string on $value->file"; | ||||
|             } | ||||
|             continue; | ||||
|         } else { | ||||
|             $text = $string[$value->string]; | ||||
|  | ||||
| @ -342,7 +342,7 @@ export class AddonModForumDiscussionPage implements OnDestroy { | ||||
|                 this.accessInfo = {}; | ||||
|             }).then(() => { | ||||
|                 this.defaultSubject = this.translate.instant('addon.mod_forum.re') + ' ' + | ||||
|                     (this.discussion ? this.discussion.subject : ""); | ||||
|                     (this.discussion ? this.discussion.subject : ''); | ||||
|                 this.replyData.subject = this.defaultSubject; | ||||
| 
 | ||||
|                 const startingPost = this.forumProvider.extractStartingPost(posts); | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user