mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Different solution to use Nextcloud languages #1293
This commit is contained in:
parent
8984726fd7
commit
e56415aa51
5 changed files with 25 additions and 20 deletions
|
|
@ -285,6 +285,13 @@ and called in JavaScript using rl.pluginRemoteRequest().
|
|||
params:
|
||||
array &$aPaths
|
||||
|
||||
### filter.language
|
||||
params:
|
||||
string &$sLanguage
|
||||
bool $bAdmin
|
||||
|
||||
Allows you to set a different language
|
||||
|
||||
### filter.message-html
|
||||
params:
|
||||
\RainLoop\Model\Account $oAccount
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
{
|
||||
const
|
||||
NAME = 'Nextcloud',
|
||||
VERSION = '2.25',
|
||||
RELEASE = '2023-10-03',
|
||||
VERSION = '2.26',
|
||||
RELEASE = '2023-12-08',
|
||||
CATEGORY = 'Integrations',
|
||||
DESCRIPTION = 'Integrate with Nextcloud v20+',
|
||||
REQUIRED = '2.27.0';
|
||||
|
|
@ -17,6 +17,7 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
|
||||
$this->addHook('main.fabrica', 'MainFabrica');
|
||||
$this->addHook('filter.app-data', 'FilterAppData');
|
||||
$this->addHook('filter.language', 'FilterLanguage');
|
||||
|
||||
$this->addCss('style.css');
|
||||
|
||||
|
|
@ -244,6 +245,17 @@ class NextcloudPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
}
|
||||
}
|
||||
|
||||
public function FilterLanguage($bAdmin, &$sLanguage) : void
|
||||
{
|
||||
if (!\RainLoop\Api::Config()->Get('webmail', 'allow_languages_on_settings', true)) {
|
||||
$sLanguage = \RainLoop\Api::Actions()->ValidateLanguage(
|
||||
\OC::$server->getL10N('core')->getLocaleCode(),
|
||||
$sLanguage,
|
||||
$bAdmin
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param mixed $mResult
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue