src/Gelembjuk/Locale/Utils.php
public function fixMissedKeysFromTemplate($group,$locale,$deflocale,$mode = 'empty',$textlinesplitter = "\n") {
		$text = $this->getMissedKeysTemplate($group,$locale,$deflocale,$mode,'text', $textlinesplitter);
		
		$translate = $this->getTranslateObject();
		
		$groupfile = $translate->getGroupFile($group,$locale);
		
		$groupfilecontents = '';
		
		if (file_exists($groupfile)) {
			$groupfilecontents = @file_get_contents($groupfile);
		}
		
		$groupfilecontents .= $textlinesplitter . $text;
		
		file_put_contents($groupfile,$groupfilecontents);
		
		return true;
	}
public function fixMissedKeysFromTemplate($group,$locale,$deflocale,$mode = 'empty',$textlinesplitter = "\n") {
		$text = $this->getMissedKeysTemplate($group,$locale,$deflocale,$mode,'text', $textlinesplitter);
		
		$translate = $this->getTranslateObject();
		
		$groupfile = $translate->getGroupFile($group,$locale);
		
		$groupfilecontents = '';
		
		if (file_exists($groupfile)) {
			$groupfilecontents = @file_get_contents($groupfile);
		}
		
		$groupfilecontents .= $textlinesplitter . $text;
		
		file_put_contents($groupfile,$groupfilecontents);
		
		return true;
	}
public function fixMissedKeysFromTemplate ( $ group , $ locale , $ deflocale , $ mode = 'empty' , $ textlinesplitter = "\n" ) { $ text = $ this -> getMissedKeysTemplate ( $ group , $ locale , $ deflocale , $ mode , 'text' , $ textlinesplitter ) ; $ translate = $ this -> getTranslateObject ( ) ; $ groupfile = $ translate -> getGroupFile ( $ group , $ locale ) ; $ groupfilecontents = '' ; if ( file_exists ( $ groupfile ) ) { $ groupfilecontents = @ file_get_contents ( $ groupfile ) ; } $ groupfilecontents .= $ textlinesplitter . $ text ; file_put_contents ( $ groupfile , $ groupfilecontents ) ; return true ; }
Fixes a group by adding all missed keys with empty values or def locale values

@param string $group Translation group
@param string $locale Locale to compare to default locale
@param string $deflocale Default locale to use as a base for comparing
@param string $mode `empty` or `default`. If empty then generated keys are empty and deflocale value is added as comment

@return bool
Fixes a group by adding all missed keys with empty values or def locale values