From 1754c593811d9f0cb5d4ee3a0edecda1a4bfe37d Mon Sep 17 00:00:00 2001 From: Antonio Date: Mon, 4 Dec 2023 13:58:24 +0100 Subject: [PATCH] chore(translation)!: translation of everything remotely italian to english. If someone find still something untranslated, feel free to point out BREAKING CHANGE: with the actual status the mobile app will never properly work. Close #7 Signed-off-by: Antonio D'Angelo --- config/routes.php | 8 +- .../text/en_US/LC_MESSAGES/messages_en_US.po | 2 +- src/Action/Pages/ConsultoPageAction.php | 6 +- .../Consulti/Repository/ConsultRepository.php | 10 +- .../Users/Repository/UserRepository.php | 10 +- src/Domain/Users/Service/UserCreator.php | 2 +- src/Moebius/Definition.php | 12 -- src/Moebius/Logger.php | 2 +- src/Moebius/Token.php | 4 +- templates/{consulto => consult}/home.php | 60 +++---- templates/doctor/calendar.php | 58 +++---- templates/doctor/faq.php | 32 ++-- templates/doctor/messages.php | 12 +- templates/doctor/reports.php | 74 ++++----- templates/doctor/view.php | 95 ++++++----- templates/errors/not_found.php | 6 +- templates/home/doctor.php | 24 +-- templates/layout/consulto.php | 2 +- templates/layout/layout.php | 34 ++-- templates/login/login_doctor.php | 23 +-- templates/patients/add.php | 86 +++++----- templates/patients/view.php | 153 +++++++++--------- templates/register/doc.php | 16 +- 23 files changed, 350 insertions(+), 381 deletions(-) rename templates/{consulto => consult}/home.php (90%) diff --git a/config/routes.php b/config/routes.php index 902968f..dbfcfd1 100644 --- a/config/routes.php +++ b/config/routes.php @@ -147,8 +147,8 @@ $group->get("/privacy", PrivacyPageAction::class)->setName('privacy-policy'); $group->get("/terms", TermsPageAction::class)->setName('terms'); $group->post("/stripe/webhook", webhook::class)->setName('wh'); - $group->get("/consulto/{codice}", ConsultoPageAction::class)->setName('consulto'); - $group->post("/pincode/check", PinCodeActionCheck::class)->setName('consulto-pin-check'); + $group->get("/consult/{codice}", ConsultoPageAction::class)->setName('consult'); + $group->post("/pincode/check", PinCodeActionCheck::class)->setName('consult-pin-check'); $group->post("/hack/attempt", HackAttemptAction::class)->setName('log-hack-attempt'); $group->get('/create-checkout-session', CreateCheckoutSession::class)->setName('payment-page'); }); @@ -206,8 +206,8 @@ $group->post('/dsm/list/search', WebDsmSearchByNameAction::class); $group->post('/search/patient', ReportSearchPatAction::class); $group->post('/reports/generate', WebReportGenAction::class); - $group->post('/consulto/create', GenerateConsultLinkAction::class); - $group->get('/consulto/list/{paz_id}', ListConsultLinkAction::class); + $group->post('/consult/create', GenerateConsultLinkAction::class); + $group->get('/consult/list/{paz_id}', ListConsultLinkAction::class); /*** END PATIENTS ***/ diff --git a/resources/text/en_US/LC_MESSAGES/messages_en_US.po b/resources/text/en_US/LC_MESSAGES/messages_en_US.po index d968fe8..ead7f54 100644 --- a/resources/text/en_US/LC_MESSAGES/messages_en_US.po +++ b/resources/text/en_US/LC_MESSAGES/messages_en_US.po @@ -916,7 +916,7 @@ msgid "" msgstr "Error while sending mail. if you wrote it right contact Mental Space" #: src/Domain/Consulti/Repository/ConsultiRepository.php:126 -msgid "Richiesta consulto inviata correttamente" +msgid "Richiesta consult inviata correttamente" msgstr "Medical Consultation request sent successfull" #: src/Domain/Patients/Repository/PatientsRepository.php:103 diff --git a/src/Action/Pages/ConsultoPageAction.php b/src/Action/Pages/ConsultoPageAction.php index 75383b9..70757fc 100644 --- a/src/Action/Pages/ConsultoPageAction.php +++ b/src/Action/Pages/ConsultoPageAction.php @@ -36,7 +36,7 @@ public function __invoke(ServerRequestInterface $request, ResponseInterface $res return $this->renderer->render($response, 'errors/not_found.php'); } - $this->renderer->setLayout('layout/consulto.php'); + $this->renderer->setLayout('layout/consult.php'); $this->renderer->addAttribute('css', [ '/app-assets/vendors/css/forms/select/select2.min.css', @@ -78,7 +78,7 @@ public function __invoke(ServerRequestInterface $request, ResponseInterface $res '/app-assets/js/scripts/pages/patient-detail.js', '/app-assets/js/scripts/components/components-popovers.js', '/app-assets/js/scripts/components/mutation.js', - '/app-assets/js/scripts/pages/consulto.js', + '/app-assets/js/scripts/pages/consult.js', ]); @@ -210,7 +210,7 @@ public function __invoke(ServerRequestInterface $request, ResponseInterface $res $cmp .= "
"; } - return $this->renderer->render($response, 'consulto/home.php', [ + return $this->renderer->render($response, 'consult/home.php', [ 'patient' => $patientData[0], 'diario' => empty($diario) ? 'Non ha scritto nulla negli ultimi 7 giorni':$diario, 'lista_farmaci' => $farmaci, diff --git a/src/Domain/Consulti/Repository/ConsultRepository.php b/src/Domain/Consulti/Repository/ConsultRepository.php index b11d12f..8d570d7 100644 --- a/src/Domain/Consulti/Repository/ConsultRepository.php +++ b/src/Domain/Consulti/Repository/ConsultRepository.php @@ -119,24 +119,24 @@ public function generaLink($email, int $paz_id) $mail->Subject = __('Consulto Medico'); $mail_body = file_get_contents(__DIR__ . '/../../../../data/mail_template/'.returnLocale().'/consulto_invitation'); $search = ['{{DOC_NOME}}', '{{DOC_COGNOME}}', '{{FULL_LINK}}', '{{PIN_CODE}}']; - $replace = [$_SESSION['fname'], $_SESSION['lname'], 'https://--INSERT KEY HERE--/public/consulto/' . $codice, $pin_code]; + $replace = [$_SESSION['fname'], $_SESSION['lname'], 'https://--INSERT KEY HERE--/public/consult/' . $codice, $pin_code]; $mail_body = str_replace($search, $replace, $mail_body); $mail->Body = $mail_body; $mail->send(); } catch (Exception $e) { return ['status' => 'error', 'message' => __('Errore invio E-Mail, se lo hai scritto correttamente contatta Mental Space Support Team'), - 'link' => 'https://--INSERT KEY HERE--/public/consulto/' . $codice, 'pin_code' => $pin_code ]; + 'link' => 'https://--INSERT KEY HERE--/public/consult/' . $codice, 'pin_code' => $pin_code ]; } - return ['status' => 'success', 'message' => __('Richiesta consulto inviata correttamente'), - 'link' => 'https://--INSERT KEY HERE--/public/consulto/' . $codice, 'pin_code' => $pin_code ]; + return ['status' => 'success', 'message' => __('Richiesta consult inviata correttamente'), + 'link' => 'https://--INSERT KEY HERE--/public/consult/' . $codice, 'pin_code' => $pin_code ]; } public function listaConsulti($paz_id) { return $this->queryFactory->rawQuery("SELECT destinatario, - CONCAT('https://--INSERT KEY HERE--/public/consulto/', codice) AS full_link, + CONCAT('https://--INSERT KEY HERE--/public/consult/', codice) AS full_link, pin_code, (CASE WHEN stato = 1 THEN 'Attivo' diff --git a/src/Domain/Users/Repository/UserRepository.php b/src/Domain/Users/Repository/UserRepository.php index e81667e..51358a1 100644 --- a/src/Domain/Users/Repository/UserRepository.php +++ b/src/Domain/Users/Repository/UserRepository.php @@ -172,7 +172,7 @@ public function updateUser($userID, $user): array return ['status'=>'error', 'message' => __('Something went wrong, try again later')]; } - return ['status'=>'success', 'message' => __('Aggiornato con successo')]; + return ['status'=>'success', 'message' => __('Updated')]; } public function updateUserPassword(UserDataDoc $user): array @@ -310,7 +310,7 @@ public function updateUserAddr($userID, $user): array return ['status'=>'error', 'message' => __('Something went wrong, try again later')]; } - return ['status'=>'success', 'message' => __('Aggiornato con successo')]; + return ['status'=>'success', 'message' => __('Updated')]; } function getaddress($coord) @@ -354,17 +354,17 @@ public function pwdUpdate($data, $uid) $data['password'] = hash('sha512', $data['password']); if (!$this->checkPwd($data['old_password'], $uid)) { - return ['status'=>'error', 'message' => __('Password attuale non esatta, riprovare')]; + return ['status'=>'error', 'message' => __('Actual password is not correct, try again')]; } if (!$this->queryFactory->newUpdate('users', ['password' => $data['password']]) ->andWhere(['user_id' => $uid]) ->execute()) { - return ['status'=>'error', 'message' => __('Qualcosa è andato storto')]; + return ['status'=>'error', 'message' => __('Something went wrong')]; } - return ['status'=>'success', 'message' => __('Password Aggiornata con successo')]; + return ['status'=>'success', 'message' => __('Password Updated')]; } public function checkPwd($pwd, $uid) diff --git a/src/Domain/Users/Service/UserCreator.php b/src/Domain/Users/Service/UserCreator.php index b60a913..a12d696 100644 --- a/src/Domain/Users/Service/UserCreator.php +++ b/src/Domain/Users/Service/UserCreator.php @@ -71,7 +71,7 @@ public function createDocUser(array $data): int } if (!$user->locale) { - $user->locale = 'it_IT'; + $user->locale = 'en_EN'; } // Insert user and get new user ID diff --git a/src/Moebius/Definition.php b/src/Moebius/Definition.php index 4b79d0c..3af12af 100644 --- a/src/Moebius/Definition.php +++ b/src/Moebius/Definition.php @@ -8,16 +8,6 @@ */ final class Definition { - /** - * Error Messages - */ - - const ERR_ADD_SMB = "Error while adding smartbox"; - const ERR_ADD_GH = "Error while adding gaming hall"; - const ERR_RESET_SB = "Error while resetting smartbox"; - const ERR_DEL_SB = "Error while deleting smartbox"; - const RESET_SB_OFFLINE = 'Warning, the smartbox is offline. All data has been deleted, remember to do a physical reset on the board'; - /** * API Error Messages */ @@ -31,6 +21,4 @@ final class Definition const ADMIN = 3; const DOCTOR = 2; const PATIENT = 1; - const GAMING_HALL = 4; - const USER = 5; } diff --git a/src/Moebius/Logger.php b/src/Moebius/Logger.php index 26fd253..86fb602 100644 --- a/src/Moebius/Logger.php +++ b/src/Moebius/Logger.php @@ -8,7 +8,7 @@ /** * Class Logger * @package App\Moebius - * @thanks to Luca Tortora + * @thanks to Luca Tortora */ final class Logger { diff --git a/src/Moebius/Token.php b/src/Moebius/Token.php index ec8f73d..526c6c5 100644 --- a/src/Moebius/Token.php +++ b/src/Moebius/Token.php @@ -40,9 +40,9 @@ public function make_token($length = 16) } /** - * Funzione generazione caratteri random + * Generate random chars * - * @return string Caratteri random + * @return string Random Chars */ function rand_alphanumeric() { diff --git a/templates/consulto/home.php b/templates/consult/home.php similarity index 90% rename from templates/consulto/home.php rename to templates/consult/home.php index ed3dbf5..be9a91c 100644 --- a/templates/consulto/home.php +++ b/templates/consult/home.php @@ -18,8 +18,8 @@ User avatar @@ -30,7 +30,7 @@

- +
@@ -39,20 +39,20 @@

- +
-

+

  • - + -
  • - - " . $patient['descrizione'] . ""; ?> + + " . $patient['description'] . ""; ?>
@@ -70,12 +70,12 @@ - +