Skip to content

Commit

Permalink
chore(translation)!: translation of everything remotely italian to en…
Browse files Browse the repository at this point in the history
…glish.

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 <[email protected]>
  • Loading branch information
well-it-wasnt-me authored and Antonio D'Angelo committed Dec 4, 2023
1 parent 53a6fbc commit 1754c59
Show file tree
Hide file tree
Showing 23 changed files with 350 additions and 381 deletions.
8 changes: 4 additions & 4 deletions config/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
Expand Down Expand Up @@ -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 ***/
Expand Down
2 changes: 1 addition & 1 deletion resources/text/en_US/LC_MESSAGES/messages_en_US.po
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/Action/Pages/ConsultoPageAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',


]);
Expand Down Expand Up @@ -210,7 +210,7 @@ public function __invoke(ServerRequestInterface $request, ResponseInterface $res
$cmp .= "<hr>";
}

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,
Expand Down
10 changes: 5 additions & 5 deletions src/Domain/Consulti/Repository/ConsultRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
10 changes: 5 additions & 5 deletions src/Domain/Users/Repository/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/Domain/Users/Service/UserCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 0 additions & 12 deletions src/Moebius/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand All @@ -31,6 +21,4 @@ final class Definition
const ADMIN = 3;
const DOCTOR = 2;
const PATIENT = 1;
const GAMING_HALL = 4;
const USER = 5;
}
2 changes: 1 addition & 1 deletion src/Moebius/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* Class Logger
* @package App\Moebius
* @thanks to Luca Tortora <[email protected]>
* @thanks to Luca Tortora
*/
final class Logger
{
Expand Down
4 changes: 2 additions & 2 deletions src/Moebius/Token.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
{
Expand Down
Loading

0 comments on commit 1754c59

Please sign in to comment.