From d5275b1bf84504be4eac7be27d5b41e0128eacea Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Wed, 6 Aug 2025 17:14:10 +0200 Subject: [PATCH] Template/Update (Part 6) * convert talent calculators --- endpoints/petcalc/petcalc.php | 41 ++++++++++++++++++++++ endpoints/talent/talent.php | 39 +++++++++++++++++++++ localization/locale_dede.php | 4 +-- localization/locale_enus.php | 4 +-- localization/locale_eses.php | 4 +-- localization/locale_frfr.php | 4 +-- localization/locale_ruru.php | 4 +-- localization/locale_zhcn.php | 4 +-- pages/talent.php | 64 ----------------------------------- template/pages/talent.tpl.php | 9 +++-- 10 files changed, 98 insertions(+), 79 deletions(-) create mode 100644 endpoints/petcalc/petcalc.php create mode 100644 endpoints/talent/talent.php delete mode 100644 pages/talent.php diff --git a/endpoints/petcalc/petcalc.php b/endpoints/petcalc/petcalc.php new file mode 100644 index 00000000..0532008d --- /dev/null +++ b/endpoints/petcalc/petcalc.php @@ -0,0 +1,41 @@ +h1 = Lang::main('petCalc'); + $this->chooseType = Lang::main('chooseFamily'); + + array_unshift($this->title, $this->h1); + + parent::generate(); + } +} + +?> diff --git a/endpoints/talent/talent.php b/endpoints/talent/talent.php new file mode 100644 index 00000000..0ea35fd7 --- /dev/null +++ b/endpoints/talent/talent.php @@ -0,0 +1,39 @@ +h1 = Lang::main('talentCalc'); + $this->chooseType = Lang::main('chooseClass'); + + array_unshift($this->title, $this->h1); + + parent::generate(); + } +} + +?> diff --git a/localization/locale_dede.php b/localization/locale_dede.php index 9bc36a18..5dcbda6b 100644 --- a/localization/locale_dede.php +++ b/localization/locale_dede.php @@ -118,8 +118,8 @@ $lang = array( 'compareTool' => "Gegenstandsvergleichswerkzeug", 'talentCalc' => "Talentrechner", 'petCalc' => "Begleiterrechner", - 'chooseClass' => "Wählt eine Klasse", - 'chooseFamily' => "Wählt eine Tierart", + 'chooseClass' => "Wählt eine Klasse:", + 'chooseFamily' => "Wählt eine Tierart:", // search 'search' => "Suche", diff --git a/localization/locale_enus.php b/localization/locale_enus.php index b83cbbf8..29e962db 100644 --- a/localization/locale_enus.php +++ b/localization/locale_enus.php @@ -118,8 +118,8 @@ $lang = array( 'compareTool' => "Item Comparison Tool", 'talentCalc' => "Talent Calculator", 'petCalc' => "Hunter Pet Calculator", - 'chooseClass' => "Choose a class", - 'chooseFamily' => "Choose a pet family", + 'chooseClass' => "Choose a class:", + 'chooseFamily' => "Choose a pet family:", // search 'search' => "Search", diff --git a/localization/locale_eses.php b/localization/locale_eses.php index 66dc8e76..06a2be06 100644 --- a/localization/locale_eses.php +++ b/localization/locale_eses.php @@ -118,8 +118,8 @@ $lang = array( 'compareTool' => "Herramienta de comparación de objetos", 'talentCalc' => "Calculadora de talentos", 'petCalc' => "Calculadora de mascotas", - 'chooseClass' => "Escoge una clase", - 'chooseFamily' => "Escoge una familia de mascota", + 'chooseClass' => "Escoge una clase:", + 'chooseFamily' => "Escoge una familia de mascota:", // search 'search' => "Búsqueda", diff --git a/localization/locale_frfr.php b/localization/locale_frfr.php index 406062a9..ddd0d827 100644 --- a/localization/locale_frfr.php +++ b/localization/locale_frfr.php @@ -118,8 +118,8 @@ $lang = array( 'compareTool' => "Outil de comparaison d'objets", 'talentCalc' => "Calculateur de Talents", 'petCalc' => "Calculateur de familiers", - 'chooseClass' => "Choisissez une classe", - 'chooseFamily' => "Choisissez un familier", + 'chooseClass' => "Choisissez une classe :", + 'chooseFamily' => "Choisissez un familier :", // search 'search' => "Recherche", diff --git a/localization/locale_ruru.php b/localization/locale_ruru.php index f7e80ba0..ced89286 100644 --- a/localization/locale_ruru.php +++ b/localization/locale_ruru.php @@ -118,8 +118,8 @@ $lang = array( 'compareTool' => "Инструмент сравнения предметов", 'talentCalc' => "Расчёт талантов", 'petCalc' => "Расчёт умений питомцев", - 'chooseClass' => "Выберите класс", - 'chooseFamily' => "Выберите семейство питомцев", + 'chooseClass' => "Выберите класс:", + 'chooseFamily' => "Выберите семейство питомцев:", // search 'search' => "Поиск", diff --git a/localization/locale_zhcn.php b/localization/locale_zhcn.php index 7a20fbd9..3fb37d58 100644 --- a/localization/locale_zhcn.php +++ b/localization/locale_zhcn.php @@ -119,8 +119,8 @@ $lang = array( 'compareTool' => "物品比较工具", 'talentCalc' => "天赋模拟器", 'petCalc' => "猎人宠物模拟器", - 'chooseClass' => "选择一个职业", - 'chooseFamily' => "选择一个宠物家族", + 'chooseClass' => "选择一个职业:", + 'chooseFamily' => "选择一个宠物家族:", // search 'search' => "搜索", diff --git a/pages/talent.php b/pages/talent.php deleted file mode 100644 index 12a00cfe..00000000 --- a/pages/talent.php +++ /dev/null @@ -1,64 +0,0 @@ -isPetCalc = $pageCall == 'petcalc'; - $this->name = $this->isPetCalc ? Lang::main('petCalc') : Lang::main('talentCalc'); - } - - protected function generateContent() - { - // add conditional js & css - if ($this->isPetCalc) - $this->addScript( - [SC_JS_FILE, '?data=pet-talents.pets'], - [SC_JS_FILE, 'js/petcalc.js'], - [SC_JS_FILE, 'js/swfobject.js'], - [SC_CSS_FILE, 'css/petcalc.css'] - ); - else - $this->addScript( - [SC_JS_FILE, '?data=glyphs'], - [SC_JS_FILE, 'js/talent.js'] - ); - - $this->tcType = $this->isPetCalc ? 'pc' : 'tc'; - } - - protected function generateTitle() - { - array_unshift($this->title, $this->name); - } - - protected function generatePath() - { - $this->path[] = $this->isPetCalc ? 2 : 0; - } -} - -?> diff --git a/template/pages/talent.tpl.php b/template/pages/talent.tpl.php index 3cc7b97c..dbc85fe8 100644 --- a/template/pages/talent.tpl.php +++ b/template/pages/talent.tpl.php @@ -1,7 +1,10 @@ - +brick('header'); ?> + use \Aowow\Lang; + $this->brick('header'); +?>
@@ -14,7 +17,7 @@
-

tcType == 'tc' ? Lang::main('chooseClass') : Lang::main('chooseFamily')) . Lang::main('colon'); ?>

+

chooseType; ?>