Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
d849e48e
Commit
d849e48e
authored
May 10, 2015
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(mvc) still some work todo on getTranslator, disable for now§§
parent
138d6262
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
ControllerBase.php
...ense/mvc/app/controllers/OPNsense/Base/ControllerBase.php
+6
-4
No files found.
src/opnsense/mvc/app/controllers/OPNsense/Base/ControllerBase.php
View file @
d849e48e
...
@@ -32,6 +32,7 @@ use OPNsense\Core\Config;
...
@@ -32,6 +32,7 @@ use OPNsense\Core\Config;
use
OPNsense\Core\ACL
;
use
OPNsense\Core\ACL
;
use
Phalcon\Mvc\Controller
;
use
Phalcon\Mvc\Controller
;
use
Phalcon\Translate\Adapter\Gettext
;
use
Phalcon\Translate\Adapter\Gettext
;
use
Phalcon\Translate\Adapter\NativeArray
;
/**
/**
* Class ControllerBase implements core controller for OPNsense framework
* Class ControllerBase implements core controller for OPNsense framework
...
@@ -44,20 +45,21 @@ class ControllerBase extends Controller
...
@@ -44,20 +45,21 @@ class ControllerBase extends Controller
* @return NativeArray
* @return NativeArray
*/
*/
public
function
getTranslator
()
public
function
getTranslator
()
{
{
/*
if (function_exists("gettext")) {
if (function_exists("gettext")) {
// gettext installed, return gettext translator
// gettext installed, return gettext translator
return new Gettext(array(
return new Gettext(array(
"locale"
=>
locale_get_default
()
,
"locale" =>
"en_US"
,
"directory" => "/usr/local/share/locale/",
"directory" => "/usr/local/share/locale/",
'file' => 'LC_MESSAGES/OPNsense.pot',
'file' => 'LC_MESSAGES/OPNsense.pot',
));
));
} else {
} else {
*/
// no gettext installed, return original content
// no gettext installed, return original content
return
new
Gettext
(
array
(
return
new
NativeArray
(
array
(
"content"
=>
array
()
"content"
=>
array
()
));
));
}
//
}
}
}
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment