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

View file

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