mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Added auto logout option
This commit is contained in:
parent
76f319a07f
commit
bb551e4ec8
18 changed files with 171 additions and 33 deletions
|
|
@ -1225,6 +1225,29 @@ class ServiceActions
|
|||
return $bJsOutput ? 'window.rainloopTEMPLATES='.\MailSo\Base\Utils::Php2js(array($sHtml), $this->Logger()).';' : $sHtml;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sLanguage
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function convertLanguageNameToMomentLanguageName($sLanguage)
|
||||
{
|
||||
switch ($sLanguage)
|
||||
{
|
||||
case 'pt-pt':
|
||||
$sLanguage = 'pt';
|
||||
break;
|
||||
case 'ja-jp':
|
||||
$sLanguage = 'ja';
|
||||
break;
|
||||
case 'ko-kr':
|
||||
$sLanguage = 'ko';
|
||||
break;
|
||||
}
|
||||
|
||||
return $sLanguage;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sLanguage
|
||||
* @param bool $bWrapByScriptTag = true
|
||||
|
|
@ -1236,7 +1259,9 @@ class ServiceActions
|
|||
$aResultLang = array();
|
||||
|
||||
$sMoment = 'window.moment && window.moment.lang && window.moment.lang(\'en\');';
|
||||
$sMomentFileName = APP_VERSION_ROOT_PATH.'app/i18n/moment/'.$sLanguage.'.js';
|
||||
$sMomentFileName = APP_VERSION_ROOT_PATH.'app/i18n/moment/'.
|
||||
$this->convertLanguageNameToMomentLanguageName($sLanguage).'.js';
|
||||
|
||||
if (\file_exists($sMomentFileName))
|
||||
{
|
||||
$sMoment = \file_get_contents($sMomentFileName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue