Skip to content

Commit f73bfcc

Browse files
committed
Use gettext from package
1 parent 20dd49c commit f73bfcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+108
-1327
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
"role": "Contributor"
1717
}],
1818
"autoload": {
19-
"classmap": ["featherbb/Core/gettext/MO.php"],
2019
"psr-4": {
2120
"FeatherBB\\Plugins\\": "plugins/",
2221
"FeatherBB\\": "featherbb/"
@@ -28,7 +27,8 @@
2827
"statical/statical": "^1.1",
2928
"firebase/php-jwt": "^3.0",
3029
"vierbergenlars/php-semver": "^3.0",
31-
"slim/flash": "^0.1.0"
30+
"slim/flash": "^0.1.0",
31+
"gettext/gettext": "^4.2"
3232
},
3333
"support": {
3434
"email": "[email protected]",

featherbb/Controller/Admin/Bans.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ class Bans
1919
public function __construct()
2020
{
2121
$this->model = new \FeatherBB\Model\Admin\Bans();
22-
translate('admin/bans');
23-
translate('admin/common');
22+
Lang::load('admin/bans');
23+
Lang::load('admin/common');
2424

2525
if (!User::can('mod.ban_users')) {
2626
throw new Error(__('No permission'), '403');

featherbb/Controller/Admin/Categories.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Categories
2020
public function __construct()
2121
{
2222
$this->model = new \FeatherBB\Model\Admin\Categories();
23-
translate('admin/categories');
23+
Lang::load('admin/categories');
2424
if (!User::isAdmin()) {
2525
throw new Error(__('No permission'), '403');
2626
}

featherbb/Controller/Admin/Censoring.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Censoring
1818
public function __construct()
1919
{
2020
$this->model = new \FeatherBB\Model\Admin\Censoring();
21-
translate('admin/censoring');
21+
Lang::load('admin/censoring');
2222
if (!User::isAdmin()) {
2323
throw new Error(__('No permission'), '403');
2424
}

featherbb/Controller/Admin/Forums.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class Forums
2020
public function __construct()
2121
{
2222
$this->model = new \FeatherBB\Model\Admin\Forums();
23-
translate('admin/forums');
23+
Lang::load('admin/forums');
2424
if (!User::isAdmin()) {
2525
throw new Error(__('No permission'), '403');
2626
}

featherbb/Controller/Admin/Groups.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Groups
1818
public function __construct()
1919
{
2020
$this->model = new \FeatherBB\Model\Admin\Groups();
21-
translate('admin/groups');
21+
Lang::load('admin/groups');
2222
if (!User::isAdmin()) {
2323
throw new Error(__('No permission'), '403');
2424
}

featherbb/Controller/Admin/Index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Index
1818
{
1919
public function __construct()
2020
{
21-
translate('admin/index');
21+
Lang::load('admin/index');
2222
}
2323

2424
public function display($req, $res, $args)

featherbb/Controller/Admin/Maintenance.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Maintenance
1818
public function __construct()
1919
{
2020
$this->model = new \FeatherBB\Model\Admin\Maintenance();
21-
translate('admin/maintenance');
21+
Lang::load('admin/maintenance');
2222
if (!User::isAdmin()) {
2323
throw new Error(__('No permission'), '403');
2424
}

featherbb/Controller/Admin/Options.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Options
1818
public function __construct()
1919
{
2020
$this->model = new \FeatherBB\Model\Admin\Options();
21-
translate('admin/options');
21+
Lang::load('admin/options');
2222
if (!User::isAdmin()) {
2323
throw new Error(__('No permission'), '403');
2424
}

featherbb/Controller/Admin/Parser.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Parser
1919
public function __construct()
2020
{
2121
$this->model = new \FeatherBB\Model\Admin\Parser();
22-
translate('admin/parser');
22+
Lang::load('admin/parser');
2323
if (!User::isAdmin()) {
2424
throw new Error(__('No permission'), '403');
2525
}

0 commit comments

Comments
 (0)