mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-11-30 04:07:07 +09:00
Make module's settings labels translatable
This commit is contained in:
1 parent
df5610ea57
commit
dcdf1ea83c
8 files changed
+36
-35
No files matched your search
@@ -43,19 +43,19 @@ class Service implements InjectionAwareInterface
|
||||
return array(
|
||||
'active' => array(
|
||||
'path' => '/client?status=active',
|
||||
'label' => 'Active clients',
|
||||
'label' => __trans('Active clients'),
|
||||
),
|
||||
'suspended' => array(
|
||||
'path' => '/client?status=suspended',
|
||||
'label' => 'Suspended clients',
|
||||
'label' => __trans('Suspended clients'),
|
||||
),
|
||||
'canceled' => array(
|
||||
'path' => '/client?status=canceled',
|
||||
'label' => 'Canceled clients',
|
||||
'label' => __trans('Canceled clients'),
|
||||
),
|
||||
'all' => array(
|
||||
'path' => '/client',
|
||||
'label' => 'All clients',
|
||||
'label' => __trans('All clients'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class Service
|
||||
return array(
|
||||
'exec' => array(
|
||||
'path' => BB_URL . 'cron.php',
|
||||
'label' => 'Execute now',
|
||||
'label' => __trans('Execute now'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class Service implements \Box\InjectionAwareInterface
|
||||
return [
|
||||
'history' => [
|
||||
'path' => 'email/history',
|
||||
'label' => 'Email history',
|
||||
'label' => __trans('Email history'),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -42,11 +42,11 @@ class Service
|
||||
return array(
|
||||
'source' => array(
|
||||
'path' => 'https://github.com/FOSSBilling/example', // An example external link
|
||||
'label' => 'View source code',
|
||||
'label' => __trans('View source code'),
|
||||
),
|
||||
'example' => array(
|
||||
'path' => 'extension/settings/example', // An example internal link. Internal links are relative to the custom admin panel path.
|
||||
'label' => 'This is an example!',
|
||||
'label' => __trans('This is an example!'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -47,19 +47,19 @@ class Service implements InjectionAwareInterface
|
||||
return array(
|
||||
'unpaid' => array(
|
||||
'path' => '/invoice?status=unpaid',
|
||||
'label' => 'Unpaid invoices',
|
||||
'label' => __trans('Unpaid invoices'),
|
||||
),
|
||||
'paid' => array(
|
||||
'path' => '/invoice?status=paid',
|
||||
'label' => 'Paid invoices',
|
||||
'label' => __trans('Paid invoices'),
|
||||
),
|
||||
'refunded' => array(
|
||||
'path' => '/invoice?status=refunded',
|
||||
'label' => 'Refunded invoices',
|
||||
'label' => __trans('Refunded invoices'),
|
||||
),
|
||||
'all' => array(
|
||||
'path' => '/invoice',
|
||||
'label' => 'All invoices',
|
||||
'label' => __trans('All invoices'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -43,19 +43,19 @@ class Service implements InjectionAwareInterface
|
||||
return array(
|
||||
'pending_setup' => array(
|
||||
'path' => '/order?status=pending_setup',
|
||||
'label' => 'Orders pending setup',
|
||||
'label' => __trans('Orders pending setup'),
|
||||
),
|
||||
'active' => array(
|
||||
'path' => '/order?status=active',
|
||||
'label' => 'Active orders',
|
||||
'label' => __trans('Active orders'),
|
||||
),
|
||||
'suspended' => array(
|
||||
'path' => '/order?status=suspended',
|
||||
'label' => 'Suspended orders',
|
||||
'label' => __trans('Suspended orders'),
|
||||
),
|
||||
'all' => array(
|
||||
'path' => '/order',
|
||||
'label' => 'All orders',
|
||||
'label' => __trans('All orders'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -35,19 +35,19 @@ class Service implements \Box\InjectionAwareInterface
|
||||
return array(
|
||||
'open' => array(
|
||||
'path' => '/support?status=open',
|
||||
'label' => 'Tickets waiting for staff reply',
|
||||
'label' => __trans('Tickets waiting for staff reply'),
|
||||
),
|
||||
'on_hold' => array(
|
||||
'path' => '/support?status=on_hold',
|
||||
'label' => 'Tickets waiting for client reply',
|
||||
'label' => __trans('Tickets waiting for client reply'),
|
||||
),
|
||||
'closed' => array(
|
||||
'path' => '/support?status=closed',
|
||||
'label' => 'Resolved tickets',
|
||||
'label' => __trans('Resolved tickets'),
|
||||
),
|
||||
'all' => array(
|
||||
'path' => '/support',
|
||||
'label' => 'All tickets',
|
||||
'label' => __trans('All tickets'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -30,15 +30,15 @@ class Service
|
||||
return array(
|
||||
'report_bug' => array(
|
||||
'path' => 'https://github.com/FOSSBilling/FOSSBilling/issues/',
|
||||
'label' => 'Report a bug',
|
||||
'label' => __trans('Report a bug'),
|
||||
),
|
||||
'activity' => array(
|
||||
'path' => 'activity',
|
||||
'label' => 'Event history',
|
||||
'label' => __trans('Event history'),
|
||||
),
|
||||
'languages' => array(
|
||||
'path' => 'extension/languages',
|
||||
'label' => 'Languages',
|
||||
'label' => __trans('Languages'),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -206,25 +206,25 @@ class Service
|
||||
closedir($handle);
|
||||
}
|
||||
sort($locales);
|
||||
if(!$deep){
|
||||
if (!$deep) {
|
||||
return $locales;
|
||||
}
|
||||
$array = include PATH_ROOT . '/locale/locales.php';
|
||||
$details = [];
|
||||
foreach($locales as $locale){
|
||||
if (empty($array[$locale])){
|
||||
foreach ($locales as $locale) {
|
||||
if (empty($array[$locale])) {
|
||||
//fall back on locale string
|
||||
$details[] = [
|
||||
'locale' => $locale,
|
||||
'title' => $locale .' ('.$locale.')',
|
||||
'title' => $locale . ' (' . $locale . ')',
|
||||
'name' => $locale,
|
||||
];
|
||||
}else{
|
||||
$details[] = [
|
||||
'locale' => $locale,
|
||||
'title' => $array[$locale] .' ('.$locale.')',
|
||||
'name' => $array[$locale],
|
||||
];
|
||||
} else {
|
||||
$details[] = [
|
||||
'locale' => $locale,
|
||||
'title' => $array[$locale] . ' (' . $locale . ')',
|
||||
'name' => $array[$locale],
|
||||
];
|
||||
}
|
||||
}
|
||||
return $details;
|
||||
@@ -345,7 +345,7 @@ class Service
|
||||
// skip if admin is not logged in
|
||||
}
|
||||
}
|
||||
if(is_null($tpl)){
|
||||
if (is_null($tpl)) {
|
||||
$parsed = $this->createTemplateFromString("No template was provided, please contact the site administrator", $try_render, $vars);
|
||||
return $parsed;
|
||||
}
|
||||
@@ -992,7 +992,8 @@ class Service
|
||||
$list = [
|
||||
'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI',
|
||||
'FR', 'GR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL',
|
||||
'PL', 'PT', 'RO', 'SE', 'SI', 'SK', ];
|
||||
'PL', 'PT', 'RO', 'SE', 'SI', 'SK',
|
||||
];
|
||||
$c = $this->getCountries();
|
||||
$res = [];
|
||||
foreach ($list as $code) {
|
||||
|
||||
Reference in new issue
Block a user