mvc: translate page title

Needs more fixing/unification with the proper way of doing it,
but for now let these strings trickle through the translation
machinery for maximum effect.
This commit is contained in:
Franco Fichtner 2016-08-17 09:04:02 +02:00
parent 706d2804e1
commit 0c1e5723b5
15 changed files with 47 additions and 17 deletions

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\CaptivePortal;
/**
@ -36,7 +38,7 @@ class IndexController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->title = "Captive Portal";
$this->view->title = gettext('Captive Portal');
// link rule dialog
$this->view->formDialogZone = $this->getForm("dialogZone");
// choose template

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\CaptivePortal;
/**
@ -36,7 +38,7 @@ class SessionController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->title = "Captive Portal / Sessions";
$this->view->title = gettext('Captive Portal Sessions');
// choose template
$this->view->pick('OPNsense/CaptivePortal/clients');
}

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\CaptivePortal;
/**
@ -36,7 +38,7 @@ class VoucherController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->title = "Captive Portal / Vouchers";
$this->view->title = gettext('Captive Portal Vouchers');
// choose template
$this->view->pick('OPNsense/CaptivePortal/vouchers');
}

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Core;
/**
@ -39,7 +41,7 @@ class FirmwareController extends \OPNsense\Base\IndexController
*/
public function indexAction()
{
$this->view->title = "Firmware";
$this->view->title = gettext('Firmware');
$this->view->pick('OPNsense/Core/firmware');
return;
}

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,7 +27,8 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Core;
namespace OPNsense\Core;
/**
* Class IndexController Index controller for core package

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Cron;
/**
@ -40,7 +42,7 @@ class IndexController extends \OPNsense\Base\IndexController
*/
public function indexAction()
{
$this->view->title = "Cron settings";
$this->view->title = gettext('Cron Settings');
// include dialog form definitions
$this->view->formDialogEdit = $this->getForm("dialogEdit");
$this->view->pick('OPNsense/Cron/index');

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Cron;
/**
@ -41,7 +43,7 @@ class ItemController extends \OPNsense\Base\IndexController
*/
public function openAction($uuid = null)
{
$this->view->title = "Cron settings";
$this->view->title = gettext('Cron Settings');
$this->view->selected_uuid = $uuid;
// include dialog form definitions
$this->view->formDialogEdit = $this->getForm("dialogEdit");

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Diagnostics;
use OPNsense\Base\IndexController;
@ -38,7 +40,7 @@ class ActivityController extends IndexController
{
public function indexAction()
{
$this->view->title = "System Activity";
$this->view->title = gettext('System Activity');
$this->view->pick('OPNsense/Diagnostics/systemactivity');
}
}

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2016 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Diagnostics;
use OPNsense\Base\IndexController;
@ -41,7 +43,7 @@ class InterfaceController extends IndexController
*/
public function arpAction()
{
$this->view->title = "System ARP table";
$this->view->title = gettext('Interfaces ARP Table');
$this->view->pick('OPNsense/Diagnostics/arp');
}
@ -50,7 +52,7 @@ class InterfaceController extends IndexController
*/
public function ndpAction()
{
$this->view->title = "System NDP table";
$this->view->title = gettext('Interfaces NDP Table');
$this->view->pick('OPNsense/Diagnostics/ndp');
}
@ -59,7 +61,7 @@ class InterfaceController extends IndexController
*/
public function routesAction()
{
$this->view->title = "System Routing table";
$this->view->title = gettext('System Routing Table');
$this->view->pick('OPNsense/Diagnostics/routes');
}
}

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2016 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Diagnostics;
use OPNsense\Base\IndexController;
@ -38,7 +40,7 @@ class NetflowController extends IndexController
{
public function indexAction()
{
$this->view->title = "Netflow";
$this->view->title = gettext('NetFlow');
$this->view->pick('OPNsense/Diagnostics/netflow');
$this->view->captureForm = $this->getForm("netflow_capture");
}

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2016 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Diagnostics;
use OPNsense\Base\IndexController;
@ -38,7 +40,7 @@ class NetworkinsightController extends IndexController
{
public function indexAction()
{
$this->view->title = "Network Insight";
$this->view->title = gettext('Network Insight');
$this->view->pick('OPNsense/Diagnostics/networkinsight');
}
}

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V. - J.Schellevis
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Diagnostics;
use OPNsense\Base\IndexController;
@ -38,7 +40,7 @@ class SystemhealthController extends IndexController
{
public function indexAction()
{
$this->view->title = "System Health";
$this->view->title = gettext('System Health');
$this->view->pick('OPNsense/Diagnostics/systemhealth');
}
}

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\IDS;
/**
@ -40,7 +42,7 @@ class IndexController extends \OPNsense\Base\IndexController
*/
public function indexAction()
{
$this->view->title = "Intrusion Detection";
$this->view->title = gettext('Intrusion Detection');
// link rule dialog
$this->view->formDialogRule = $this->getForm("dialogRule");
// link alert info dialog

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\Proxy;
/**
@ -40,7 +42,7 @@ class IndexController extends \OPNsense\Base\IndexController
*/
public function indexAction()
{
$this->view->title = "Proxy Server";
$this->view->title = gettext('Proxy Server');
$this->view->mainForm = $this->getForm("main");
$this->view->formDialogEditBlacklist = $this->getForm("dialogEditBlacklist");
$this->view->pick('OPNsense/Proxy/index');

View File

@ -1,4 +1,5 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
*
@ -26,6 +27,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*/
namespace OPNsense\TrafficShaper;
/**
@ -40,7 +42,7 @@ class IndexController extends \OPNsense\Base\IndexController
*/
public function indexAction()
{
$this->view->title = "Traffic Shaper";
$this->view->title = gettext('Traffic Shaper');
// include dialog form definitions
$this->view->formDialogPipe = $this->getForm("dialogPipe");
$this->view->formDialogQueue = $this->getForm("dialogQueue");