Make wish priorities translateable

This commit is contained in:
Jay Trees 2022-03-22 14:28:26 +01:00
parent 7418c6ff9e
commit 719b11aa59
2 changed files with 31 additions and 21 deletions

View file

@ -72,13 +72,6 @@ setcookie(
$session['httponly']
);
/**
* API
*/
if (isset($api)) {
return;
}
/**
* Language
*/
@ -105,6 +98,18 @@ if (file_exists($translationFilepath)) {
$translations = $loader->loadFile($translationFilepath);
}
/**
* Wish
*/
wishthis\Wish::initialize();
/**
* API
*/
if (isset($api)) {
return;
}
/**
* Install
*/

View file

@ -13,20 +13,25 @@ class Wish
/**
* Static
*/
public static array $priorities = array(
'' => array(
'name' => 'Default',
'color' => '',
),
'1' => array(
'name' => 'Nice to have',
'color' => 'black',
),
'3' => array(
'name' => 'Would love it',
'color' => 'orange',
),
);
public static array $priorities;
public static function initialize()
{
self::$priorities = array(
'' => array(
'name' => __('Default'),
'color' => '',
),
'1' => array(
'name' => __('Nice to have'),
'color' => 'black',
),
'3' => array(
'name' => __('Would love it'),
'color' => 'orange',
),
);
}
/**
* Non-Static