Skip to content
Code-Schnipsel Gruppen Projekte
Commit 01c22000 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

Issue #8 Cron übersetzen

Übergeordneter 6977546d
No related branches found
No related tags found
Keine zugehörigen Merge Requests gefunden
......@@ -51,7 +51,7 @@ class Console extends \QUI\System\Console\Tool
return;
}
$this->writeLn( 'Welcom to the Cron Manager' );
$this->writeLn( 'Welcome to the Cron Manager' );
$this->writeLn( 'Which Command would you execute?' );
$this->writeLn( '' );
......
......@@ -14,6 +14,9 @@ use Cron\CronExpression;
* Cron Manager
*
* @author www.pcsg.de (Henning Leutz)
*
* @error 1001 - Cannot add Cron. Cron not exists
* @error 1002 - Cannot edit Cron. Cron command not exists
*/
class Manager
......@@ -33,9 +36,12 @@ class Manager
{
Permission::checkPermission( 'quiqqer.cron.add' );
if ( !$this->_cronExists( $cron ) ) {
throw new QUI\Exception( 'Cannot add Cron. Cron not exists', 404 );
if ( !$this->_cronExists( $cron ) )
{
throw new QUI\Exception(
QUI::getLocale()->get( 'quiqqer/cron', 'exception.cron.1001' ),
1001
);
}
$cronData = $this->getCronData( $cron );
......@@ -56,7 +62,7 @@ class Manager
));
QUI::getMessagesHandler()->addSuccess(
'Cron erfolgreich hinzugefügt'
QUI::getLocale()->get( 'quiqqer/cron', 'message.cron.succesful.added' )
);
}
......@@ -76,14 +82,16 @@ class Manager
{
Permission::checkPermission( 'quiqqer.cron.edit' );
if ( !$this->_cronExists( $cron ) ) {
throw new QUI\Exception( 'Cannot edit Cron. Cron command not exists', 404 );
if ( !$this->_cronExists( $cron ) )
{
throw new QUI\Exception(
QUI::getLocale()->get( 'quiqqer/cron', 'exception.cron.1002' ),
1002
);
}
$cronData = $this->getCronData( $cron );
QUI::getDataBase()->update($this->Table(), array(
'exec' => $cronData['exec'],
'title' => $cronData['title'],
......@@ -96,7 +104,6 @@ class Manager
'id' => $cronId
));
QUI::getMessagesHandler()->addSuccess(
'Cron erfolgreich editiert'
);
......
<?php
/**
* This File contains QUI\Cron\Crons
* This File contains QUI\Cron\QuiqqerCrons
*/
namespace QUI\Cron;
......
......@@ -94,9 +94,6 @@
<de><![CDATA[Cron Verlauf]]></de>
<en><![CDATA[Cron history]]></en>
</locale>
</groups>
<groups name="quiqqer/cron" datatype="php">
......@@ -104,6 +101,21 @@
<de><![CDATA[Der Cron wurde erfolgreich ausgeführt]]></de>
<en><![CDATA[The Cron ran successfully]]></en>
</locale>
<locale name="message.cron.succesful.added">
<de><![CDATA[Cron erfolgreich hinzugefügt]]></de>
<en><![CDATA[Cron successfully added]]></en>
</locale>
<locale name="exception.cron.1001">
<de><![CDATA[Konnte Cron nicht hinzufügen. Cron existiert nicht.]]></de>
<en><![CDATA[Cannot add Cron. Cron not exists.]]></en>
</locale>
<locale name="exception.cron.1002">
<de><![CDATA[Konnte Cron nicht editieren. Cron Befehl existiert nicht.]]></de>
<en><![CDATA[Cannot edit Cron. Cron command not exists.]]></en>
</locale>
</groups>
<groups name="locale/permissions" datatype="js">
......
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren