diff --git a/phpmyfaq/admin/api/index.php b/phpmyfaq/admin/api/index.php index 83d041a826..384691db18 100644 --- a/phpmyfaq/admin/api/index.php +++ b/phpmyfaq/admin/api/index.php @@ -1,7 +1,7 @@ setLanguageByAcceptLanguage(); + // // Set translation class // @@ -45,7 +52,7 @@ Translation::create() ->setLanguagesDir(PMF_TRANSLATION_DIR) ->setDefaultLanguage('en') - ->setCurrentLanguage('en') // currently hardcoded + ->setCurrentLanguage($currentLanguage) ->setMultiByteLanguage(); } catch (Exception $e) { echo 'Error: ' . $e->getMessage(); diff --git a/phpmyfaq/admin/assets/templates/configuration/upgrade.twig b/phpmyfaq/admin/assets/templates/configuration/upgrade.twig index 1cdca5369d..35a146b631 100644 --- a/phpmyfaq/admin/assets/templates/configuration/upgrade.twig +++ b/phpmyfaq/admin/assets/templates/configuration/upgrade.twig @@ -11,15 +11,15 @@
- 1. Check for System Health + {{ headerCheckHealth }}

- This checks the correct file permissions and folder structure of your phpMyFAQ installation. + {{ msgHealthCheck }}

@@ -29,15 +29,15 @@
- 2. Check for Updates + {{ headerCheckUpdates }}

- You can check for new versions of phpMyFAQ, re-install or update your installation. + {{ msgUpdateCheck }}

diff --git a/phpmyfaq/admin/upgrade.php b/phpmyfaq/admin/upgrade.php index 3dffbd5724..760a6d28b8 100644 --- a/phpmyfaq/admin/upgrade.php +++ b/phpmyfaq/admin/upgrade.php @@ -37,6 +37,12 @@ if ($user->perm->hasPermission($user->getUserId(), 'editconfig')) { $templateVars = [ 'adminHeaderUpgrade' => Translation::get('ad_menu_upgrade'), + 'headerCheckHealth' => Translation::get('headerCheckHealth'), + 'msgHealthCheck' => Translation::get('msgHealthCheck'), + 'buttonCheckHealth' => Translation::get('buttonCheckHealth'), + 'headerCheckUpdates' => Translation::get('headerCheckUpdates'), + 'msgUpdateCheck' => Translation::get('msgUpdateCheck'), + 'buttonCheckUpdates' => Translation::get('buttonCheckUpdates'), 'isOnNightlies' => $faqConfig->get('upgrade.releaseEnvironment') === ReleaseType::NIGHTLY->value, 'releaseEnvironment' => ucfirst($faqConfig->get('upgrade.releaseEnvironment')), 'dateLastChecked' => $faqConfig->get('upgrade.dateLastChecked') diff --git a/phpmyfaq/src/phpMyFAQ/Controller/Administration/UpdateController.php b/phpmyfaq/src/phpMyFAQ/Controller/Administration/UpdateController.php index d2f8167880..692e578aa2 100644 --- a/phpmyfaq/src/phpMyFAQ/Controller/Administration/UpdateController.php +++ b/phpmyfaq/src/phpMyFAQ/Controller/Administration/UpdateController.php @@ -225,7 +225,7 @@ public function createTemporaryBackup(): StreamedResponse }); } - #[Route('admin/api/extract-package')] + #[Route('admin/api/install-package')] public function installPackage(): StreamedResponse { $configuration = Configuration::getConfigurationInstance(); diff --git a/phpmyfaq/translations/language_de.php b/phpmyfaq/translations/language_de.php index 68063b575a..7823469551 100755 --- a/phpmyfaq/translations/language_de.php +++ b/phpmyfaq/translations/language_de.php @@ -1332,8 +1332,14 @@ $PMF_LANG['msgBookmarkRemoved'] = 'Lesezeichen erfolgreich entfernt!'; // added v4.0.0-alpha - 2023-07-11 by Jan +$PMF_LANG['headerCheckHealth'] = '1. Systemzustand prüfen'; +$PMF_LANG['headerCheckUpdates'] = '2. Suche nach Updates'; +$PMF_LANG['msgHealthCheck'] = 'Dies überprüft die korrekten Dateiberechtigungen und die Ordnerstruktur Ihrer phpMyFAQ-Installation.'; +$PMF_LANG['msgUpdateCheck'] = 'Sie können nach neuen Versionen von phpMyFAQ suchen, neu installieren oder Ihre Installation aktualisieren.'; +$PMF_LANG['buttonCheckHealth'] = 'Systemzustand jetzt prüfen'; +$PMF_LANG['buttonCheckUpdates'] = 'Suche jetzt nach Updates'; $PMF_LANG['versionIsUpToDate'] = '✅ Deine installierte Version ist aktuell.'; -$PMF_LANG['healthCheckOkay'] = '✅ Deine installierte Version ist gesund.'; +$PMF_LANG['healthCheckOkay'] = '✅ Deine installierte Version ist in Ordnung.'; $PMF_LANG['downloadSuccessful'] = '✅ Download-Paket erfolgreich heruntergeladen!'; $PMF_LANG['downloadFailure'] = '❌ Download-Paket konnte nicht heruntergeladen werden'; $PMF_LANG['verificationFailure'] = '❌ Download-Paket konnte nicht verifiziert werden'; diff --git a/phpmyfaq/translations/language_en.php b/phpmyfaq/translations/language_en.php index a629ecb407..d6d863552d 100644 --- a/phpmyfaq/translations/language_en.php +++ b/phpmyfaq/translations/language_en.php @@ -1351,6 +1351,12 @@ $PMF_LANG['msgBookmarkRemoved'] = 'Bookmark successfully removed!'; // added v4.0.0-alpha - 2023-07-11 by Jan +$PMF_LANG['headerCheckHealth'] = '1. Check for System Health'; +$PMF_LANG['headerCheckUpdates'] = '2. Check for Updates'; +$PMF_LANG['msgHealthCheck'] = 'This checks the correct file permissions and folder structure of your phpMyFAQ installation.'; +$PMF_LANG['msgUpdateCheck'] = 'You can check for new versions of phpMyFAQ, re-install or update your installation.'; +$PMF_LANG['buttonCheckHealth'] = 'Check System health now'; +$PMF_LANG['buttonCheckUpdates'] = 'Check for Updates now'; $PMF_LANG['versionIsUpToDate'] = '✅ Your installed version is up-to-date!'; $PMF_LANG['healthCheckOkay'] = '✅ Your installed version is healthy!'; $PMF_LANG['downloadSuccessful'] = '✅ Package successfully downloaded!';