Added new language strings

This commit is contained in:
RainLoop Team 2015-04-26 02:01:56 +04:00
parent a11dcbed4b
commit 19f06c11d2
48 changed files with 996 additions and 649 deletions

View file

@ -5480,12 +5480,12 @@ class Actions
{
$this->initMailClientConnection();
$sFolderNameInUtf = $this->GetActionParam('Folder', '');
$sFolderFullNameRaw = $this->GetActionParam('Folder', '');
$bSubscribe = '1' === (string) $this->GetActionParam('Subscribe', '0');
try
{
$this->MailClient()->FolderSubscribe($sFolderNameInUtf, !!$bSubscribe);
$this->MailClient()->FolderSubscribe($sFolderFullNameRaw, !!$bSubscribe);
}
catch (\Exception $oException)
{
@ -5502,6 +5502,51 @@ class Actions
return $this->TrueResponse(__FUNCTION__);
}
/**
* @return array
*/
public function DoFolderCheckable()
{
$oAccount = $this->getAccountFromToken();
$sFolderFullNameRaw = $this->GetActionParam('Folder', '');
$bCheckable = '1' === (string) $this->GetActionParam('Checkable', '0');
$oSettingsLocal = $this->SettingsProvider(true)->Load($oAccount);
$sCheckableFolder = $oSettingsLocal->GetConf('CheckableFolder', '[]');
$aCheckableFolder = @\json_decode($sCheckableFolder);
if (!\is_array($aCheckableFolder))
{
$aCheckableFolder = array();
}
if ($bCheckable)
{
$aCheckableFolder[] = $sFolderFullNameRaw;
}
else
{
$aCheckableFolderNew = array();
foreach ($aCheckableFolder as $sFolder)
{
if ($sFolder !== $sFolderFullNameRaw)
{
$aCheckableFolderNew[] = $sFolder;
}
}
$aCheckableFolder = $aCheckableFolderNew;
}
$aCheckableFolder = \array_unique($aCheckableFolder);
$oSettingsLocal->SetConf('CheckableFolder', @\json_encode($aCheckableFolder));
return $this->DefaultResponse(__FUNCTION__,
$this->SettingsProvider(true)->Save($oAccount, $oSettingsLocal));
}
/**
* @return array
*
@ -9306,17 +9351,49 @@ class Actions
if (\is_object($mResponse))
{
$bHook = true;
$self = $this;
$sClassName = \get_class($mResponse);
$bHasSimpleJsonFunc = \method_exists($mResponse, 'ToSimpleJSON');
$bThumb = $this->GetCapa(false, \RainLoop\Enumerations\Capa::ATTACHMENT_THUMBNAILS);
$oAccountCache = null;
$fGetAccount = function () use ($self, &$oAccountCache) {
if (null === $oAccountCache)
{
$oAccount = $self->getAccountFromToken(false);
$oAccountCache = $oAccount;
}
return $oAccountCache;
};
$aCheckableFoldersCache = null;
$fGetCheckableFolder = function () use ($self, &$aCheckableFoldersCache) {
if (null === $aCheckableFoldersCache)
{
$oAccount = $self->getAccountFromToken(false);
$oSettingsLocal = $self->SettingsProvider(true)->Load($oAccount);
$sCheckable = $oSettingsLocal->GetConf('CheckableFolder', '[]');
$aCheckable = @\json_decode($sCheckable);
if (!\is_array($aCheckable))
{
$aCheckable = array();
}
$aCheckableFoldersCache = $aCheckable;
}
return $aCheckableFoldersCache;
};
if ($bHasSimpleJsonFunc)
{
$mResult = \array_merge($this->objectData($mResponse, $sParent, $aParameters), $mResponse->ToSimpleJSON(true));
}
else if ('MailSo\Mail\Message' === $sClassName)
{
$oAccount = $this->getAccountFromToken(false);
$oAccount = call_user_func($fGetAccount);
$mResult = \array_merge($this->objectData($mResponse, $sParent, $aParameters), array(
'Folder' => $mResponse->Folder(),
@ -9591,6 +9668,12 @@ class Actions
);
}
$aCheckableFolder = \call_user_func($fGetCheckableFolder);
if (!\is_array($aCheckableFolder))
{
$aCheckableFolder = array();
}
$mResult = \array_merge($this->objectData($mResponse, $sParent, $aParameters), array(
'Name' => $mResponse->Name(),
'FullName' => $mResponse->FullName(),
@ -9602,6 +9685,7 @@ class Actions
'IsExists' => $mResponse->IsExists(),
'IsSelectable' => $mResponse->IsSelectable(),
'Flags' => $mResponse->FlagsLowerCase(),
'Checkable' => \in_array($mResponse->FullNameRaw(), $aCheckableFolder),
'Extended' => $aExtended,
'SubFolders' => $this->responseObject($mResponse->SubFolders(), $sParent, $aParameters)
));

View file

@ -377,7 +377,9 @@
<i class="icon-file-zip" data-bind="visible: !downloadAsZipError(),
css: {'icon-file-zip': !downloadAsZipLoading(), 'icon-spinner animated': downloadAsZipLoading()}"></i>
&nbsp;&nbsp;
<span class="g-ui-link" data-bind="click: downloadAsZip">Download as zip</span>
<span class="g-ui-link" data-bind="click: downloadAsZip">
<span class="i18n" data-i18n="MESSAGE/LINK_DOWNLOAD_AS_ZIP"></span>
</span>
</span>
<span data-bind="visible: saveToOwnCloudAllowed">
@ -387,7 +389,9 @@
<i class="icon-cloud-up" data-bind="visible: !saveToOwnCloudSuccess() && !saveToOwnCloudError(),
css: {'icon-cloud-up': !saveToOwnCloudLoading(), 'icon-spinner animated': saveToOwnCloudLoading()}"></i>
&nbsp;&nbsp;
<span class="g-ui-link" data-bind="click: saveToOwnCloud">Save to ownCloud</span>
<span class="g-ui-link" data-bind="click: saveToOwnCloud">
<span class="i18n" data-i18n="MESSAGE/LINK_SAVE_TO_OWNCLOUD"></span>
</span>
</span>
<span data-bind="visible: saveToDropboxAllowed">
@ -397,7 +401,9 @@
<i class="icon-dropbox" data-bind="visible: !saveToDropboxSuccess() && !saveToDropboxError(),
css: {'icon-dropbox': !saveToDropboxLoading(), 'icon-spinner animated': saveToDropboxLoading()}"></i>
&nbsp;&nbsp;
<span class="g-ui-link" data-bind="click: saveToDropbox">Save to Dropbox</span>
<span class="g-ui-link" data-bind="click: saveToDropbox">
<span class="i18n" data-i18n="MESSAGE/LINK_SAVE_TO_DROPBOX"></span>
</span>
</span>
<!-- // --->

View file

@ -12,12 +12,12 @@
<span class="i18n" data-i18n="SETTINGS_FOLDERS/DELETING_ASK"></span>
</a>
</td>
<td>
<td class="delete-folder-parent">
<span class="delete-folder" data-bind="visible: canBeDeleted() && !deleteAccess(), click: function (oFolder) { $root.folderForDeletion(oFolder); }">
<i class="icon-trash"></i>
</span>
</td>
<td>
<td class="subscribe-folder-parent">
<span class="unsubscribe-folder" data-bind="visible: canBeSubScribed() && !subScribed(), click: function(oFolder) { $root.subscribeFolder(oFolder); }">
<i class="icon-eye"></i>
</span>
@ -25,5 +25,13 @@
<i class="icon-eye"></i>
</span>
</td>
<td class="check-folder-parent">
<span class="uncheck-folder" data-bind="visible: canBeChecked() && subScribed() && !checkable(), click: function(oFolder) { $root.checkableTrueFolder(oFolder); }">
<i class="icon-check-mark-circle-two"></i>
</span>
<span class="check-folder" data-bind="visible: canBeChecked() && subScribed() && checkable(), click: function(oFolder) { $root.checkableFalseFolder(oFolder); }">
<i class="icon-check-mark-circle-two"></i>
</span>
</td>
</tr>
<!-- ko template: { name: 'SettingsFolderItem', foreach: subFolders } --><!-- /ko -->

View file

@ -1,37 +1,45 @@
<div class="b-settings-folders g-ui-user-select-none" data-bind="css: { 'ignore-folder-subscribe': !useImapSubscribe }">
<div class="form-horizontal">
<div class="legend">
<span class="i18n" data-i18n="SETTINGS_FOLDERS/LEGEND_FOLDERS"></span>
&nbsp;&nbsp;&nbsp;
<i class="icon-spinner animated" style="margin-top: 5px" data-bind="visible: loading"></i>
<div class="b-settings-folders g-ui-user-select-none row" data-bind="css: { 'ignore-folder-subscribe': !useImapSubscribe }">
<div class="span8">
<div class="form-horizontal">
<div class="legend">
<span class="i18n" data-i18n="SETTINGS_FOLDERS/LEGEND_FOLDERS"></span>
&nbsp;&nbsp;&nbsp;
<i class="icon-spinner animated" style="margin-top: 5px" data-bind="visible: loading"></i>
</div>
</div>
<a class="btn" data-bind="click: createFolder">
<i class="icon-folder-add"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n="SETTINGS_FOLDERS/BUTTON_CREATE"></span>
</a>
&nbsp;&nbsp;
<a class="btn" data-bind="click: systemFolder">
<i class="icon-wrench"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n="SETTINGS_FOLDERS/BUTTON_SYSTEM"></span>
</a>
<div class="alert folders-list-error" data-bind="visible: folderList.optimized">
<b class="i18n" data-i18n="SETTINGS_FOLDERS/TO_MANY_FOLDERS_DESC_1"></b>
<br />
<span class="i18n" data-i18n="SETTINGS_FOLDERS/TO_MANY_FOLDERS_DESC_2"></span>
</div>
<div class="alert folders-list-error" data-bind="visible: '' !== folderList.error()">
<button type="button" class="close" data-bind="click: function () { folderList.error(''); }">&times;</button>
<span data-bind="text: folderList.error"></span>
</div>
<table class="table table-hover list-table" data-bind="i18nUpdate: folderList" style="margin-top: 40px">
<colgroup>
<col />
<col style="width: 1%" />
<col style="width: 1%" />
<col style="width: 1%" />
</colgroup>
<tbody data-bind="template: { name: 'SettingsFolderItem', foreach: folderList }"></tbody>
</table>
</div>
<div class="span4" style="position: relative" data-bind="visible: '' !== folderListHelp()">
<div class="alert alert-info" style="position: fixed">
<span data-bind="text: folderListHelp"></span>
</div>
</div>
<a class="btn" data-bind="click: createFolder">
<i class="icon-folder-add"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n="SETTINGS_FOLDERS/BUTTON_CREATE"></span>
</a>
&nbsp;&nbsp;
<a class="btn" data-bind="click: systemFolder">
<i class="icon-wrench"></i>
&nbsp;&nbsp;
<span class="i18n" data-i18n="SETTINGS_FOLDERS/BUTTON_SYSTEM"></span>
</a>
<div class="alert folders-list-error" data-bind="visible: folderList.optimized">
<b class="i18n" data-i18n="SETTINGS_FOLDERS/TO_MANY_FOLDERS_DESC_1"></b>
<br />
<span class="i18n" data-i18n="SETTINGS_FOLDERS/TO_MANY_FOLDERS_DESC_2"></span>
</div>
<div class="alert folders-list-error" data-bind="visible: '' !== folderList.error()">
<button type="button" class="close" data-bind="click: function () { folderList.error(''); }">&times;</button>
<span data-bind="text: folderList.error"></span>
</div>
<table class="table table-hover list-table" data-bind="i18nUpdate: folderList" style="margin-top: 40px">
<colgroup>
<col />
<col style="width: 1%" />
<col style="width: 1%" />
</colgroup>
<tbody data-bind="template: { name: 'SettingsFolderItem', foreach: folderList }"></tbody>
</table>
</div>