Ver código fonte

Update i18n calls

Alan Lam 7 anos atrás
pai
commit
a55498fcfe
77 arquivos alterados com 623 adições e 626 exclusões
  1. 1 1
      controllers/404.php
  2. 1 1
      controllers/503.php
  3. 20 20
      controllers/account.php
  4. 4 4
      controllers/account_deactivate.php
  5. 4 4
      controllers/account_delete.php
  6. 2 2
      controllers/account_reactivate.php
  7. 8 8
      controllers/address_add.php
  8. 14 14
      controllers/address_edit.php
  9. 4 4
      controllers/addresses.php
  10. 1 1
      controllers/become_a_tester.php
  11. 7 7
      controllers/contact.php
  12. 1 1
      controllers/home.php
  13. 1 1
      controllers/jobs.php
  14. 7 7
      controllers/log_in.php
  15. 1 1
      controllers/log_out.php
  16. 13 13
      controllers/practice.php
  17. 3 3
      controllers/practice_file.php
  18. 2 2
      controllers/practice_template_select.php
  19. 1 1
      controllers/privacy_policy.php
  20. 3 3
      controllers/project_invoice.php
  21. 18 18
      controllers/register.php
  22. 8 8
      controllers/reset_password.php
  23. 1 1
      controllers/services.php
  24. 13 13
      controllers/settings.php
  25. 8 8
      controllers/submit_id.php
  26. 2 2
      controllers/terms_accept.php
  27. 1 1
      controllers/terms_and_conditions.php
  28. 3 3
      controllers/terms_decline.php
  29. 15 15
      controllers/test.php
  30. 6 6
      controllers/test_confirm.php
  31. 2 2
      controllers/test_file.php
  32. 5 5
      controllers/test_invoice.php
  33. 1 1
      controllers/test_pdf.php
  34. 2 2
      controllers/tests.php
  35. 4 4
      controllers/tests_available.php
  36. 9 9
      controllers/tests_available_ajax.php
  37. 3 3
      controllers/tests_completed.php
  38. 2 2
      controllers/tests_tester_kml.php
  39. 3 3
      controllers/user_activation.php
  40. 26 26
      engine/test.php
  41. 37 37
      engine/user.php
  42. 9 12
      initialise.php
  43. 3 3
      views/404.php
  44. 3 3
      views/503.php
  45. 22 22
      views/account.php
  46. 9 9
      views/account_deactivate.php
  47. 12 12
      views/account_delete.php
  48. 8 8
      views/address_add_form.php
  49. 17 17
      views/address_edit_form.php
  50. 6 6
      views/addresses.php
  51. 7 7
      views/become_a_tester.php
  52. 9 9
      views/contact.php
  53. 1 1
      views/error.php
  54. 12 12
      views/footer.php
  55. 12 12
      views/header.php
  56. 13 13
      views/home.php
  57. 8 8
      views/jobs.php
  58. 7 7
      views/log_in.php
  59. 7 7
      views/modal_services_1.php
  60. 6 6
      views/modal_services_2.php
  61. 4 4
      views/modal_services_3.php
  62. 9 9
      views/modal_test_claim.php
  63. 6 6
      views/modal_test_invoice.php
  64. 3 3
      views/pagination.php
  65. 7 7
      views/practice_form.php
  66. 3 3
      views/practice_template_select.php
  67. 30 30
      views/register.php
  68. 9 9
      views/reset_password.php
  69. 12 12
      views/services.php
  70. 36 36
      views/settings.php
  71. 16 16
      views/submit_id.php
  72. 8 8
      views/terms_decline.php
  73. 6 6
      views/test_form.php
  74. 12 12
      views/test_list_assigned.php
  75. 13 13
      views/test_list_completed.php
  76. 3 3
      views/tests.php
  77. 8 8
      views/tests_available.php

+ 1 - 1
controllers/404.php

@@ -2,7 +2,7 @@
 
 
 header("HTTP/1.0 404 Not Found");
 header("HTTP/1.0 404 Not Found");
 
 
-$page_title = _("Page Not Found");
+$page_title = __("Page Not Found");
 
 
 View::includeOnce("header", compact("page_title"));
 View::includeOnce("header", compact("page_title"));
 View::include("404");
 View::include("404");

+ 1 - 1
controllers/503.php

@@ -2,7 +2,7 @@
 
 
 header("HTTP/1.0 503 Not Found");
 header("HTTP/1.0 503 Not Found");
 
 
-$page_title = _("Internal Server Error");
+$page_title = __("Internal Server Error");
 
 
 View::includeOnce("header", compact("page_title"));
 View::includeOnce("header", compact("page_title"));
 View::include("503");
 View::include("503");

+ 20 - 20
controllers/account.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-$page_title = _("Account");
+$page_title = __("Account");
 
 
 $user = Core::$user;
 $user = Core::$user;
 
 
@@ -14,9 +14,9 @@ $icons = [];
 
 
 if($user->level >= User::LEVEL_ADMIN) {
 if($user->level >= User::LEVEL_ADMIN) {
 
 
-	$icons[] = new AccountIcon(_("Customers"), "/account/customers", "warehouse");
-	$icons[] = new AccountIcon(_("Map Overview"), "/account/map-overview", "map-marked");
-	$icons[] = new AccountIcon(($user->level == User::LEVEL_SUPERADMIN ? _("Users") : _("Testers")), "/account/users", "users");
+	$icons[] = new AccountIcon(__("Customers"), "/account/customers", "warehouse");
+	$icons[] = new AccountIcon(__("Map Overview"), "/account/map-overview", "map-marked");
+	$icons[] = new AccountIcon(($user->level == User::LEVEL_SUPERADMIN ? __("Users") : __("Testers")), "/account/users", "users");
 
 
 	$users = User::query(["level" => User::LEVEL_UNVERIFIED]);
 	$users = User::query(["level" => User::LEVEL_UNVERIFIED]);
 	$tests = Test::query(["status" => Test::STATUS_PENDING_VERIFICATION]);
 	$tests = Test::query(["status" => Test::STATUS_PENDING_VERIFICATION]);
@@ -24,13 +24,13 @@ if($user->level >= User::LEVEL_ADMIN) {
 	$users_pending_verification = count($users);
 	$users_pending_verification = count($users);
 	$tests_pending_verification = count($tests);
 	$tests_pending_verification = count($tests);
 
 
-	$icons[] = new AccountIcon(_("Projects"), "/account/projects", "list");
-	$icons[] = new AccountIcon(_("Locations"), "/account/locations", "map-marker");
-	$icons[] = new AccountIcon(_("Templates"), "/account/templates", "file-alt");
+	$icons[] = new AccountIcon(__("Projects"), "/account/projects", "list");
+	$icons[] = new AccountIcon(__("Locations"), "/account/locations", "map-marker");
+	$icons[] = new AccountIcon(__("Templates"), "/account/templates", "file-alt");
 
 
 	$pending_tester_invoice_test_count = count(Test::query(["status_tester_invoice" => Test::STATUS_TESTER_INVOICE_PENDING]));
 	$pending_tester_invoice_test_count = count(Test::query(["status_tester_invoice" => Test::STATUS_TESTER_INVOICE_PENDING]));
 
 
-	$invoice_icon = new AccountIcon(_("Invoices"), "/account/tests?status_tester_invoice=100", "file-invoice");
+	$invoice_icon = new AccountIcon(__("Invoices"), "/account/tests?status_tester_invoice=100", "file-invoice");
 	$invoice_icon->setCounter($pending_tester_invoice_test_count);
 	$invoice_icon->setCounter($pending_tester_invoice_test_count);
 
 
 	$icons[] = $invoice_icon;
 	$icons[] = $invoice_icon;
@@ -38,7 +38,7 @@ if($user->level >= User::LEVEL_ADMIN) {
 }
 }
 
 
 if($user->level >= User::LEVEL_CUSTOMER) {
 if($user->level >= User::LEVEL_CUSTOMER) {
-	$icons[] = new AccountIcon(_("Reports"), "/account/reports", "chart-pie");
+	$icons[] = new AccountIcon(__("Reports"), "/account/reports", "chart-pie");
 }
 }
 
 
 if($user->isTester() || $user->isAdmin()) {
 if($user->isTester() || $user->isAdmin()) {
@@ -46,27 +46,27 @@ if($user->isTester() || $user->isAdmin()) {
 	$tests_remaining = count($tests);
 	$tests_remaining = count($tests);
 
 
 	$tests_url = $user->isAdmin() ? "/account/tests?custom=overdue_test" : "/account/tests";
 	$tests_url = $user->isAdmin() ? "/account/tests?custom=overdue_test" : "/account/tests";
-	$tests_icon = new AccountIcon(_("Tests"), $tests_url, "clipboard-check");
+	$tests_icon = new AccountIcon(__("Tests"), $tests_url, "clipboard-check");
 	$tests_icon->setCounter($tests_remaining);
 	$tests_icon->setCounter($tests_remaining);
 
 
 	$icons[] = $tests_icon;
 	$icons[] = $tests_icon;
-	$icons[] = new AccountIcon(_("Practice"), "/account/practice", "chalkboard-teacher");
+	$icons[] = new AccountIcon(__("Practice"), "/account/practice", "chalkboard-teacher");
 }
 }
 
 
 if($user->level == User::LEVEL_TESTER) {
 if($user->level == User::LEVEL_TESTER) {
-	$icons[] = new AccountIcon(_("Addresses"), "/account/addresses", "address-book");
-	$icons[] = new AccountIcon(_("Tests (Completed)"), "/account/tests/completed", "check");
+	$icons[] = new AccountIcon(__("Addresses"), "/account/addresses", "address-book");
+	$icons[] = new AccountIcon(__("Tests (Completed)"), "/account/tests/completed", "check");
 }
 }
 
 
 if($user->level == User::LEVEL_REGISTERED) {
 if($user->level == User::LEVEL_REGISTERED) {
-	$icons[] = new AccountIcon(_("Submit ID"), "/account/submit-id", "id-card");
+	$icons[] = new AccountIcon(__("Submit ID"), "/account/submit-id", "id-card");
 }
 }
 
 
 if(!$user->terms_accepted) {
 if(!$user->terms_accepted) {
 	$icons = [];
 	$icons = [];
 }
 }
 
 
-$icons[] = new AccountIcon(_("Settings"), "/account/settings", "cog");
+$icons[] = new AccountIcon(__("Settings"), "/account/settings", "cog");
 
 
 usort($icons, function($a, $b) {
 usort($icons, function($a, $b) {
 	return $a->name <=> $b->name;
 	return $a->name <=> $b->name;
@@ -75,24 +75,24 @@ usort($icons, function($a, $b) {
 // Actions
 // Actions
 $actions = [];
 $actions = [];
 if($user->level == User::LEVEL_DEACTIVATED) {
 if($user->level == User::LEVEL_DEACTIVATED) {
-	$actions[] = new AccountIcon(_("Reactivate Account"), "/account/reactivate", "user-check");
+	$actions[] = new AccountIcon(__("Reactivate Account"), "/account/reactivate", "user-check");
 }
 }
 else if($user->level == User::LEVEL_TESTER) {
 else if($user->level == User::LEVEL_TESTER) {
-	$actions[] = new AccountIcon(_("Deactivate Account..."), "/account/deactivate", "user-times");
+	$actions[] = new AccountIcon(__("Deactivate Account..."), "/account/deactivate", "user-times");
 }
 }
 
 
-$actions[] = new AccountIcon(_("Delete Account..."), "/account/delete", "user-slash");
+$actions[] = new AccountIcon(__("Delete Account..."), "/account/delete", "user-slash");
 
 
 // To-do
 // To-do
 $to_do = [];
 $to_do = [];
 if($users_pending_verification) {
 if($users_pending_verification) {
-	$icon = new AccountIcon(_("Verify Users"), "/account/users?level=" . User::LEVEL_UNVERIFIED, "user-check");
+	$icon = new AccountIcon(__("Verify Users"), "/account/users?level=" . User::LEVEL_UNVERIFIED, "user-check");
 	$icon->setCounter($users_pending_verification);
 	$icon->setCounter($users_pending_verification);
 	$to_do[] = $icon;
 	$to_do[] = $icon;
 }
 }
 
 
 if($tests_pending_verification) {
 if($tests_pending_verification) {
-	$icon = new AccountIcon(_("Verify Tests"), "/account/tests?status=" . Test::STATUS_PENDING_VERIFICATION, "clipboard-check");
+	$icon = new AccountIcon(__("Verify Tests"), "/account/tests?status=" . Test::STATUS_PENDING_VERIFICATION, "clipboard-check");
 	$icon->setCounter($tests_pending_verification);
 	$icon->setCounter($tests_pending_verification);
 	$to_do[] = $icon;
 	$to_do[] = $icon;
 }
 }

+ 4 - 4
controllers/account_deactivate.php

@@ -1,8 +1,8 @@
 <?php
 <?php
 
 
-$page_title = _("Deactivate Account");
+$page_title = __("Deactivate Account");
 
 
-Core::addBreadcrumb("/account", _("Account"));
+Core::addBreadcrumb("/account", __("Account"));
 Core::addBreadcrumb("/account/deactivate", $page_title);
 Core::addBreadcrumb("/account/deactivate", $page_title);
 
 
 $submit = http::value("submit");
 $submit = http::value("submit");
@@ -11,9 +11,9 @@ if($submit) {
 		Core::validateCSRFToken($submit);
 		Core::validateCSRFToken($submit);
 
 
 		$success = Core::$user->deactivate();
 		$success = Core::$user->deactivate();
-		if(!$success) throw new Exception(_("Failed to deactivate account. Please try again later."));
+		if(!$success) throw new Exception(__("Failed to deactivate account. Please try again later."));
 
 
-		Core::addAlert("success", _("Deactivated account successfully."));
+		Core::addAlert("success", __("Deactivated account successfully."));
 		HTTP::redirect("/account");
 		HTTP::redirect("/account");
 	}
 	}
 	catch(Exception $e) {
 	catch(Exception $e) {

+ 4 - 4
controllers/account_delete.php

@@ -1,8 +1,8 @@
 <?php
 <?php
 
 
-$page_title = _("Delete Account");
+$page_title = __("Delete Account");
 
 
-Core::addBreadcrumb("/account", _("Account"));
+Core::addBreadcrumb("/account", __("Account"));
 Core::addBreadcrumb("/account/delete", $page_title);
 Core::addBreadcrumb("/account/delete", $page_title);
 
 
 $submit = http::value("submit");
 $submit = http::value("submit");
@@ -12,9 +12,9 @@ if($submit) {
 
 
 		$user = Core::$user;
 		$user = Core::$user;
 		$success = $user->softDelete();
 		$success = $user->softDelete();
-		if(!$success) throw new Exception(_("Failed to delete account. Please try again later."));
+		if(!$success) throw new Exception(__("Failed to delete account. Please try again later."));
 
 
-		Core::addAlert("success", _("Account deleted successfully."));
+		Core::addAlert("success", __("Account deleted successfully."));
 
 
 		unset($_SESSION["user_id"]);
 		unset($_SESSION["user_id"]);
 
 

+ 2 - 2
controllers/account_reactivate.php

@@ -3,9 +3,9 @@
 $user = Core::$user;
 $user = Core::$user;
 $user->level = User::LEVEL_TESTER;
 $user->level = User::LEVEL_TESTER;
 $success = $user->commit();
 $success = $user->commit();
-if(!$success) throw new Exception(_("Failed to update our records. Please try again later."));
+if(!$success) throw new Exception(__("Failed to update our records. Please try again later."));
 
 
-Core::addAlert("success", _("Account reactivated successfully."));
+Core::addAlert("success", __("Account reactivated successfully."));
 
 
 HTTP::redirect("/account");
 HTTP::redirect("/account");
 
 

+ 8 - 8
controllers/address_add.php

@@ -1,9 +1,9 @@
 <?php
 <?php
 
 
-$page_title = _("Add Address");
+$page_title = __("Add Address");
 
 
-Core::addBreadcrumb("/account", _("Account"));
-Core::addBreadcrumb("/account/addresses", _("Addresses"));
+Core::addBreadcrumb("/account", __("Account"));
+Core::addBreadcrumb("/account/addresses", __("Addresses"));
 Core::addBreadcrumb("/account/addresses/add", $page_title);
 Core::addBreadcrumb("/account/addresses/add", $page_title);
 
 
 $user_address = new UserAddress;
 $user_address = new UserAddress;
@@ -21,9 +21,9 @@ if($submit) {
 		$user_address->postal_code = http::value("postal_code", "trim");
 		$user_address->postal_code = http::value("postal_code", "trim");
 		$user_address->country = http::value("country", "trim");
 		$user_address->country = http::value("country", "trim");
 
 
-		if(empty($user_address->name)) $form_exception->addError(_("Name is required."));
-		if(empty($user_address->postal_code)) $form_exception->addError(_("Postal code is required."));
-		else if(empty($user_address->country)) $form_exception->addError(_("Country is required."));
+		if(empty($user_address->name)) $form_exception->addError(__("Name is required."));
+		if(empty($user_address->postal_code)) $form_exception->addError(__("Postal code is required."));
+		else if(empty($user_address->country)) $form_exception->addError(__("Country is required."));
 		else {
 		else {
 			// Geocode the postal code and country
 			// Geocode the postal code and country
 			try {
 			try {
@@ -43,7 +43,7 @@ if($submit) {
 				$user_address->longitude = $result->geometry->location->lng;
 				$user_address->longitude = $result->geometry->location->lng;
 			}
 			}
 			catch(Exception $e) {
 			catch(Exception $e) {
-				$form_exception->addError(_("Failed to get location from postal code."));
+				$form_exception->addError(__("Failed to get location from postal code."));
 			}
 			}
 		}
 		}
 
 
@@ -51,7 +51,7 @@ if($submit) {
 
 
 		$success = $user_address->commit();
 		$success = $user_address->commit();
 
 
-		Core::addAlert("success", _("Address added successfully."));
+		Core::addAlert("success", __("Address added successfully."));
 		HTTP::redirect("/account/addresses");
 		HTTP::redirect("/account/addresses");
 	}
 	}
 	catch(FormException $e) {
 	catch(FormException $e) {

+ 14 - 14
controllers/address_edit.php

@@ -1,9 +1,9 @@
 <?php
 <?php
 
 
-$page_title = _("Edit Address");
+$page_title = __("Edit Address");
 
 
 $user_address = UserAddress::get($id);
 $user_address = UserAddress::get($id);
-if(!$user_address) throw new Exception(_("Address not found."));
+if(!$user_address) throw new Exception(__("Address not found."));
 
 
 $submit = http::value("submit");
 $submit = http::value("submit");
 if($submit) {
 if($submit) {
@@ -24,22 +24,22 @@ if($submit) {
 		$user_address->latitude = http::value("latitude", "float");
 		$user_address->latitude = http::value("latitude", "float");
 		$user_address->longitude = http::value("longitude", "float");
 		$user_address->longitude = http::value("longitude", "float");
 
 
-		if(empty($user_address->name)) $form_exception->addError(_("Name is required."));
-		if(empty($user_address->address_1)) $form_exception->addError(_("Address line 1 is required."));
-		if(empty($user_address->city)) $form_exception->addError(_("City is required."));
-		if(empty($user_address->postal_code)) $form_exception->addError(_("Postal code is required."));
-		if(empty($user_address->country)) $form_exception->addError(_("Country is required."));
-		if(empty($user_address->max_radius_miles)) $form_exception->addError(_("Max distance is required."));
-		if(!in_array($user_address->max_radius_miles, UserAddress::RADIUSES)) $form_exception->addError(_("Max distance is invalid."));
+		if(empty($user_address->name)) $form_exception->addError(__("Name is required."));
+		if(empty($user_address->address_1)) $form_exception->addError(__("Address line 1 is required."));
+		if(empty($user_address->city)) $form_exception->addError(__("City is required."));
+		if(empty($user_address->postal_code)) $form_exception->addError(__("Postal code is required."));
+		if(empty($user_address->country)) $form_exception->addError(__("Country is required."));
+		if(empty($user_address->max_radius_miles)) $form_exception->addError(__("Max distance is required."));
+		if(!in_array($user_address->max_radius_miles, UserAddress::RADIUSES)) $form_exception->addError(__("Max distance is invalid."));
 
 
-		if(empty($user_address->latitude)) $form_exception->addError(_("Map location is required."));
-		else if(empty($user_address->longitude)) $form_exception->addError(_("Map location is required."));
+		if(empty($user_address->latitude)) $form_exception->addError(__("Map location is required."));
+		else if(empty($user_address->longitude)) $form_exception->addError(__("Map location is required."));
 
 
 		if($form_exception->hasErrors()) throw $form_exception;
 		if($form_exception->hasErrors()) throw $form_exception;
 
 
 		$success = $user_address->commit();
 		$success = $user_address->commit();
 
 
-		Core::addAlert("success", _("Address updated successfully."));
+		Core::addAlert("success", __("Address updated successfully."));
 		HTTP::redirect("/account/addresses");
 		HTTP::redirect("/account/addresses");
 	}
 	}
 	catch(FormException $e) {
 	catch(FormException $e) {
@@ -51,8 +51,8 @@ if($submit) {
 }
 }
 
 
 
 
-Core::addBreadcrumb("/account", _("Account"));
-Core::addBreadcrumb("/account/addresses", _("Addresses"));
+Core::addBreadcrumb("/account", __("Account"));
+Core::addBreadcrumb("/account/addresses", __("Addresses"));
 Core::addBreadcrumb("/account/addresses/edit/$id", $page_title);
 Core::addBreadcrumb("/account/addresses/edit/$id", $page_title);
 
 
 View::includeOnce("header", compact("page_title"));
 View::includeOnce("header", compact("page_title"));

+ 4 - 4
controllers/addresses.php

@@ -1,8 +1,8 @@
 <?php
 <?php
 
 
-$page_title = _("Addresses");
+$page_title = __("Addresses");
 
 
-Core::addBreadcrumb("/account", _("Account"));
+Core::addBreadcrumb("/account", __("Account"));
 Core::addBreadcrumb("/account/addresses", $page_title);
 Core::addBreadcrumb("/account/addresses", $page_title);
 
 
 $submit = http::value("submit");
 $submit = http::value("submit");
@@ -27,12 +27,12 @@ if($submit) {
 			"user_id" => Core::$user->id,
 			"user_id" => Core::$user->id,
 		]);
 		]);
 
 
-		if(!$address) throw new Exception(_("Address not found."));
+		if(!$address) throw new Exception(__("Address not found."));
 
 
 		$address->invoice = 1;
 		$address->invoice = 1;
 		$success = $address->commit();
 		$success = $address->commit();
 
 
-		Core::addAlert("success", _("Address set as invoice address successfully."));
+		Core::addAlert("success", __("Address set as invoice address successfully."));
 		HTTP::redirect("/account/addresses");
 		HTTP::redirect("/account/addresses");
 	}
 	}
 	catch(Exception $e) {
 	catch(Exception $e) {

+ 1 - 1
controllers/become_a_tester.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-$page_title = _("Become a Tester");
+$page_title = __("Become a Tester");
 
 
 Core::addBreadcrumb("/become-a-tester", $page_title);
 Core::addBreadcrumb("/become-a-tester", $page_title);
 
 

+ 7 - 7
controllers/contact.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-$page_title = _("Contact");
+$page_title = __("Contact");
 
 
 Core::addBreadcrumb("/contact", $page_title);
 Core::addBreadcrumb("/contact", $page_title);
 
 
@@ -16,11 +16,11 @@ if($submit) {
 
 
 		$form_exception = new FormException;
 		$form_exception = new FormException;
 
 
-		if(!Form::checkRecaptcha()) $form_exception->addError(_("reCAPTCHA check failed."));
-		if(empty($name)) $form_exception->addError(_("Name is required."));
-		if(empty($email)) $form_exception->addError(_("Email address is invalid."));
-		if(empty($phone)) $form_exception->addError(_("Contact number is required."));
-		if(empty($message)) $form_exception->addError(_("Message is required."));
+		if(!Form::checkRecaptcha()) $form_exception->addError(__("reCAPTCHA check failed."));
+		if(empty($name)) $form_exception->addError(__("Name is required."));
+		if(empty($email)) $form_exception->addError(__("Email address is invalid."));
+		if(empty($phone)) $form_exception->addError(__("Contact number is required."));
+		if(empty($message)) $form_exception->addError(__("Message is required."));
 
 
 		if($form_exception->hasErrors()) throw $form_exception;
 		if($form_exception->hasErrors()) throw $form_exception;
 
 
@@ -50,7 +50,7 @@ if($submit) {
 
 
 		$mail->send();
 		$mail->send();
 
 
-		Core::addAlert("success", _("Message sent successfully. We will get back to you shortly."));
+		Core::addAlert("success", __("Message sent successfully. We will get back to you shortly."));
 		HTTP::redirect("/contact");
 		HTTP::redirect("/contact");
 	}
 	}
 	catch(FormException $e) {
 	catch(FormException $e) {

+ 1 - 1
controllers/home.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-$page_title = _("Home");
+$page_title = __("Home");
 
 
 Core::$show_alerts = false;
 Core::$show_alerts = false;
 
 

+ 1 - 1
controllers/jobs.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-$page_title = _("Jobs");
+$page_title = __("Jobs");
 
 
 Core::addBreadcrumb("/jobs", $page_title);
 Core::addBreadcrumb("/jobs", $page_title);
 
 

+ 7 - 7
controllers/log_in.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-$page_title = _("Log In");
+$page_title = __("Log In");
 
 
 Core::addBreadcrumb("/log-in", $page_title);
 Core::addBreadcrumb("/log-in", $page_title);
 
 
@@ -14,25 +14,25 @@ if($submit) {
 		$email = http::value("email", "email");
 		$email = http::value("email", "email");
 		$password = http::value("password");
 		$password = http::value("password");
 
 
-		if(empty($email)) throw new Exception(_("Email address is invalid."));
-		if(empty($password)) throw new Exception(_("Password must be given."));
+		if(empty($email)) throw new Exception(__("Email address is invalid."));
+		if(empty($password)) throw new Exception(__("Password must be given."));
 
 
 		$user = User::queryOne([
 		$user = User::queryOne([
 			"email" => db::escape($email)
 			"email" => db::escape($email)
 		]);
 		]);
 
 
-		if(!$user) throw new Exception(_("Account not found."));
-		if(!password_verify($password, $user->password)) throw new Exception(_("Password is incorrect."));
+		if(!$user) throw new Exception(__("Account not found."));
+		if(!password_verify($password, $user->password)) throw new Exception(__("Password is incorrect."));
 		if(!$user->activated) {
 		if(!$user->activated) {
 			$user->sendActivationEmail();
 			$user->sendActivationEmail();
-			throw new Exception(_("Your email address is not verified. An activation email has been sent to your email address."));
+			throw new Exception(__("Your email address is not verified. An activation email has been sent to your email address."));
 		}
 		}
 
 
 		$_SESSION["user_id"] = $user->id;
 		$_SESSION["user_id"] = $user->id;
 
 
 		$redirect = $_SESSION["log_in_redirect_uri"] ?? "/account";
 		$redirect = $_SESSION["log_in_redirect_uri"] ?? "/account";
 
 
-		Core::addAlert("success", _("Log in successful."));
+		Core::addAlert("success", __("Log in successful."));
 		HTTP::redirect($redirect);
 		HTTP::redirect($redirect);
 
 
 	}
 	}

+ 1 - 1
controllers/log_out.php

@@ -2,7 +2,7 @@
 
 
 unset($_SESSION["user_id"]);
 unset($_SESSION["user_id"]);
 
 
-Core::addAlert("success", _("Log out successful."));
+Core::addAlert("success", __("Log out successful."));
 
 
 HTTP::redirect("/log-in");
 HTTP::redirect("/log-in");
 
 

+ 13 - 13
controllers/practice.php

@@ -3,14 +3,14 @@
 Core::addScript("public/js/app-practice-test.js");
 Core::addScript("public/js/app-practice-test.js");
 
 
 $template = Template::get($id);
 $template = Template::get($id);
-if(!$template) throw new Exception(_("Practice form not found."));
-if(!$template->practice) throw new Exception(_("This practice form is no longer available."));
+if(!$template) throw new Exception(__("Practice form not found."));
+if(!$template->practice) throw new Exception(__("This practice form is no longer available."));
 
 
-$page_title = _("Practice");
+$page_title = __("Practice");
 
 
-Core::addBreadcrumb("/account", _("Account"));
+Core::addBreadcrumb("/account", __("Account"));
 Core::addBreadcrumb("/account/practice", $page_title);
 Core::addBreadcrumb("/account/practice", $page_title);
-Core::addBreadcrumb("/account/practice/$id", _("Form"));
+Core::addBreadcrumb("/account/practice/$id", __("Form"));
 
 
 $json = json_decode($template->getJSON());
 $json = json_decode($template->getJSON());
 
 
@@ -69,14 +69,14 @@ if($submit) {
 					$start_unix = strtotime($start_override);
 					$start_unix = strtotime($start_override);
 					$end_unix = strtotime($end_override);
 					$end_unix = strtotime($end_override);
 
 
-					if($start_unix > $end_unix) $form_exception->addError(_("Entry Time must not be after Exit Time."));
+					if($start_unix > $end_unix) $form_exception->addError(__("Entry Time must not be after Exit Time."));
 					if(!$start_unix && $end_unix && $test->dts_start) {
 					if(!$start_unix && $end_unix && $test->dts_start) {
 						$recorded_start_unix = Util::getUnixTimeFromUTC($test->dts_start);
 						$recorded_start_unix = Util::getUnixTimeFromUTC($test->dts_start);
-						if($end_unix < $recorded_start_unix) $form_exception->addError(_("Exit Time cannot be later than the recorded Entry Time."));
+						if($end_unix < $recorded_start_unix) $form_exception->addError(__("Exit Time cannot be later than the recorded Entry Time."));
 					}
 					}
 				}
 				}
 				else {
 				else {
-					$form_exception->addError(_("Entry Time and Exit Time must be filled in."));
+					$form_exception->addError(__("Entry Time and Exit Time must be filled in."));
 				}
 				}
 
 
 			}
 			}
@@ -98,7 +98,7 @@ if($submit) {
 				try {
 				try {
 					if(!$required && $file->error == UPLOAD_ERR_NO_FILE) continue;
 					if(!$required && $file->error == UPLOAD_ERR_NO_FILE) continue;
 					if($required && $file->error == UPLOAD_ERR_NO_FILE) {
 					if($required && $file->error == UPLOAD_ERR_NO_FILE) {
-						throw new Exception(sprintf(_("%s is required."), $label));
+						throw new Exception(sprintf(__("%s is required."), $label));
 					}
 					}
 
 
 					// Detect upload error
 					// Detect upload error
@@ -106,9 +106,9 @@ if($submit) {
 
 
 					// Get image details
 					// Get image details
 					$size = @getimagesize($file->tmp_name);
 					$size = @getimagesize($file->tmp_name);
-					if(!$size) throw new Exception(sprintf(_("The uploaded file for %s is not an image.")), $label);
+					if(!$size) throw new Exception(sprintf(__("The uploaded file for %s is not an image.")), $label);
 					list($width, $height, $type) = $size;
 					list($width, $height, $type) = $size;
-					if($type != IMAGETYPE_JPEG) throw new Exception(sprintf(_("The uploaded file for %s is not a JPEG."), $label));
+					if($type != IMAGETYPE_JPEG) throw new Exception(sprintf(__("The uploaded file for %s is not a JPEG."), $label));
 
 
 					// Resize image
 					// Resize image
 					$output_image = Image::normalise($file->tmp_name);
 					$output_image = Image::normalise($file->tmp_name);
@@ -126,8 +126,8 @@ if($submit) {
 			else {
 			else {
 				$value = http::value($name, "trim");
 				$value = http::value($name, "trim");
 
 
-				if($required && empty($value)) $form_exception->addError(sprintf(_("%s is required."), $label));
-				if($values && !in_array($value, $values)) $form_exception->addError(sprintf(_("Value for %s is invalid."), $label));
+				if($required && empty($value)) $form_exception->addError(sprintf(__("%s is required."), $label));
+				if($values && !in_array($value, $values)) $form_exception->addError(sprintf(__("Value for %s is invalid."), $label));
 
 
 				if(in_array($name, Test::TEST_FIELDS)) {
 				if(in_array($name, Test::TEST_FIELDS)) {
 					$test->$name = $value;
 					$test->$name = $value;

+ 3 - 3
controllers/practice_file.php

@@ -1,15 +1,15 @@
 <?php
 <?php
 
 
 $template = Template::get($id);
 $template = Template::get($id);
-if(!$template) throw new Exception(_("Practice form not found."));
+if(!$template) throw new Exception(__("Practice form not found."));
 
 
 $tests = $_SESSION["practice_tests"];
 $tests = $_SESSION["practice_tests"];
 $test = $tests[$id] ?? false;
 $test = $tests[$id] ?? false;
-if(!$test) throw new Exception(_("Practice test not found."));
+if(!$test) throw new Exception(__("Practice test not found."));
 
 
 
 
 if(Core::$user->level < User::LEVEL_ADMIN) {
 if(Core::$user->level < User::LEVEL_ADMIN) {
-	if(Core::$user->id != $test->tester_id) throw new Exception(_("You do not have permission to access this resource."));
+	if(Core::$user->id != $test->tester_id) throw new Exception(__("You do not have permission to access this resource."));
 }
 }
 
 
 $directory = $test->getDirectory();
 $directory = $test->getDirectory();

+ 2 - 2
controllers/practice_template_select.php

@@ -1,8 +1,8 @@
 <?php
 <?php
 
 
-$page_title = _("Select Practice Form");
+$page_title = __("Select Practice Form");
 
 
-Core::addBreadcrumb("/account", _("Account"));
+Core::addBreadcrumb("/account", __("Account"));
 Core::addBreadcrumb("/account/practice", $page_title);
 Core::addBreadcrumb("/account/practice", $page_title);
 
 
 $templates = Template::query([
 $templates = Template::query([

+ 1 - 1
controllers/privacy_policy.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-$page_title = _("Privacy Policy");
+$page_title = __("Privacy Policy");
 
 
 Core::addBreadcrumb("/privacy-policy", $page_title);
 Core::addBreadcrumb("/privacy-policy", $page_title);
 
 

+ 3 - 3
controllers/project_invoice.php

@@ -3,9 +3,9 @@
 use \Mpdf\Mpdf;
 use \Mpdf\Mpdf;
 
 
 $project = Project::get($id);
 $project = Project::get($id);
-if(!$project) throw new Exception(_("Project not found."));
-if(!$project->dts_finished) throw new Exception(_("An invoice cannot be generated for this project as it has not been marked as finished."));
-if(!Core::$user->canAdmin()) throw new Exception(_("You do not have permission to access this resource."));
+if(!$project) throw new Exception(__("Project not found."));
+if(!$project->dts_finished) throw new Exception(__("An invoice cannot be generated for this project as it has not been marked as finished."));
+if(!Core::$user->canAdmin()) throw new Exception(__("You do not have permission to access this resource."));
 
 
 $customer = $project->getCustomer();
 $customer = $project->getCustomer();
 $template = $project->getTemplate();
 $template = $project->getTemplate();

+ 18 - 18
controllers/register.php

@@ -2,13 +2,13 @@
 
 
 if(Core::$user) HTTP::redirect("/account");
 if(Core::$user) HTTP::redirect("/account");
 
 
-$page_title = _("Register");
+$page_title = __("Register");
 
 
 Core::addBreadcrumb("/register", $page_title);
 Core::addBreadcrumb("/register", $page_title);
 
 
 $user = new User;
 $user = new User;
 $user_address = new UserAddress();
 $user_address = new UserAddress();
-$user_address->name = _("Current Residence");
+$user_address->name = __("Current Residence");
 $user_address->country = DEFAULT_COUNTRY;
 $user_address->country = DEFAULT_COUNTRY;
 
 
 try {
 try {
@@ -22,7 +22,7 @@ try {
 		$password = http::value("password");
 		$password = http::value("password");
 		$password_confirm = http::value("password_confirm");
 		$password_confirm = http::value("password_confirm");
 
 
-		if($password != $password_confirm) $form_exception->addError(_("Passwords do not match."));
+		if($password != $password_confirm) $form_exception->addError(__("Passwords do not match."));
 
 
 		$user->email = http::value("email", "email");
 		$user->email = http::value("email", "email");
 		$user->password = password_hash($password, PASSWORD_DEFAULT, ["cost" => 14]);
 		$user->password = password_hash($password, PASSWORD_DEFAULT, ["cost" => 14]);
@@ -44,21 +44,21 @@ try {
 		$referrer = User::get($referrer_id);
 		$referrer = User::get($referrer_id);
 		if($referrer) $user->referrer_id = $referrer_id;
 		if($referrer) $user->referrer_id = $referrer_id;
 
 
-		if(!Form::checkRecaptcha()) $form_exception->addError(_("reCAPTCHA check failed."));
-		if(!User::validatePassword($password)) $form_exception->addError(_("Password must be at least 6 characters in length and contain at least one lowercase, uppercase, number and special character."));
-		if(empty($user->email)) $form_exception->addError(_("Email address is invalid."));
-		if(empty($user->title)) $form_exception->addError(_("Title is required."));
-		if(empty($user->first_name)) $form_exception->addError(_("First name is required."));
-		if(empty($user->last_name)) $form_exception->addError(_("Last name is required."));
-		if(empty($user->date_of_birth)) $form_exception->addError(_("Date of birth is required."));
-		if(empty($user->phone)) $form_exception->addError(_("Mobile number is required."));
-		if(empty($user->terms_accepted)) $form_exception->addError(_("Acceptance of Terms and Conditions is required."));
+		if(!Form::checkRecaptcha()) $form_exception->addError(__("reCAPTCHA check failed."));
+		if(!User::validatePassword($password)) $form_exception->addError(__("Password must be at least 6 characters in length and contain at least one lowercase, uppercase, number and special character."));
+		if(empty($user->email)) $form_exception->addError(__("Email address is invalid."));
+		if(empty($user->title)) $form_exception->addError(__("Title is required."));
+		if(empty($user->first_name)) $form_exception->addError(__("First name is required."));
+		if(empty($user->last_name)) $form_exception->addError(__("Last name is required."));
+		if(empty($user->date_of_birth)) $form_exception->addError(__("Date of birth is required."));
+		if(empty($user->phone)) $form_exception->addError(__("Mobile number is required."));
+		if(empty($user->terms_accepted)) $form_exception->addError(__("Acceptance of Terms and Conditions is required."));
 
 
-		if(empty($user_address->postal_code)) $form_exception->addError(_("Postal code is required."));
-		if(empty($user_address->country)) $form_exception->addError(_("Country is required."));
+		if(empty($user_address->postal_code)) $form_exception->addError(__("Postal code is required."));
+		if(empty($user_address->country)) $form_exception->addError(__("Country is required."));
 
 
 		$email_exists = User::query(["email" => $user->email]);
 		$email_exists = User::query(["email" => $user->email]);
-		if($email_exists) $form_exception->addError(_("Email address is already registered."));
+		if($email_exists) $form_exception->addError(__("Email address is already registered."));
 
 
 		// Geocode the postal code
 		// Geocode the postal code
 		try {
 		try {
@@ -79,7 +79,7 @@ try {
 			$user_address->longitude = $result->geometry->location->lng;
 			$user_address->longitude = $result->geometry->location->lng;
 		}
 		}
 		catch(Exception $e) {
 		catch(Exception $e) {
-			$form_exception->addError(_("Failed to get location from postal code and country."));
+			$form_exception->addError(__("Failed to get location from postal code and country."));
 		}
 		}
 
 
 		if($form_exception->hasErrors()) {
 		if($form_exception->hasErrors()) {
@@ -88,14 +88,14 @@ try {
 
 
 		// OK
 		// OK
 		$success = $user->commit();
 		$success = $user->commit();
-		if(!$success) throw new Exception(_("Registration failed. Please try again later."));
+		if(!$success) throw new Exception(__("Registration failed. Please try again later."));
 
 
 		$user_address->user_id = $user->id;
 		$user_address->user_id = $user->id;
 		$success = $user_address->commit();
 		$success = $user_address->commit();
 
 
 		$user->sendActivationEmail();
 		$user->sendActivationEmail();
 
 
-		Core::addAlert("success", _("Registration successful. An email has been sent to verify your email address. Please follow the instructions in the email before logging in."));
+		Core::addAlert("success", __("Registration successful. An email has been sent to verify your email address. Please follow the instructions in the email before logging in."));
 		HTTP::redirect("/log-in");
 		HTTP::redirect("/log-in");
 	}
 	}
 }
 }

+ 8 - 8
controllers/reset_password.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-$page_title = _("Reset Password");
+$page_title = __("Reset Password");
 
 
 Core::addBreadcrumb("/reset-password", $page_title);
 Core::addBreadcrumb("/reset-password", $page_title);
 
 
@@ -11,7 +11,7 @@ if($token) {
 		"reset_token" => $token
 		"reset_token" => $token
 	]);
 	]);
 
 
-	if(!$user) throw new Exception(_("Invalid reset token."));
+	if(!$user) throw new Exception(__("Invalid reset token."));
 
 
 	$submit = http::value("submit");
 	$submit = http::value("submit");
 	if($submit) {
 	if($submit) {
@@ -23,8 +23,8 @@ if($token) {
 			$password = http::value("password");
 			$password = http::value("password");
 			$password_confirm = http::value("password_confirm");
 			$password_confirm = http::value("password_confirm");
 
 
-			if($password != $password_confirm) $form_exception->addError(_("Passwords do not match."));
-			if(!User::validatePassword($password)) $form_exception->addError(_("Password must be at least 6 characters in length and contain at least one lowercase, uppercase, number and special character."));
+			if($password != $password_confirm) $form_exception->addError(__("Passwords do not match."));
+			if(!User::validatePassword($password)) $form_exception->addError(__("Password must be at least 6 characters in length and contain at least one lowercase, uppercase, number and special character."));
 
 
 			if($form_exception->hasErrors()) throw $form_exception;
 			if($form_exception->hasErrors()) throw $form_exception;
 
 
@@ -32,7 +32,7 @@ if($token) {
 
 
 			$success = $user->commit();
 			$success = $user->commit();
 
 
-			Core::addAlert("success", _("Password reset successfully. You can now log in."));
+			Core::addAlert("success", __("Password reset successfully. You can now log in."));
 			HTTP::redirect("/log-in");
 			HTTP::redirect("/log-in");
 		}
 		}
 		catch(FormException $e) {
 		catch(FormException $e) {
@@ -53,8 +53,8 @@ else {
 			$form_exception = new FormException;
 			$form_exception = new FormException;
 
 
 			$email = http::value("email", "email");
 			$email = http::value("email", "email");
-			if(!Form::checkRecaptcha()) $form_exception->addError(_("reCAPTCHA check failed."));
-			if(empty($email)) $form_exception->addError(_("Invalid email address."));
+			if(!Form::checkRecaptcha()) $form_exception->addError(__("reCAPTCHA check failed."));
+			if(empty($email)) $form_exception->addError(__("Invalid email address."));
 			if($form_exception->hasErrors()) throw $form_exception;
 			if($form_exception->hasErrors()) throw $form_exception;
 
 
 			$user = User::queryOne(["email" => db::escape($email)]);
 			$user = User::queryOne(["email" => db::escape($email)]);
@@ -65,7 +65,7 @@ else {
 				sleep(2);
 				sleep(2);
 			}
 			}
 
 
-			Core::addAlert("success", _("A password reset email has been sent to the address provided if an account exists. Follow the instructions in the email to reset your password."));
+			Core::addAlert("success", __("A password reset email has been sent to the address provided if an account exists. Follow the instructions in the email to reset your password."));
 			HTTP::redirect("/log-in");
 			HTTP::redirect("/log-in");
 		}
 		}
 		catch(FormException $e) {
 		catch(FormException $e) {

+ 1 - 1
controllers/services.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-$page_title = _("Services");
+$page_title = __("Services");
 
 
 Core::addBreadcrumb("/services", $page_title);
 Core::addBreadcrumb("/services", $page_title);
 
 

+ 13 - 13
controllers/settings.php

@@ -1,8 +1,8 @@
 <?php
 <?php
 
 
-$page_title = _("Settings");
+$page_title = __("Settings");
 
 
-Core::addBreadcrumb("/account", _("Account"));
+Core::addBreadcrumb("/account", __("Account"));
 Core::addBreadcrumb("/account/settings", $page_title);
 Core::addBreadcrumb("/account/settings", $page_title);
 
 
 $user = Core::$user;
 $user = Core::$user;
@@ -18,7 +18,7 @@ if($submit) {
 		$password = http::value("password");
 		$password = http::value("password");
 		$password_confirm = http::value("password_confirm");
 		$password_confirm = http::value("password_confirm");
 
 
-		if($password != $password_confirm) $form_exception->addError(_("Passwords do not match."));
+		if($password != $password_confirm) $form_exception->addError(__("Passwords do not match."));
 		if($password) {
 		if($password) {
 			$user->password = password_hash($password, PASSWORD_DEFAULT, ["cost" => 14]);
 			$user->password = password_hash($password, PASSWORD_DEFAULT, ["cost" => 14]);
 		}
 		}
@@ -40,15 +40,15 @@ if($submit) {
 
 
 		$locales = Core::locales();
 		$locales = Core::locales();
 
 
-		if($password && !User::validatePassword($password)) $form_exception->addError(_("Password must be at least 6 characters in length and contain at least one lowercase, uppercase, number and special character."));
-		if(empty($user->email)) $form_exception->addError(_("Email address is invalid."));
-		if(empty($user->title)) $form_exception->addError(_("Title is required."));
-		if(empty($user->first_name)) $form_exception->addError(_("First name is required."));
-		if(empty($user->last_name)) $form_exception->addError(_("Last name is required."));
-		if(empty($user->date_of_birth)) $form_exception->addError(_("Date of birth is required."));
-		if(empty($user->phone)) $form_exception->addError(_("Mobile number is required."));
-		if(!isset(User::PAYMENT_METHODS[$user->preferred_payment_method])) $form_exception->addError(_("Invalid payment method selected."));
-		if(!isset($locales[$user->locale])) $form_exception->addError(_("Invalid language selected."));
+		if($password && !User::validatePassword($password)) $form_exception->addError(__("Password must be at least 6 characters in length and contain at least one lowercase, uppercase, number and special character."));
+		if(empty($user->email)) $form_exception->addError(__("Email address is invalid."));
+		if(empty($user->title)) $form_exception->addError(__("Title is required."));
+		if(empty($user->first_name)) $form_exception->addError(__("First name is required."));
+		if(empty($user->last_name)) $form_exception->addError(__("Last name is required."));
+		if(empty($user->date_of_birth)) $form_exception->addError(__("Date of birth is required."));
+		if(empty($user->phone)) $form_exception->addError(__("Mobile number is required."));
+		if(!isset(User::PAYMENT_METHODS[$user->preferred_payment_method])) $form_exception->addError(__("Invalid payment method selected."));
+		if(!isset($locales[$user->locale])) $form_exception->addError(__("Invalid language selected."));
 
 
 		// Activation
 		// Activation
 		$deactivate = http::value("deactivate");
 		$deactivate = http::value("deactivate");
@@ -65,7 +65,7 @@ if($submit) {
 
 
 		$success = $user->commit();
 		$success = $user->commit();
 
 
-		Core::addAlert("success", _("Settings saved successfully."));
+		Core::addAlert("success", __("Settings saved successfully."));
 		HTTP::redirect("/account/settings");
 		HTTP::redirect("/account/settings");
 	}
 	}
 	catch(FormException $e) {
 	catch(FormException $e) {

+ 8 - 8
controllers/submit_id.php

@@ -1,8 +1,8 @@
 <?php
 <?php
 
 
-$page_title = _("Submit ID");
+$page_title = __("Submit ID");
 
 
-Core::addBreadcrumb("/account", _("Account"));
+Core::addBreadcrumb("/account", __("Account"));
 Core::addBreadcrumb("/account/submit-id", $page_title);
 Core::addBreadcrumb("/account/submit-id", $page_title);
 
 
 $submit = http::value("submit");
 $submit = http::value("submit");
@@ -22,14 +22,14 @@ if($submit) {
 		if($photo->error != UPLOAD_ERR_OK) $form_exception->addError(HTTP::getUploadErrorString($photo->error));
 		if($photo->error != UPLOAD_ERR_OK) $form_exception->addError(HTTP::getUploadErrorString($photo->error));
 
 
 		$size = @getimagesize($id_document->tmp_name);
 		$size = @getimagesize($id_document->tmp_name);
-		if(!$size) $form_exception->addError(_("The uploaded ID document is not an image."));
+		if(!$size) $form_exception->addError(__("The uploaded ID document is not an image."));
 		list($width, $height, $type) = $size;
 		list($width, $height, $type) = $size;
-		if($type != IMAGETYPE_JPEG) $form_exception->addError(_("The uploaded ID document is not a JPEG."));
+		if($type != IMAGETYPE_JPEG) $form_exception->addError(__("The uploaded ID document is not a JPEG."));
 
 
 		$size = @getimagesize($photo->tmp_name);
 		$size = @getimagesize($photo->tmp_name);
-		if(!$size) $form_exception->addError(_("The uploaded photo is not an image."));
+		if(!$size) $form_exception->addError(__("The uploaded photo is not an image."));
 		list($width, $height, $type) = $size;
 		list($width, $height, $type) = $size;
-		if($type != IMAGETYPE_JPEG) $form_exception->addError(_("The uploaded photo is not a JPEG."));
+		if($type != IMAGETYPE_JPEG) $form_exception->addError(__("The uploaded photo is not a JPEG."));
 
 
 		if($form_exception->hasErrors()) throw $form_exception;
 		if($form_exception->hasErrors()) throw $form_exception;
 
 
@@ -53,7 +53,7 @@ if($submit) {
 			$user_file->dts_uploaded = Util::getDateTime();
 			$user_file->dts_uploaded = Util::getDateTime();
 
 
 			$success = $user_file->commit();
 			$success = $user_file->commit();
-			if(!$success) throw new Exception(sprintf(_("Failed to save the %s. Please try again later."), $name));
+			if(!$success) throw new Exception(sprintf(__("Failed to save the %s. Please try again later."), $name));
 
 
 			$output_path = $user->getDirectory() . "/" . $user_file->id . ".jpg";
 			$output_path = $user->getDirectory() . "/" . $user_file->id . ".jpg";
 
 
@@ -67,7 +67,7 @@ if($submit) {
 
 
 		// TODO: Send out pending verification email
 		// TODO: Send out pending verification email
 
 
-		Core::addAlert("success", _("ID submitted successfully."));
+		Core::addAlert("success", __("ID submitted successfully."));
 		HTTP::redirect("/account");
 		HTTP::redirect("/account");
 	}
 	}
 	catch(FormException $e) {
 	catch(FormException $e) {

+ 2 - 2
controllers/terms_accept.php

@@ -3,9 +3,9 @@
 $user = Core::$user;
 $user = Core::$user;
 $user->terms_accepted = 1;
 $user->terms_accepted = 1;
 $success = $user->commit();
 $success = $user->commit();
-if(!$success) throw new Exception(_("Failed to update our records. Please try again later."));
+if(!$success) throw new Exception(__("Failed to update our records. Please try again later."));
 
 
-Core::addAlert("success", _("Terms & Conditions accepted successfully."));
+Core::addAlert("success", __("Terms & Conditions accepted successfully."));
 
 
 HTTP::redirect("/account");
 HTTP::redirect("/account");
 
 

+ 1 - 1
controllers/terms_and_conditions.php

@@ -1,6 +1,6 @@
 <?php
 <?php
 
 
-$page_title = _("Terms & Conditions");
+$page_title = __("Terms & Conditions");
 
 
 Core::addBreadcrumb("/terms-and-conditions", $page_title);
 Core::addBreadcrumb("/terms-and-conditions", $page_title);
 
 

+ 3 - 3
controllers/terms_decline.php

@@ -1,14 +1,14 @@
 <?php
 <?php
 
 
-$page_title = _("Decline Terms & Conditions");
+$page_title = __("Decline Terms & Conditions");
 
 
-Core::addBreadcrumb("/account", _("Account"));
+Core::addBreadcrumb("/account", __("Account"));
 Core::addBreadcrumb("/account/decline-terms", $page_title);
 Core::addBreadcrumb("/account/decline-terms", $page_title);
 
 
 $user = Core::$user;
 $user = Core::$user;
 $user->terms_accepted = 0;
 $user->terms_accepted = 0;
 $success = $user->commit();
 $success = $user->commit();
-if(!$success) throw new Exception(_("Failed to update our records. Please try again later."));
+if(!$success) throw new Exception(__("Failed to update our records. Please try again later."));
 
 
 View::includeOnce("header", compact("page_title"));
 View::includeOnce("header", compact("page_title"));
 View::include("terms_decline");
 View::include("terms_decline");

+ 15 - 15
controllers/test.php

@@ -3,7 +3,7 @@
 Core::addScript("public/js/app-test.js");
 Core::addScript("public/js/app-test.js");
 
 
 $test = Test::get($id);
 $test = Test::get($id);
-if(!$test) throw new Exception(_("Test cannot be found."));
+if(!$test) throw new Exception(__("Test cannot be found."));
 
 
 $is_confirmed = $test->status == Test::STATUS_CONFIRMED;
 $is_confirmed = $test->status == Test::STATUS_CONFIRMED;
 $is_started = $test->status == Test::STATUS_STARTED;
 $is_started = $test->status == Test::STATUS_STARTED;
@@ -31,8 +31,8 @@ if(Core::$user->level == User::LEVEL_TESTER) {
 
 
 	Core::$show_footer_content = false;
 	Core::$show_footer_content = false;
 
 
-	if(Core::$user->id != $test->tester_id) throw new Exception(_("You do not have permission to view this page."));
-	if($test->status == Test::STATUS_ASSIGNED) throw new Exception(_("You do not have permission to view this page as you have not accepted the test yet."));
+	if(Core::$user->id != $test->tester_id) throw new Exception(__("You do not have permission to view this page."));
+	if($test->status == Test::STATUS_ASSIGNED) throw new Exception(__("You do not have permission to view this page as you have not accepted the test yet."));
 
 
 	// Show completed message
 	// Show completed message
 	if($test->status > Test::STATUS_PENDING_VERIFICATION) {
 	if($test->status > Test::STATUS_PENDING_VERIFICATION) {
@@ -76,14 +76,14 @@ if(Core::$user->level == User::LEVEL_TESTER) {
 						$start_unix = strtotime($start_override);
 						$start_unix = strtotime($start_override);
 						$end_unix = strtotime($end_override);
 						$end_unix = strtotime($end_override);
 
 
-						if($start_unix > $end_unix) $form_exception->addError(_("Entry Time must not be after Exit Time."));
+						if($start_unix > $end_unix) $form_exception->addError(__("Entry Time must not be after Exit Time."));
 						if(!$start_unix && $end_unix && $test->dts_start) {
 						if(!$start_unix && $end_unix && $test->dts_start) {
 							$recorded_start_unix = Util::getUnixTimeFromUTC($test->dts_start);
 							$recorded_start_unix = Util::getUnixTimeFromUTC($test->dts_start);
-							if($end_unix < $recorded_start_unix) $form_exception->addError(_("Exit Time cannot be later than the recorded Entry Time."));
+							if($end_unix < $recorded_start_unix) $form_exception->addError(__("Exit Time cannot be later than the recorded Entry Time."));
 						}
 						}
 					}
 					}
 					else {
 					else {
-						$form_exception->addError(_("Entry Time and Exit Time must be filled in."));
+						$form_exception->addError(__("Entry Time and Exit Time must be filled in."));
 					}
 					}
 
 
 				}
 				}
@@ -114,9 +114,9 @@ if(Core::$user->level == User::LEVEL_TESTER) {
 
 
 						// Get image details
 						// Get image details
 						$size = @getimagesize($file->tmp_name);
 						$size = @getimagesize($file->tmp_name);
-						if(!$size) throw new Exception(sprintf(_("The uploaded file for %s is not an image."), $label));
+						if(!$size) throw new Exception(sprintf(__("The uploaded file for %s is not an image."), $label));
 						list($width, $height, $type) = $size;
 						list($width, $height, $type) = $size;
-						if($type != IMAGETYPE_JPEG) throw new Exception(sprintf(_("The uploaded file for %s is not a JPEG."), $label));
+						if($type != IMAGETYPE_JPEG) throw new Exception(sprintf(__("The uploaded file for %s is not a JPEG."), $label));
 
 
 						// Resize image
 						// Resize image
 						$output_image = Image::normalise($file->tmp_name);
 						$output_image = Image::normalise($file->tmp_name);
@@ -134,8 +134,8 @@ if(Core::$user->level == User::LEVEL_TESTER) {
 				else {
 				else {
 					$value = http::value($name, "trim");
 					$value = http::value($name, "trim");
 
 
-					if($required && empty($value)) $form_exception->addError(sprintf(_("%s is required."), $label));
-					if($values && !in_array($value, $values)) $form_exception->addError(sprintf(_("Value for %s is invalid."), $label));
+					if($required && empty($value)) $form_exception->addError(sprintf(__("%s is required."), $label));
+					if($values && !in_array($value, $values)) $form_exception->addError(sprintf(__("Value for %s is invalid."), $label));
 
 
 					if(in_array($name, Test::TEST_FIELDS)) {
 					if(in_array($name, Test::TEST_FIELDS)) {
 						$test->$name = $value;
 						$test->$name = $value;
@@ -149,7 +149,7 @@ if(Core::$user->level == User::LEVEL_TESTER) {
 						}
 						}
 						$test_value->value = $value;
 						$test_value->value = $value;
 						$success = $test_value->commit();
 						$success = $test_value->commit();
-						if(!$success) $form_exception->addError(sprintf(_("Failed to save value for %s."), $label));
+						if(!$success) $form_exception->addError(sprintf(__("Failed to save value for %s."), $label));
 					}
 					}
 				}
 				}
 
 
@@ -165,9 +165,9 @@ if(Core::$user->level == User::LEVEL_TESTER) {
 				$test->dts_start = Util::getDateTime();
 				$test->dts_start = Util::getDateTime();
 				$test->dts_updated = Util::getDateTime();
 				$test->dts_updated = Util::getDateTime();
 				$success = $test->commit();
 				$success = $test->commit();
-				if(!$success) throw new Exception(_("Failed to save test. Please try again later."));
+				if(!$success) throw new Exception(__("Failed to save test. Please try again later."));
 
 
-				Core::addAlert("success", _("Photos uploaded successfully."));
+				Core::addAlert("success", __("Photos uploaded successfully."));
 
 
 				HTTP::redirect("/account/tests/$id");
 				HTTP::redirect("/account/tests/$id");
 
 
@@ -191,7 +191,7 @@ if(Core::$user->level == User::LEVEL_TESTER) {
 				$test->dts_updated = Util::getDateTime();
 				$test->dts_updated = Util::getDateTime();
 
 
 				$success = $test->commit();
 				$success = $test->commit();
-				if(!$success) throw new Exception(_("Failed to save test. Please try again later."));
+				if(!$success) throw new Exception(__("Failed to save test. Please try again later."));
 
 
 				JSON::success();
 				JSON::success();
 			}
 			}
@@ -457,7 +457,7 @@ else if(Core::$user->level >= User::LEVEL_VENUE) {
 	HTTP::redirect("/account/tests/$id/result");
 	HTTP::redirect("/account/tests/$id/result");
 }
 }
 else {
 else {
-	throw new Exception(_("Invalid request."));
+	throw new Exception(__("Invalid request."));
 }
 }
 
 
 ?>
 ?>

+ 6 - 6
controllers/test_confirm.php

@@ -1,9 +1,9 @@
 <?php
 <?php
 
 
 $test = Test::get($id);
 $test = Test::get($id);
-if(!$test) throw new Exception(_("Test not found."));
-if($test->tester_id != Core::$user->id) throw new Exception(_("You do not have permission to view this page."));
-if($test->status > Test::STATUS_ASSIGNED) throw new Exception(_("The test has already been accepted or declined."));
+if(!$test) throw new Exception(__("Test not found."));
+if($test->tester_id != Core::$user->id) throw new Exception(__("You do not have permission to view this page."));
+if($test->status > Test::STATUS_ASSIGNED) throw new Exception(__("The test has already been accepted or declined."));
 
 
 switch($action) {
 switch($action) {
 	case "accept":
 	case "accept":
@@ -12,7 +12,7 @@ switch($action) {
 		$test->dts_updated = Util::getDateTime();
 		$test->dts_updated = Util::getDateTime();
 		$test->commit();
 		$test->commit();
 
 
-		Core::addAlert("success", _("Test accepted successfully."));
+		Core::addAlert("success", __("Test accepted successfully."));
 		HTTP::redirect("/account/tests");
 		HTTP::redirect("/account/tests");
 
 
 		break;
 		break;
@@ -21,12 +21,12 @@ switch($action) {
 
 
 		$test->decline();
 		$test->decline();
 
 
-		Core::addAlert("success", _("Test declined successfully."));
+		Core::addAlert("success", __("Test declined successfully."));
 		HTTP::redirect("/account/tests");
 		HTTP::redirect("/account/tests");
 
 
 		break;
 		break;
 	default:
 	default:
-		throw new Exception(_("Invalid action."));
+		throw new Exception(__("Invalid action."));
 }
 }
 
 
 
 

+ 2 - 2
controllers/test_file.php

@@ -1,10 +1,10 @@
 <?php
 <?php
 
 
 $test = Test::get($id);
 $test = Test::get($id);
-if(!$test) throw new Exception(_("Test not found."));
+if(!$test) throw new Exception(__("Test not found."));
 
 
 if(Core::$user->level < User::LEVEL_ADMIN) {
 if(Core::$user->level < User::LEVEL_ADMIN) {
-	if(Core::$user->id != $test->tester_id) throw new Exception(_("You do not have permission to access this resource."));
+	if(Core::$user->id != $test->tester_id) throw new Exception(__("You do not have permission to access this resource."));
 }
 }
 
 
 $directory = $test->getDirectory();
 $directory = $test->getDirectory();

+ 5 - 5
controllers/test_invoice.php

@@ -3,9 +3,9 @@
 use \Mpdf\Mpdf;
 use \Mpdf\Mpdf;
 
 
 $test = Test::get($id);
 $test = Test::get($id);
-if(!$test) throw new Exception(_("Test not found."));
-if($test->status != Test::STATUS_COMPLETED) throw new Exception(_("An invoice cannot be generated for this test yet."));
-if(Core::$user->id != $test->tester_id && !Core::$user->canAdmin()) throw new Exception(_("You do not have permission to access this resource."));
+if(!$test) throw new Exception(__("Test not found."));
+if($test->status != Test::STATUS_COMPLETED) throw new Exception(__("An invoice cannot be generated for this test yet."));
+if(Core::$user->id != $test->tester_id && !Core::$user->canAdmin()) throw new Exception(__("You do not have permission to access this resource."));
 
 
 $project = $test->getProject();
 $project = $test->getProject();
 $template = $project->getTemplate();
 $template = $project->getTemplate();
@@ -32,8 +32,8 @@ foreach($tester_invoice_fields as $field) {
 
 
 // Get invoice address
 // Get invoice address
 $address = $tester->getInvoiceAddress();
 $address = $tester->getInvoiceAddress();
-if(!$address) throw new Exception(_("Invoice address not found. Please set an address as the invoice address then try again."));
-if(!$tester->hasValidPaymentMethod()) throw new Exception(_("No valid payment method found. Please go to the Settings page and make sure all respective fields are filled in and then try again."));
+if(!$address) throw new Exception(__("Invoice address not found. Please set an address as the invoice address then try again."));
+if(!$tester->hasValidPaymentMethod()) throw new Exception(__("No valid payment method found. Please go to the Settings page and make sure all respective fields are filled in and then try again."));
 
 
 // Filename
 // Filename
 $reference =
 $reference =

+ 1 - 1
controllers/test_pdf.php

@@ -5,7 +5,7 @@ use \Mpdf\Mpdf;
 // Controller may be included directly and $pdf can be accessed.
 // Controller may be included directly and $pdf can be accessed.
 
 
 $test = Test::get($id);
 $test = Test::get($id);
-if(!$test) throw new Exception(_("Test not found."));
+if(!$test) throw new Exception(__("Test not found."));
 
 
 $project = $test->getProject();
 $project = $test->getProject();
 $customer = $project->getCustomer();
 $customer = $project->getCustomer();

+ 2 - 2
controllers/tests.php

@@ -1,8 +1,8 @@
 <?php
 <?php
 
 
-$page_title = _("Tests");
+$page_title = __("Tests");
 
 
-Core::addBreadcrumb("/account", _("Account"));
+Core::addBreadcrumb("/account", __("Account"));
 Core::addBreadcrumb("/account/tests", $page_title);
 Core::addBreadcrumb("/account/tests", $page_title);
 
 
 $user = Core::$user;
 $user = Core::$user;

+ 4 - 4
controllers/tests_available.php

@@ -2,14 +2,14 @@
 
 
 Core::addScript("public/js/app-tests-available.js");
 Core::addScript("public/js/app-tests-available.js");
 
 
-$page_title = _("Find Tests");
+$page_title = __("Find Tests");
 
 
-Core::addBreadcrumb("/account", _("Account"));
-Core::addBreadcrumb("/account/tests", _("Tests"));
+Core::addBreadcrumb("/account", __("Account"));
+Core::addBreadcrumb("/account/tests", __("Tests"));
 Core::addBreadcrumb("/account/tests/available", $page_title);
 Core::addBreadcrumb("/account/tests/available", $page_title);
 
 
 $user = Core::$user;
 $user = Core::$user;
-if(!$user->can_claim) throw new Exception(_("You do not have permission to perform this action."));
+if(!$user->can_claim) throw new Exception(__("You do not have permission to perform this action."));
 
 
 $dts = date("Y-m-d H:i:s");
 $dts = date("Y-m-d H:i:s");
 
 

+ 9 - 9
controllers/tests_available_ajax.php

@@ -17,7 +17,7 @@ switch($action) {
 		]);
 		]);
 
 
 		try {
 		try {
-			if(!$test) throw new Exception(_("Test no longer available."));
+			if(!$test) throw new Exception(__("Test no longer available."));
 
 
 			$project = $test->getProject();
 			$project = $test->getProject();
 
 
@@ -26,11 +26,11 @@ switch($action) {
 			$unix_due = strtotime("$date_due 23:59:59");
 			$unix_due = strtotime("$date_due 23:59:59");
 
 
 			$user = Core::$user;
 			$user = Core::$user;
-			if($user->level == User::LEVEL_BANNED) throw new Exception(_("You are a banned tester."));
-			if($user->level == User::LEVEL_REGISTERED) throw new Exception(_("Your account is not verified."));
-			if($user->level == User::LEVEL_UNVERIFIED) throw new Exception(_("Your account is not verified."));
-			if($user->level == User::LEVEL_DEACTIVATED) throw new Exception(_("Your account is deactivated."));
-			if($user->level != User::LEVEL_TESTER) throw new Exception(_("You are not a tester."));
+			if($user->level == User::LEVEL_BANNED) throw new Exception(__("You are a banned tester."));
+			if($user->level == User::LEVEL_REGISTERED) throw new Exception(__("Your account is not verified."));
+			if($user->level == User::LEVEL_UNVERIFIED) throw new Exception(__("Your account is not verified."));
+			if($user->level == User::LEVEL_DEACTIVATED) throw new Exception(__("Your account is deactivated."));
+			if($user->level != User::LEVEL_TESTER) throw new Exception(__("You are not a tester."));
 
 
 			$test->status = Test::STATUS_CONFIRMED;
 			$test->status = Test::STATUS_CONFIRMED;
 			$test->tester_id = $user->id;
 			$test->tester_id = $user->id;
@@ -39,11 +39,11 @@ switch($action) {
 
 
 			if($unix_due) {
 			if($unix_due) {
 				$test->dts_due = "$date_due 23:59:59";
 				$test->dts_due = "$date_due 23:59:59";
-				if(strcmp($test->dts_due, $project->dts_start) < 0) throw new Exception(_("Too early."));
+				if(strcmp($test->dts_due, $project->dts_start) < 0) throw new Exception(__("Too early."));
 			}
 			}
 
 
 			$success = $test->commit();
 			$success = $test->commit();
-			if(!$success) throw new Exception(_("Test cannot be claimed, please try again later."));
+			if(!$success) throw new Exception(__("Test cannot be claimed, please try again later."));
 
 
 			$test->sendClaimedEmail();
 			$test->sendClaimedEmail();
 		}
 		}
@@ -79,7 +79,7 @@ switch($action) {
 
 
 		break;
 		break;
 	default:
 	default:
-		throw new Exception(_("Invalid action."));
+		throw new Exception(__("Invalid action."));
 }
 }
 
 
 JSON::success($response);
 JSON::success($response);

+ 3 - 3
controllers/tests_completed.php

@@ -2,10 +2,10 @@
 
 
 Core::addScript("public/js/app-completed-tests.js");
 Core::addScript("public/js/app-completed-tests.js");
 
 
-$page_title = _("Completed Tests");
+$page_title = __("Completed Tests");
 
 
-Core::addBreadcrumb("/account", _("Account"));
-Core::addBreadcrumb("/account/tests", _("Tests"));
+Core::addBreadcrumb("/account", __("Account"));
+Core::addBreadcrumb("/account/tests", __("Tests"));
 Core::addBreadcrumb("/account/tests/completed", $page_title);
 Core::addBreadcrumb("/account/tests/completed", $page_title);
 
 
 $tests = Core::$user->getCompletedTests();
 $tests = Core::$user->getCompletedTests();

+ 2 - 2
controllers/tests_tester_kml.php

@@ -13,9 +13,9 @@ header("Content-Disposition: attachment; filename=tests-$dts_slug.kml");
 $xml = simplexml_load_file(ROOT_DIR . "/files/empty.kml");
 $xml = simplexml_load_file(ROOT_DIR . "/files/empty.kml");
 
 
 $folder_node = $xml->addChild("Folder");
 $folder_node = $xml->addChild("Folder");
-$folder_node->addChild("name", _("Tests"));
+$folder_node->addChild("name", __("Tests"));
 $folder_node->addChild("open", 1);
 $folder_node->addChild("open", 1);
-$folder_node->addChild("description", sprintf(_("Test locations as of %s"), $dts));
+$folder_node->addChild("description", sprintf(__("Test locations as of %s"), $dts));
 
 
 foreach($locations as $location) {
 foreach($locations as $location) {
 	$placemark_node = $folder_node->addChild("Placemark");
 	$placemark_node = $folder_node->addChild("Placemark");

+ 3 - 3
controllers/user_activation.php

@@ -8,14 +8,14 @@ if($user && $user->activated == 0) {
 	$user->activated = 1;
 	$user->activated = 1;
 	$user->verify_token = null;
 	$user->verify_token = null;
 	$success = $user->commit();
 	$success = $user->commit();
-	if(!$success) throw new Exception(_("Email verification failed. Please try again later."));
+	if(!$success) throw new Exception(__("Email verification failed. Please try again later."));
 
 
 	$user->sendWelcomeEmail();
 	$user->sendWelcomeEmail();
 
 
-	Core::addAlert("success", _("Email address verified. You can now log in to your account."));
+	Core::addAlert("success", __("Email address verified. You can now log in to your account."));
 }
 }
 else {
 else {
-	Core::addAlert("danger", _("Invalid verification token. The user account may have already been activated or the token has expired. Please try again."));
+	Core::addAlert("danger", __("Invalid verification token. The user account may have already been activated or the token has expired. Please try again."));
 }
 }
 
 
 HTTP::redirect("/log-in");
 HTTP::redirect("/log-in");

+ 26 - 26
engine/test.php

@@ -55,13 +55,13 @@ class Test extends Model {
 	public static function getStatusTesterInvoiceText($status) {
 	public static function getStatusTesterInvoiceText($status) {
 		switch($status) {
 		switch($status) {
 			case Test::STATUS_TESTER_INVOICE_NONE:
 			case Test::STATUS_TESTER_INVOICE_NONE:
-				return _("No Invoice Generated");
+				return __("No Invoice Generated");
 			case Test::STATUS_TESTER_INVOICE_PENDING:
 			case Test::STATUS_TESTER_INVOICE_PENDING:
-				return _("Pending Payment");
+				return __("Pending Payment");
 			case Test::STATUS_TESTER_INVOICE_PAID:
 			case Test::STATUS_TESTER_INVOICE_PAID:
-				return _("Paid");
+				return __("Paid");
 		}
 		}
-		return _("Unknown");
+		return __("Unknown");
 	}
 	}
 
 
 	public static function getStatusTesterInvoiceClass($status) {
 	public static function getStatusTesterInvoiceClass($status) {
@@ -94,39 +94,39 @@ class Test extends Model {
 
 
 		// Build
 		// Build
 		$builder = new EmailBuilder;
 		$builder = new EmailBuilder;
-		$builder->addParagraph("<b>" . sprintf(_("Hi %s"), $name) . "</b>");
-		$builder->addLeadParagraph(_("Congrats, you have been allocated a test!"));
+		$builder->addParagraph("<b>" . sprintf(__("Hi %s"), $name) . "</b>");
+		$builder->addLeadParagraph(__("Congrats, you have been allocated a test!"));
 
 
 		if($project->isNighttime()) {
 		if($project->isNighttime()) {
-			$builder->addParagraph("<b><font color=\"red\">" . _("Evening Test to be done between 7PM and midnight.") . "</font></b>");
+			$builder->addParagraph("<b><font color=\"red\">" . __("Evening Test to be done between 7PM and midnight.") . "</font></b>");
 		}
 		}
 
 
 		if($message) {
 		if($message) {
 			$builder->addParagraph($message);
 			$builder->addParagraph($message);
 		}
 		}
 
 
-		$builder->addParagraph(sprintf(_("We need you to confirm if you are able to do the test. Please check the details below and then confirm by pressing the %sAccept%s or %sDecline%s buttons and once you tap %sAccept%s, the test will be allocated to you."),
+		$builder->addParagraph(sprintf(__("We need you to confirm if you are able to do the test. Please check the details below and then confirm by pressing the %sAccept%s or %sDecline%s buttons and once you tap %sAccept%s, the test will be allocated to you."),
 			'<b>', '</b>',
 			'<b>', '</b>',
 			'<b>', '</b>',
 			'<b>', '</b>',
 			'<b>', '</b>'
 			'<b>', '</b>'
 		));
 		));
 		$builder->addAcceptDeclineButtons($base_url);
 		$builder->addAcceptDeclineButtons($base_url);
-		$builder->addParagraph(sprintf(_("The site address is: %s"), "<b>{$address}</b>"));
-		$builder->addParagraph(sprintf(_("The date that need to complete and submit the results by is: %s"), "<font color=\"red\"><b>$date_due</b></font>"));
-		$builder->addParagraph(sprintf(_("For methodology and further notes please check the %sUseful Documents%s section on the %sAccount%s page."),
+		$builder->addParagraph(sprintf(__("The site address is: %s"), "<b>{$address}</b>"));
+		$builder->addParagraph(sprintf(__("The date that need to complete and submit the results by is: %s"), "<font color=\"red\"><b>$date_due</b></font>"));
+		$builder->addParagraph(sprintf(__("For methodology and further notes please check the %sUseful Documents%s section on the %sAccount%s page."),
 			'<b>', '</b>',
 			'<b>', '</b>',
 			'<b>', '</b>'
 			'<b>', '</b>'
 		));
 		));
-		$builder->addParagraph(sprintf(_("If you agree to conduct the test, log in and then go to %sTests%s where you will be able to see the tests available to you. Please tap the %sBegin%s button and follow the instructions that is shown."),
+		$builder->addParagraph(sprintf(__("If you agree to conduct the test, log in and then go to %sTests%s where you will be able to see the tests available to you. Please tap the %sBegin%s button and follow the instructions that is shown."),
 			'<b>', '</b>',
 			'<b>', '</b>',
 			'<b>', '</b>'
 			'<b>', '</b>'
 		));
 		));
-		$builder->addParagraph(sprintf(_("If you have any questions please send them to %s or call %s on %s."),
+		$builder->addParagraph(sprintf(__("If you have any questions please send them to %s or call %s on %s."),
 			"<a href=\"mailto:tests@check-policy.com\">tests@check-policy.com</a>",
 			"<a href=\"mailto:tests@check-policy.com\">tests@check-policy.com</a>",
 			"<b>$admin_first_name</b>",
 			"<b>$admin_first_name</b>",
 			"<b>$admin_phone</b>"
 			"<b>$admin_phone</b>"
 		));
 		));
-		$builder->addParagraph(sprintf(_("If you are unable to submit the results via the web-based app please contact us and we can send you an offline form to complete. Please accept the test by tapping the %sAccept%s button and email us back saying you would like an offline form."),
+		$builder->addParagraph(sprintf(__("If you are unable to submit the results via the web-based app please contact us and we can send you an offline form to complete. Please accept the test by tapping the %sAccept%s button and email us back saying you would like an offline form."),
 			'<b>', '</b>'
 			'<b>', '</b>'
 		));
 		));
 		$content = $builder->build();
 		$content = $builder->build();
@@ -136,7 +136,7 @@ class Test extends Model {
 		$mail->setHtmlContent($content);
 		$mail->setHtmlContent($content);
 		$mail->setFrom(EMAIL_CONTACT, EMAIL_FROM_NAME);
 		$mail->setFrom(EMAIL_CONTACT, EMAIL_FROM_NAME);
 		$mail->addAddress($tester->email, $tester->getDisplayName());
 		$mail->addAddress($tester->email, $tester->getDisplayName());
-		$mail->setSubject(_("You have been allocated a test"));
+		$mail->setSubject(__("You have been allocated a test"));
 		$mail->send();
 		$mail->send();
 	}
 	}
 
 
@@ -153,29 +153,29 @@ class Test extends Model {
 
 
 		// Build
 		// Build
 		$builder = new EmailBuilder;
 		$builder = new EmailBuilder;
-		$builder->addParagraph("<b>" . sprintf(_("Hi %s"), $name) . "</b>");
-		$builder->addLeadParagraph(_("Congrats, you have claimed a test!"));
+		$builder->addParagraph("<b>" . sprintf(__("Hi %s"), $name) . "</b>");
+		$builder->addLeadParagraph(__("Congrats, you have claimed a test!"));
 
 
 		if($project->isNighttime()) {
 		if($project->isNighttime()) {
-			$builder->addParagraph("<b><font color=\"red\">" . _("Evening Test to be done between 7PM and midnight.") . "</font></b>");
+			$builder->addParagraph("<b><font color=\"red\">" . __("Evening Test to be done between 7PM and midnight.") . "</font></b>");
 		}
 		}
 
 
-		$builder->addParagraph(sprintf(_("The site address is: %s"), "<b>$address</b>"));
-		$builder->addParagraph(sprintf(_("The date that need to complete and submit the results by is: %s"), "<font color=\"red\"><b>$date_due</b></font>"));
-		$builder->addParagraph(sprintf(_("For methodology and further notes please check the %sUseful Documents%s section on the %sAccount%s page."),
+		$builder->addParagraph(sprintf(__("The site address is: %s"), "<b>$address</b>"));
+		$builder->addParagraph(sprintf(__("The date that need to complete and submit the results by is: %s"), "<font color=\"red\"><b>$date_due</b></font>"));
+		$builder->addParagraph(sprintf(__("For methodology and further notes please check the %sUseful Documents%s section on the %sAccount%s page."),
 			'<b>', '</b>',
 			'<b>', '</b>',
 			'<b>', '</b>'
 			'<b>', '</b>'
 		));
 		));
-		$builder->addParagraph(sprintf(_("Log in and then go to %sTests%s where you will be able to see the tests available to you. Please tap the %sBegin%s button and follow the instructions that is shown."),
+		$builder->addParagraph(sprintf(__("Log in and then go to %sTests%s where you will be able to see the tests available to you. Please tap the %sBegin%s button and follow the instructions that is shown."),
 			'<b>', '</b>',
 			'<b>', '</b>',
 			'<b>', '</b>'
 			'<b>', '</b>'
 		));
 		));
-		$builder->addParagraph(sprintf(_("If you have any questions please send them to %s or call %s on %s."),
+		$builder->addParagraph(sprintf(__("If you have any questions please send them to %s or call %s on %s."),
 			"<a href=\"mailto:tests@check-policy.com\">tests@check-policy.com</a>",
 			"<a href=\"mailto:tests@check-policy.com\">tests@check-policy.com</a>",
 			"<b>$admin_first_name</b>",
 			"<b>$admin_first_name</b>",
 			"<b>$admin_phone</b>"
 			"<b>$admin_phone</b>"
 		));
 		));
-		$builder->addParagraph(_("If you are unable to submit the results via the web-based app please contact us and we can send you an offline form to complete."));
+		$builder->addParagraph(__("If you are unable to submit the results via the web-based app please contact us and we can send you an offline form to complete."));
 		$content = $builder->build();
 		$content = $builder->build();
 
 
 		// Send
 		// Send
@@ -183,7 +183,7 @@ class Test extends Model {
 		$mail->setHtmlContent($content);
 		$mail->setHtmlContent($content);
 		$mail->setFrom(EMAIL_CONTACT, EMAIL_FROM_NAME);
 		$mail->setFrom(EMAIL_CONTACT, EMAIL_FROM_NAME);
 		$mail->addAddress($tester->email, $tester->getDisplayName());
 		$mail->addAddress($tester->email, $tester->getDisplayName());
-		$mail->setSubject(_("You have claimed a test"));
+		$mail->setSubject(__("You have claimed a test"));
 		$mail->send();
 		$mail->send();
 	}
 	}
 
 
@@ -386,7 +386,7 @@ class Test extends Model {
 
 
 	public function getPassText() {
 	public function getPassText() {
 		if(is_null($this->pass)) return "Pending";
 		if(is_null($this->pass)) return "Pending";
-		return $this->pass ? _("Pass") : _("Fail");
+		return $this->pass ? __("Pass") : __("Fail");
 	}
 	}
 
 
 	public function getMPDF() {
 	public function getMPDF() {

+ 37 - 37
engine/user.php

@@ -95,9 +95,9 @@ class User extends Model {
 
 
 		// Build
 		// Build
 		$builder = new EmailBuilder;
 		$builder = new EmailBuilder;
-		$builder->addParagraph("<b>" . sprintf(_("Hi %s"), $name) . "</b>");
-		$builder->addLeadParagraph(_("Thanks for registering!"));
-		$builder->addParagraph(sprintf(_("Welcome to %s! Before you can log in, you will need to verify your email address. You can do so by tapping the following link:"), APP_NAME));
+		$builder->addParagraph("<b>" . sprintf(__("Hi %s"), $name) . "</b>");
+		$builder->addLeadParagraph(__("Thanks for registering!"));
+		$builder->addParagraph(sprintf(__("Welcome to %s! Before you can log in, you will need to verify your email address. You can do so by tapping the following link:"), APP_NAME));
 		$builder->addParagraph("<a href=\"$link\">$link</a>");
 		$builder->addParagraph("<a href=\"$link\">$link</a>");
 		$content = $builder->build();
 		$content = $builder->build();
 
 
@@ -107,7 +107,7 @@ class User extends Model {
 		$mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
 		$mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
 		$mail->addAddress($this->email, $this->getDisplayName());
 		$mail->addAddress($this->email, $this->getDisplayName());
 
 
-		$mail->setSubject(_("Verify your email address"));
+		$mail->setSubject(__("Verify your email address"));
 
 
 		$mail->send();
 		$mail->send();
 
 
@@ -122,9 +122,9 @@ class User extends Model {
 
 
 		// Build
 		// Build
 		$builder = new EmailBuilder;
 		$builder = new EmailBuilder;
-		$builder->addParagraph("<b>" . sprintf(_("Hi %s"), $name) . "</b>");
-		$builder->addLeadParagraph(_("Thanks for verifying your email address!"));
-		$builder->addParagraph(sprintf(_("Welcome to %s! Before you can take part in tests, you will need to provide us with some ID. You can do so by tapping the following link:"), APP_NAME));
+		$builder->addParagraph("<b>" . sprintf(__("Hi %s"), $name) . "</b>");
+		$builder->addLeadParagraph(__("Thanks for verifying your email address!"));
+		$builder->addParagraph(sprintf(__("Welcome to %s! Before you can take part in tests, you will need to provide us with some ID. You can do so by tapping the following link:"), APP_NAME));
 		$builder->addParagraph("<a href=\"$link\">$link</a>");
 		$builder->addParagraph("<a href=\"$link\">$link</a>");
 		$content = $builder->build();
 		$content = $builder->build();
 
 
@@ -133,7 +133,7 @@ class User extends Model {
 		$mail->setHtmlContent($content);
 		$mail->setHtmlContent($content);
 		$mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
 		$mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
 		$mail->addAddress($this->email, $this->getDisplayName());
 		$mail->addAddress($this->email, $this->getDisplayName());
-		$mail->setSubject(sprintf(_("Welcome to %s"), APP_NAME));
+		$mail->setSubject(sprintf(__("Welcome to %s"), APP_NAME));
 		$mail->send();
 		$mail->send();
 
 
 		return true;
 		return true;
@@ -147,20 +147,20 @@ class User extends Model {
 
 
 		// Build
 		// Build
 		$builder = new EmailBuilder;
 		$builder = new EmailBuilder;
-		$builder->addParagraph("<b>" . sprintf(_("Hi %s"), $name) . "</b>");
-		$builder->addLeadParagraph(_("Your application has been successful!"));
-		$builder->addParagraph(sprintf(_("Welcome to %s! In order to get you a test as soon as possible, we need one final confirmation. Please log in to your account and have a quick read of the documents that explain what we need you to do during a test."), APP_NAME));
-		$builder->addParagraph(_("When you're ready to try a Practice test, in your account and select the \"Practice\" option."));
-		$builder->addParagraph(_("1. As it is a Practice test, you can reset and start over as many times as you like because it doesn't count but lets you see what the real thing is like."));
-		$builder->addParagraph(sprintf(_("2. Email us at %s and let us know that you're ready."), "contact@" . DOMAIN));
-		$builder->addParagraph(_("3. We will allocate a test to you as soon as possible."));
-
-		$builder->addParagraph(_("Remember to check your online account for when tests become available."));
-		$builder->addParagraph(_("Keep an eye out for emails inviting you to accept a test via the email or log in to your account where you can see your available tests."));
-		$builder->addParagraph(_("If you accept to do a test within the agreed period (usually 7 days) please click Accept to confirm that you would like to do the test within the agreed period."));
-		$builder->addParagraph(_("If you can't make it (it's too far or you'll be away), please Reject the test or email us with other suitable dates."));
-		$builder->addParagraph(_("After you click Accept, you will be given the option to Begin the test whenever you want. Just log in to your account and click Begin on the test."));
-		$builder->addParagraph(sprintf(_("Once again welcome to %s - Accept, Begin, Complete and get paid for up to 8 minutes work!"), APP_NAME));
+		$builder->addParagraph("<b>" . sprintf(__("Hi %s"), $name) . "</b>");
+		$builder->addLeadParagraph(__("Your application has been successful!"));
+		$builder->addParagraph(sprintf(__("Welcome to %s! In order to get you a test as soon as possible, we need one final confirmation. Please log in to your account and have a quick read of the documents that explain what we need you to do during a test."), APP_NAME));
+		$builder->addParagraph(__("When you're ready to try a Practice test, in your account and select the \"Practice\" option."));
+		$builder->addParagraph(__("1. As it is a Practice test, you can reset and start over as many times as you like because it doesn't count but lets you see what the real thing is like."));
+		$builder->addParagraph(sprintf(__("2. Email us at %s and let us know that you're ready."), "contact@" . DOMAIN));
+		$builder->addParagraph(__("3. We will allocate a test to you as soon as possible."));
+
+		$builder->addParagraph(__("Remember to check your online account for when tests become available."));
+		$builder->addParagraph(__("Keep an eye out for emails inviting you to accept a test via the email or log in to your account where you can see your available tests."));
+		$builder->addParagraph(__("If you accept to do a test within the agreed period (usually 7 days) please click Accept to confirm that you would like to do the test within the agreed period."));
+		$builder->addParagraph(__("If you can't make it (it's too far or you'll be away), please Reject the test or email us with other suitable dates."));
+		$builder->addParagraph(__("After you click Accept, you will be given the option to Begin the test whenever you want. Just log in to your account and click Begin on the test."));
+		$builder->addParagraph(sprintf(__("Once again welcome to %s - Accept, Begin, Complete and get paid for up to 8 minutes work!"), APP_NAME));
 		$content = $builder->build();
 		$content = $builder->build();
 
 
 		// Send
 		// Send
@@ -168,7 +168,7 @@ class User extends Model {
 		$mail->setHtmlContent($content);
 		$mail->setHtmlContent($content);
 		$mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
 		$mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
 		$mail->addAddress($this->email, $this->getDisplayName());
 		$mail->addAddress($this->email, $this->getDisplayName());
-		$mail->setSubject(_("ID accepted and verified"));
+		$mail->setSubject(__("ID accepted and verified"));
 		$mail->send();
 		$mail->send();
 
 
 		return true;
 		return true;
@@ -183,12 +183,12 @@ class User extends Model {
 
 
 		// Build
 		// Build
 		$builder = new EmailBuilder;
 		$builder = new EmailBuilder;
-		$builder->addParagraph("<b>" . sprintf(_("Hi %s"), $name) . "</b>");
-		$builder->addLeadParagraph(_("Thank you for submitting your ID details."));
-		$builder->addParagraph(_("Unfortunately we could not verify and accept your documents and/or image."));
-		$builder->addParagraph(sprintf(_("The reason for this is: %s"), $reason));
-		$builder->addParagraph(_("Please log in again, resubmit and we will try again."));
-		$builder->addParagraph(_("We look forward to welcoming you onboard soon!"));
+		$builder->addParagraph("<b>" . sprintf(__("Hi %s"), $name) . "</b>");
+		$builder->addLeadParagraph(__("Thank you for submitting your ID details."));
+		$builder->addParagraph(__("Unfortunately we could not verify and accept your documents and/or image."));
+		$builder->addParagraph(sprintf(__("The reason for this is: %s"), $reason));
+		$builder->addParagraph(__("Please log in again, resubmit and we will try again."));
+		$builder->addParagraph(__("We look forward to welcoming you onboard soon!"));
 		$content = $builder->build();
 		$content = $builder->build();
 
 
 		// Send
 		// Send
@@ -196,7 +196,7 @@ class User extends Model {
 		$mail->setHtmlContent($content);
 		$mail->setHtmlContent($content);
 		$mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
 		$mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
 		$mail->addAddress($this->email, $this->getDisplayName());
 		$mail->addAddress($this->email, $this->getDisplayName());
-		$mail->setSubject(_("We could not verify your ID details"));
+		$mail->setSubject(__("We could not verify your ID details"));
 		$mail->send();
 		$mail->send();
 
 
 		return true;
 		return true;
@@ -213,11 +213,11 @@ class User extends Model {
 
 
 		// Build
 		// Build
 		$builder = new EmailBuilder;
 		$builder = new EmailBuilder;
-		$builder->addParagraph("<b>" . sprintf(_("Hi %s"), $name) . "</b>");
-		$builder->addLeadParagraph(_("A reset password request has been received."));
-		$builder->addParagraph(_("To reset your password, please tap on the following link:"));
+		$builder->addParagraph("<b>" . sprintf(__("Hi %s"), $name) . "</b>");
+		$builder->addLeadParagraph(__("A reset password request has been received."));
+		$builder->addParagraph(__("To reset your password, please tap on the following link:"));
 		$builder->addParagraph("<a href=\"$link\">$link</a>");
 		$builder->addParagraph("<a href=\"$link\">$link</a>");
-		$builder->addParagraph(sprintf(_("If you %sdid not%s request for your password to be reset, please ignore this email."), '<strong>', '</strong>'));
+		$builder->addParagraph(sprintf(__("If you %sdid not%s request for your password to be reset, please ignore this email."), '<strong>', '</strong>'));
 		$content = $builder->build();
 		$content = $builder->build();
 
 
 		// Send
 		// Send
@@ -227,7 +227,7 @@ class User extends Model {
 		$mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
 		$mail->setFrom(EMAIL_NO_REPLY, EMAIL_FROM_NAME);
 		$mail->addAddress($this->email, $this->getDisplayName());
 		$mail->addAddress($this->email, $this->getDisplayName());
 
 
-		$mail->setSubject(_("Password reset instructions"));
+		$mail->setSubject(__("Password reset instructions"));
 
 
 		$mail->send();
 		$mail->send();
 
 
@@ -297,7 +297,7 @@ class User extends Model {
 
 
 	public function getAge() {
 	public function getAge() {
 
 
-		if(is_null($this->date_of_birth)) return _("N/A");
+		if(is_null($this->date_of_birth)) return __("N/A");
 
 
 		$now = new DateTime("now");
 		$now = new DateTime("now");
 		$dob = new DateTime($this->date_of_birth);
 		$dob = new DateTime($this->date_of_birth);
@@ -306,7 +306,7 @@ class User extends Model {
 
 
 	public function getDisplayName() {
 	public function getDisplayName() {
 
 
-		if(empty($this->email)) return _("Deleted User");
+		if(empty($this->email)) return __("Deleted User");
 
 
 		$parts = array_filter([$this->first_name, $this->last_name]);
 		$parts = array_filter([$this->first_name, $this->last_name]);
 		return implode(" ", $parts);
 		return implode(" ", $parts);

+ 9 - 12
initialise.php

@@ -68,22 +68,19 @@ if(file_exists($mo_path)) {
 }
 }
 
 
 $translator->register();
 $translator->register();
-function _() {
-	return call_user_func_array("__", func_get_args());
-}
 
 
 // Strings
 // Strings
-define("YES", _("Yes"));
-define("NO", _("No"));
+define("YES", __("Yes"));
+define("NO", __("No"));
 
 
-define("MALE", _("Male"));
-define("FEMALE", _("Female"));
-define("UNSPECIFIED", _("Unspecified"));
+define("MALE", __("Male"));
+define("FEMALE", __("Female"));
+define("UNSPECIFIED", __("Unspecified"));
 
 
-define("MISS", _("Miss"));
-define("MR", _("Mr"));
-define("MS", _("Ms"));
-define("DR", _("Dr"));
+define("MISS", __("Miss"));
+define("MR", __("Mr"));
+define("MS", __("Ms"));
+define("DR", __("Dr"));
 
 
 // Extend session cookie if it exists
 // Extend session cookie if it exists
 if(!empty($_COOKIE[SESSION_NAME])) {
 if(!empty($_COOKIE[SESSION_NAME])) {

+ 3 - 3
views/404.php

@@ -1,10 +1,10 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Page Not Found"))?></h2>
+	<h2><?=htmlspecialchars(__("Page Not Found"))?></h2>
 
 
 	<div class="alert alert-info">
 	<div class="alert alert-info">
 		<i class="fal fa-fw fa-info-circle"></i>
 		<i class="fal fa-fw fa-info-circle"></i>
-		<?=htmlspecialchars(_("The requested page could not be found."))?>
-		<?=sprintf(_("%sClick here%s to return to the home page."), "<a href=\"/\">", "</a>")?>
+		<?=htmlspecialchars(__("The requested page could not be found."))?>
+		<?=sprintf(__("%sClick here%s to return to the home page."), "<a href=\"/\">", "</a>")?>
 	</div>
 	</div>
 </div>
 </div>

+ 3 - 3
views/503.php

@@ -1,11 +1,11 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Internal Server Error"))?></h2>
+	<h2><?=htmlspecialchars(__("Internal Server Error"))?></h2>
 
 
 	<div class="alert alert-danger">
 	<div class="alert alert-danger">
 		<i class="fal fa-fw fa-exclamation-circle"></i>
 		<i class="fal fa-fw fa-exclamation-circle"></i>
-		<?=htmlspecialchars(_("The requested page could not be served due to an internal server error."))?>
-		<?=htmlspecialchars(_("Please try again later."))?>
+		<?=htmlspecialchars(__("The requested page could not be served due to an internal server error."))?>
+		<?=htmlspecialchars(__("Please try again later."))?>
 	</div>
 	</div>
 
 
 </div>
 </div>

+ 22 - 22
views/account.php

@@ -8,7 +8,7 @@
 			?>
 			?>
 			<div class="alert alert-danger">
 			<div class="alert alert-danger">
 				<i class="fal fa-fw fa-exclamation-circle"></i>
 				<i class="fal fa-fw fa-exclamation-circle"></i>
-				<?=htmlspecialchars(_("Your account has been banned. You will not be able to participate in any tests."))?>
+				<?=htmlspecialchars(__("Your account has been banned. You will not be able to participate in any tests."))?>
 			</div>
 			</div>
 			<?php
 			<?php
 			break;
 			break;
@@ -16,7 +16,7 @@
 			?>
 			?>
 			<div class="alert alert-warning">
 			<div class="alert alert-warning">
 				<i class="fal fa-fw fa-clock"></i>
 				<i class="fal fa-fw fa-clock"></i>
-				<?=htmlspecialchars(_("Your account is not verified. You need to submit proof of ID and get your account verified before you can participate in tests."))?>
+				<?=htmlspecialchars(__("Your account is not verified. You need to submit proof of ID and get your account verified before you can participate in tests."))?>
 			</div>
 			</div>
 			<?php
 			<?php
 			break;
 			break;
@@ -24,7 +24,7 @@
 			?>
 			?>
 			<div class="alert alert-warning">
 			<div class="alert alert-warning">
 				<i class="fal fa-fw fa-clock"></i>
 				<i class="fal fa-fw fa-clock"></i>
-				<?=htmlspecialchars(_("Your account is pending verification. You will be able to participate in tests once verified."))?>
+				<?=htmlspecialchars(__("Your account is pending verification. You will be able to participate in tests once verified."))?>
 			</div>
 			</div>
 			<?php
 			<?php
 			break;
 			break;
@@ -32,7 +32,7 @@
 			?>
 			?>
 			<div class="alert alert-info">
 			<div class="alert alert-info">
 				<i class="fal fa-fw fa-info-circle"></i>
 				<i class="fal fa-fw fa-info-circle"></i>
-				<?=htmlspecialchars(_("Your account is deactivated. You will not be able to participate in any tests until you reactivate your account."))?>
+				<?=htmlspecialchars(__("Your account is deactivated. You will not be able to participate in any tests until you reactivate your account."))?>
 			</div>
 			</div>
 			<?php
 			<?php
 			break;
 			break;
@@ -43,7 +43,7 @@
 	<div class="row">
 	<div class="row">
 		<div class="col-xl mb-3 mb-lg-0">
 		<div class="col-xl mb-3 mb-lg-0">
 			<h3>
 			<h3>
-				<?=htmlspecialchars(_("Main Menu"))?>
+				<?=htmlspecialchars(__("Main Menu"))?>
 			</h3>
 			</h3>
 			<div class="row">
 			<div class="row">
 			<?php
 			<?php
@@ -80,7 +80,7 @@
 			<?php
 			<?php
 			if($to_do) {
 			if($to_do) {
 				?>
 				?>
-				<h3><?=htmlspecialchars(_("To-Do"))?></h3>
+				<h3><?=htmlspecialchars(__("To-Do"))?></h3>
 
 
 				<div class="row">
 				<div class="row">
 				<?php
 				<?php
@@ -117,31 +117,31 @@
 			if(Core::$user->level != User::LEVEL_DEACTIVATED && !Core::$user->terms_accepted) {
 			if(Core::$user->level != User::LEVEL_DEACTIVATED && !Core::$user->terms_accepted) {
 				?>
 				?>
 				<div class="alert alert-danger">
 				<div class="alert alert-danger">
-					<p><i class="fas fa-info-circle"></i> <strong><?=htmlspecialchars(_("Important"))?></strong></p>
+					<p><i class="fas fa-info-circle"></i> <strong><?=htmlspecialchars(__("Important"))?></strong></p>
 
 
 					<?php
 					<?php
 					if(is_null(Core::$user->terms_accepted)) {
 					if(is_null(Core::$user->terms_accepted)) {
 						?>
 						?>
 						<p>
 						<p>
 							<a href="/terms-and-conditions">Terms and Conditions</a> have been published.
 							<a href="/terms-and-conditions">Terms and Conditions</a> have been published.
-							<?=sprintf(htmlspecialchars(_("%sTerms and Conditions%s have been published.")), "<a href=\"/terms-and-conditions\">", "</a>")?>
+							<?=sprintf(htmlspecialchars(__("%sTerms and Conditions%s have been published.")), "<a href=\"/terms-and-conditions\">", "</a>")?>
 						</p>
 						</p>
 						<p>
 						<p>
-							<?=sprintf(htmlspecialchars(_("Our records show that you have not accepted the %sTerms and Conditions%s on registration. Please take time to read our Terms and Conditions and then click Accept or Decline to continue.")), '<a href="/terms-and-conditions">', '</a>')?>
+							<?=sprintf(htmlspecialchars(__("Our records show that you have not accepted the %sTerms and Conditions%s on registration. Please take time to read our Terms and Conditions and then click Accept or Decline to continue.")), '<a href="/terms-and-conditions">', '</a>')?>
 						</p>
 						</p>
 						<?php
 						<?php
 					}
 					}
 					else {
 					else {
 						?>
 						?>
 						<p>
 						<p>
-							<?=sprintf(htmlspecialchars(_("Our records show that you have declined the %sTerms and Conditions. If you have changed your mind, please click Accept to continue or Decline for other actions.")), '<a href="/terms-and-conditions">', '</a>')?>
+							<?=sprintf(htmlspecialchars(__("Our records show that you have declined the %sTerms and Conditions. If you have changed your mind, please click Accept to continue or Decline for other actions.")), '<a href="/terms-and-conditions">', '</a>')?>
 						</p>
 						</p>
 						<?php
 						<?php
 					}
 					}
 					?>
 					?>
 
 
-					<a class="btn btn-success" href="/account/accept-terms"><?=htmlspecialchars(_("Accept"))?></a>
-					<a class="btn btn-danger" href="/account/decline-terms"><?=htmlspecialchars(_("Decline"))?></a>
+					<a class="btn btn-success" href="/account/accept-terms"><?=htmlspecialchars(__("Accept"))?></a>
+					<a class="btn btn-danger" href="/account/decline-terms"><?=htmlspecialchars(__("Decline"))?></a>
 				</div>
 				</div>
 				<?php
 				<?php
 			}
 			}
@@ -151,50 +151,50 @@
 			<?php
 			<?php
 			if(Core::$user->isCustomer() == false) {
 			if(Core::$user->isCustomer() == false) {
 				?>
 				?>
-				<h3><?=htmlspecialchars(_("Useful Documents"))?></h3>
+				<h3><?=htmlspecialchars(__("Useful Documents"))?></h3>
 
 
 				<div class="list-group mb-3">
 				<div class="list-group mb-3">
 					<a class="list-group-item list-group-item-action" href="/files/id_response.pdf">
 					<a class="list-group-item list-group-item-action" href="/files/id_response.pdf">
 						<i class="fal fa-fw fa-file-pdf"></i>
 						<i class="fal fa-fw fa-file-pdf"></i>
-						<?=htmlspecialchars(_("ID Response for Testers"))?>
+						<?=htmlspecialchars(__("ID Response for Testers"))?>
 					</a>
 					</a>
 					<a class="list-group-item list-group-item-action" href="/files/testing_methodology.pdf">
 					<a class="list-group-item list-group-item-action" href="/files/testing_methodology.pdf">
 						<i class="fal fa-fw fa-file-pdf"></i>
 						<i class="fal fa-fw fa-file-pdf"></i>
-						<?=htmlspecialchars(_("Age Verification Testing Methodology"))?>
+						<?=htmlspecialchars(__("Age Verification Testing Methodology"))?>
 					</a>
 					</a>
 					<a class="list-group-item list-group-item-action" href="/files/machine_categories.pdf">
 					<a class="list-group-item list-group-item-action" href="/files/machine_categories.pdf">
 						<i class="fal fa-fw fa-file-pdf"></i>
 						<i class="fal fa-fw fa-file-pdf"></i>
-						<?=htmlspecialchars(_("Machine Categories"))?>
+						<?=htmlspecialchars(__("Machine Categories"))?>
 					</a>
 					</a>
 					<a class="list-group-item list-group-item-action" href="/files/testing_procedure.pdf">
 					<a class="list-group-item list-group-item-action" href="/files/testing_procedure.pdf">
 						<i class="fal fa-fw fa-file-pdf"></i>
 						<i class="fal fa-fw fa-file-pdf"></i>
-						<?=htmlspecialchars(_("Testing Procedure"))?>
+						<?=htmlspecialchars(__("Testing Procedure"))?>
 					</a>
 					</a>
 				</div>
 				</div>
 				<?php
 				<?php
 			}
 			}
 			?>
 			?>
 
 
-			<h3><?=htmlspecialchars(_("Referrals"))?></h3>
+			<h3><?=htmlspecialchars(__("Referrals"))?></h3>
 
 
 			<div class="list-group mb-3">
 			<div class="list-group mb-3">
 				<div class="list-group-item d-flex justify-content-between">
 				<div class="list-group-item d-flex justify-content-between">
 					<span>
 					<span>
 						<i class="fal fa-fw fa-users"></i>
 						<i class="fal fa-fw fa-users"></i>
-						<?=htmlspecialchars(_("Users Referred"))?>:
+						<?=htmlspecialchars(__("Users Referred"))?>:
 					</span>
 					</span>
 					<span><?=number_format(count($referrals))?></span>
 					<span><?=number_format(count($referrals))?></span>
 				</div>
 				</div>
 				<div class="list-group-item d-flex justify-content-between">
 				<div class="list-group-item d-flex justify-content-between">
 					<span>
 					<span>
 						<i class="fal fa-fw fa-external-link"></i>
 						<i class="fal fa-fw fa-external-link"></i>
-						<?=htmlspecialchars(_("Referral Link"))?>:
+						<?=htmlspecialchars(__("Referral Link"))?>:
 					</span>
 					</span>
 
 
 					<span>
 					<span>
-						<a href="#" data-clipboard-text="<?=PROTOCOL?>://<?=DOMAIN?>/register?r=<?=Core::$user->id?>" data-toggle="tooltip" data-title="<?=htmlspecialchars(_("Copy to clipboard"))?>">
+						<a href="#" data-clipboard-text="<?=PROTOCOL?>://<?=DOMAIN?>/register?r=<?=Core::$user->id?>" data-toggle="tooltip" data-title="<?=htmlspecialchars(__("Copy to clipboard"))?>">
 							<i class="fal fa-fw fa-clipboard"></i>
 							<i class="fal fa-fw fa-clipboard"></i>
-							<?=htmlspecialchars(_("Copy to clipboard"))?>
+							<?=htmlspecialchars(__("Copy to clipboard"))?>
 						</a>
 						</a>
 					</span>
 					</span>
 
 

+ 9 - 9
views/account_deactivate.php

@@ -1,24 +1,24 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Deactivate Account"))?></h2>
+	<h2><?=htmlspecialchars(__("Deactivate Account"))?></h2>
 
 
-	<p><?=htmlspecialchars(_("By deactivating your account, you will:"))?></p>
+	<p><?=htmlspecialchars(__("By deactivating your account, you will:"))?></p>
 
 
 	<ul>
 	<ul>
-		<li><?=htmlspecialchars(_("No longer be assigned tests."))?></li>
-		<li><?=htmlspecialchars(_("No longer be able to participate in tests."))?></li>
-		<li><?=htmlspecialchars(_("Unassign yourself from all currently assigned tests."))?></li>
+		<li><?=htmlspecialchars(__("No longer be assigned tests."))?></li>
+		<li><?=htmlspecialchars(__("No longer be able to participate in tests."))?></li>
+		<li><?=htmlspecialchars(__("Unassign yourself from all currently assigned tests."))?></li>
 	</ul>
 	</ul>
 
 
-	<p><?=htmlspecialchars(_("You can always log into your account and reactivate the account should you wish to continue to use our services, however you will lose your currently assigned tests."))?></p>
+	<p><?=htmlspecialchars(__("You can always log into your account and reactivate the account should you wish to continue to use our services, however you will lose your currently assigned tests."))?></p>
 
 
 	<p class="text-danger">
 	<p class="text-danger">
-		<?=htmlspecialchars(_("This action cannot be undone."))?>
+		<?=htmlspecialchars(__("This action cannot be undone."))?>
 	</p>
 	</p>
 
 
 	<form method="post">
 	<form method="post">
-		<button class="btn btn-danger" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(_("Deactivate Account"))?></button>
-		<a class="btn btn-secondary" href="/account"><?=htmlspecialchars(_("Cancel"))?></a>
+		<button class="btn btn-danger" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(__("Deactivate Account"))?></button>
+		<a class="btn btn-secondary" href="/account"><?=htmlspecialchars(__("Cancel"))?></a>
 	</form>
 	</form>
 
 
 </div>
 </div>

+ 12 - 12
views/account_delete.php

@@ -1,28 +1,28 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Delete Account"))?></h2>
+	<h2><?=htmlspecialchars(__("Delete Account"))?></h2>
 
 
-	<p><?=htmlspecialchars(_("By deleting your account, you will:"))?></p>
+	<p><?=htmlspecialchars(__("By deleting your account, you will:"))?></p>
 
 
 	<ul>
 	<ul>
-		<li><?=htmlspecialchars(_("No longer be assigned tests."))?></li>
-		<li><?=htmlspecialchars(_("No longer be able to participate in tests."))?></li>
-		<li><?=htmlspecialchars(_("No longer be able to generate invoices for completed tests."))?></li>
-		<li><?=htmlspecialchars(_("Unassign yourself from all currently assigned tests."))?></li>
-		<li><?=htmlspecialchars(_("Delete all personal identifiable information associated with your account."))?></li>
+		<li><?=htmlspecialchars(__("No longer be assigned tests."))?></li>
+		<li><?=htmlspecialchars(__("No longer be able to participate in tests."))?></li>
+		<li><?=htmlspecialchars(__("No longer be able to generate invoices for completed tests."))?></li>
+		<li><?=htmlspecialchars(__("Unassign yourself from all currently assigned tests."))?></li>
+		<li><?=htmlspecialchars(__("Delete all personal identifiable information associated with your account."))?></li>
 	</ul>
 	</ul>
 
 
-	<p><?=htmlspecialchars(_("If you have participated in tests, we will need to keep only your age and gender for test reporting purposes. This information will not and cannot be used to identify you."))?></p>
+	<p><?=htmlspecialchars(__("If you have participated in tests, we will need to keep only your age and gender for test reporting purposes. This information will not and cannot be used to identify you."))?></p>
 
 
-	<p><?=htmlspecialchars(_("You will need to register again should you wish to continue to use our services."))?></p>
+	<p><?=htmlspecialchars(__("You will need to register again should you wish to continue to use our services."))?></p>
 
 
 	<p class="text-danger">
 	<p class="text-danger">
-		<?=htmlspecialchars(_("This action cannot be undone."))?>
+		<?=htmlspecialchars(__("This action cannot be undone."))?>
 	</p>
 	</p>
 
 
 	<form method="post">
 	<form method="post">
-		<button class="btn btn-lg btn-danger" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(_("Delete Account"))?></button>
-		<a class="btn btn-lg btn-secondary" href="/account"><?=htmlspecialchars(_("Cancel"))?></a>
+		<button class="btn btn-lg btn-danger" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(__("Delete Account"))?></button>
+		<a class="btn btn-lg btn-secondary" href="/account"><?=htmlspecialchars(__("Cancel"))?></a>
 	</form>
 	</form>
 
 
 </div>
 </div>

+ 8 - 8
views/address_add_form.php

@@ -1,22 +1,22 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
-	<h2><?=htmlspecialchars(_("Add Address"))?></h2>
+	<h2><?=htmlspecialchars(__("Add Address"))?></h2>
 
 
 	<form method="post">
 	<form method="post">
 		<div class="form-group">
 		<div class="form-group">
-			<label for="name"><?=htmlspecialchars(_("Name"))?></label>
-			<input class="form-control" type="text" name="name" id="name" placeholder="<?=htmlspecialchars(_("Enter name"))?>" value="<?=htmlspecialchars($user_address->name)?>" required />
-			<small class="text-muted form-text"><?=htmlspecialchars(_("A friendly name for this address. For example: Home, Uni, Workplace, etc..."))?></small>
+			<label for="name"><?=htmlspecialchars(__("Name"))?></label>
+			<input class="form-control" type="text" name="name" id="name" placeholder="<?=htmlspecialchars(__("Enter name"))?>" value="<?=htmlspecialchars($user_address->name)?>" required />
+			<small class="text-muted form-text"><?=htmlspecialchars(__("A friendly name for this address. For example: Home, Uni, Workplace, etc..."))?></small>
 		</div>
 		</div>
 		<div class="form-group">
 		<div class="form-group">
-			<label for="postal-code"><?=htmlspecialchars(_("Postal Code"))?></label>
-			<input class="form-control" type="text" name="postal_code" id="postal-code" placeholder="<?=htmlspecialchars(_("Enter postal code"))?>" value="<?=htmlspecialchars($user_address->postal_code)?>" required />
+			<label for="postal-code"><?=htmlspecialchars(__("Postal Code"))?></label>
+			<input class="form-control" type="text" name="postal_code" id="postal-code" placeholder="<?=htmlspecialchars(__("Enter postal code"))?>" value="<?=htmlspecialchars($user_address->postal_code)?>" required />
 		</div>
 		</div>
 		<div class="form-group">
 		<div class="form-group">
-			<label  for="country"><?=htmlspecialchars(_("Country"))?></label>
+			<label  for="country"><?=htmlspecialchars(__("Country"))?></label>
 			<select class="form-control" name="country" id="country" required>
 			<select class="form-control" name="country" id="country" required>
 			<?=Form::renderCountryOptions($user_address->country)?>
 			<?=Form::renderCountryOptions($user_address->country)?>
 			</select>
 			</select>
 		</div>
 		</div>
-		<button class="btn btn-primary" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(_("Add"))?></button>
+		<button class="btn btn-primary" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(__("Add"))?></button>
 	</form>
 	</form>
 </div>
 </div>

+ 17 - 17
views/address_edit_form.php

@@ -1,43 +1,43 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
-	<h2><?=htmlspecialchars(_("Edit Address"))?></h2>
+	<h2><?=htmlspecialchars(__("Edit Address"))?></h2>
 
 
 	<form method="post">
 	<form method="post">
 		<div class="row">
 		<div class="row">
 			<div class="col-lg">
 			<div class="col-lg">
 
 
 				<div class="form-group">
 				<div class="form-group">
-					<label for="name"><?=htmlspecialchars(_("Name"))?></label>
-					<input class="form-control" type="text" name="name" id="name" placeholder="<?=htmlspecialchars(_("Enter name"))?>" value="<?=htmlspecialchars($user_address->name)?>" required />
+					<label for="name"><?=htmlspecialchars(__("Name"))?></label>
+					<input class="form-control" type="text" name="name" id="name" placeholder="<?=htmlspecialchars(__("Enter name"))?>" value="<?=htmlspecialchars($user_address->name)?>" required />
 				</div>
 				</div>
 				<div class="form-group">
 				<div class="form-group">
-					<label for="address-1"><?=htmlspecialchars(_("Address Line 1"))?></label>
-					<input class="form-control" type="text" name="address_1" id="address-1" placeholder="<?=htmlspecialchars(_("Enter address line 1"))?>" value="<?=htmlspecialchars($user_address->address_1)?>" required />
+					<label for="address-1"><?=htmlspecialchars(__("Address Line 1"))?></label>
+					<input class="form-control" type="text" name="address_1" id="address-1" placeholder="<?=htmlspecialchars(__("Enter address line 1"))?>" value="<?=htmlspecialchars($user_address->address_1)?>" required />
 				</div>
 				</div>
 				<div class="form-group">
 				<div class="form-group">
-					<label for="address-2"><?=htmlspecialchars(_("Address Line 2"))?></label>
-					<input class="form-control" type="text" name="address_2" id="address-2" placeholder="<?=htmlspecialchars(_("Enter address line 2"))?>" value="<?=htmlspecialchars($user_address->address_2)?>" />
+					<label for="address-2"><?=htmlspecialchars(__("Address Line 2"))?></label>
+					<input class="form-control" type="text" name="address_2" id="address-2" placeholder="<?=htmlspecialchars(__("Enter address line 2"))?>" value="<?=htmlspecialchars($user_address->address_2)?>" />
 				</div>
 				</div>
 				<div class="form-group">
 				<div class="form-group">
-					<label for="city"><?=htmlspecialchars(_("City"))?></label>
-					<input class="form-control" type="text" name="city" id="city" placeholder="<?=htmlspecialchars(_("Enter city"))?>" value="<?=htmlspecialchars($user_address->city)?>" required />
+					<label for="city"><?=htmlspecialchars(__("City"))?></label>
+					<input class="form-control" type="text" name="city" id="city" placeholder="<?=htmlspecialchars(__("Enter city"))?>" value="<?=htmlspecialchars($user_address->city)?>" required />
 				</div>
 				</div>
 				<div class="form-group">
 				<div class="form-group">
-					<label for="county"><?=htmlspecialchars(_("County"))?></label>
-					<input class="form-control" type="text" name="county" id="county" placeholder="<?=htmlspecialchars(_("Enter county"))?>" value="<?=htmlspecialchars($user_address->county)?>" />
+					<label for="county"><?=htmlspecialchars(__("County"))?></label>
+					<input class="form-control" type="text" name="county" id="county" placeholder="<?=htmlspecialchars(__("Enter county"))?>" value="<?=htmlspecialchars($user_address->county)?>" />
 				</div>
 				</div>
 				<div class="form-group">
 				<div class="form-group">
-					<label for="postal-code"><?=htmlspecialchars(_("Postal Code"))?></label>
-					<input class="form-control" type="text" name="postal_code" id="postal-code" placeholder="<?=htmlspecialchars(_("Enter postal code"))?>" value="<?=htmlspecialchars($user_address->postal_code)?>" required />
+					<label for="postal-code"><?=htmlspecialchars(__("Postal Code"))?></label>
+					<input class="form-control" type="text" name="postal_code" id="postal-code" placeholder="<?=htmlspecialchars(__("Enter postal code"))?>" value="<?=htmlspecialchars($user_address->postal_code)?>" required />
 				</div>
 				</div>
 				<div class="form-group">
 				<div class="form-group">
-					<label  for="country"><?=htmlspecialchars(_("Country"))?></label>
+					<label  for="country"><?=htmlspecialchars(__("Country"))?></label>
 					<select class="form-control" name="country" id="country" required>
 					<select class="form-control" name="country" id="country" required>
 					<?=Form::renderCountryOptions($user_address->country)?>
 					<?=Form::renderCountryOptions($user_address->country)?>
 					</select>
 					</select>
 				</div>
 				</div>
 			</div>
 			</div>
 			<div class="col-lg">
 			<div class="col-lg">
-				<label><?=htmlspecialchars(_("Map"))?></label>
+				<label><?=htmlspecialchars(__("Map"))?></label>
 				<div class="mb-3" id="map" style="height: 382px;" data-maps data-lat="<?=$user_address->latitude?>" data-lng="<?=$user_address->longitude?>" data-zoom="14" data-marker="true" data-marker-draggable="true" data-marker-dragend-target="#map-data"></div>
 				<div class="mb-3" id="map" style="height: 382px;" data-maps data-lat="<?=$user_address->latitude?>" data-lng="<?=$user_address->longitude?>" data-zoom="14" data-marker="true" data-marker-draggable="true" data-marker-dragend-target="#map-data"></div>
 
 
 				<div id="map-data">
 				<div id="map-data">
@@ -46,7 +46,7 @@
 				</div>
 				</div>
 
 
 				<div class="form-group">
 				<div class="form-group">
-					<label for="max-radius-miles"><?=htmlspecialchars(_("Max Distance"))?></label>
+					<label for="max-radius-miles"><?=htmlspecialchars(__("Max Distance"))?></label>
 					<select class="form-control" name="max_radius_miles" id="max-radius-miles" required>
 					<select class="form-control" name="max_radius_miles" id="max-radius-miles" required>
 					<?php
 					<?php
 					foreach(UserAddress::RADIUSES as $radius) {
 					foreach(UserAddress::RADIUSES as $radius) {
@@ -63,6 +63,6 @@
 			</div>
 			</div>
 		</div>
 		</div>
 
 
-		<button class="btn btn-primary" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(_("Save"))?></button>
+		<button class="btn btn-primary" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(__("Save"))?></button>
 	</form>
 	</form>
 </div>
 </div>

+ 6 - 6
views/addresses.php

@@ -1,11 +1,11 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
-	<h2><?=htmlspecialchars(_("Addresses"))?></h2>
+	<h2><?=htmlspecialchars(__("Addresses"))?></h2>
 
 
 	<?php
 	<?php
 	if(empty($addresses)) {
 	if(empty($addresses)) {
 		?>
 		?>
 		<div class="alert alert-info">
 		<div class="alert alert-info">
-			<?=htmlspecialchars(_("There are no addresses associated with your account."))?>
+			<?=htmlspecialchars(__("There are no addresses associated with your account."))?>
 		</div>
 		</div>
 		<?php
 		<?php
 	}
 	}
@@ -24,7 +24,7 @@
 						<?php
 						<?php
 						if($address->invoice) {
 						if($address->invoice) {
 							?>
 							?>
-							<span class="badge badge-primary"><?=htmlspecialchars(_("Invoice"))?></span>
+							<span class="badge badge-primary"><?=htmlspecialchars(__("Invoice"))?></span>
 							<?php
 							<?php
 						}
 						}
 						?>
 						?>
@@ -35,12 +35,12 @@
 						<?php
 						<?php
 						if(!$address->invoice) {
 						if(!$address->invoice) {
 							?>
 							?>
-							<button type="submit" class="btn btn-outline-info" name="invoice" value="<?=$address->id?>"><?=htmlspecialchars(_("Set as Invoice Address"))?></button>
+							<button type="submit" class="btn btn-outline-info" name="invoice" value="<?=$address->id?>"><?=htmlspecialchars(__("Set as Invoice Address"))?></button>
 							<?php
 							<?php
 						}
 						}
 						?>
 						?>
 
 
-						<a class="btn btn-outline-primary" href="/account/addresses/edit/<?=$address->id?>"><?=htmlspecialchars(_("Edit"))?></a>
+						<a class="btn btn-outline-primary" href="/account/addresses/edit/<?=$address->id?>"><?=htmlspecialchars(__("Edit"))?></a>
 					</div>
 					</div>
 				</div>
 				</div>
 			</div>
 			</div>
@@ -50,6 +50,6 @@
 	?>
 	?>
 	</form>
 	</form>
 
 
-	<a class="btn btn-primary" href="/account/addresses/add"><?=htmlspecialchars(_("Add"))?></a>
+	<a class="btn btn-primary" href="/account/addresses/add"><?=htmlspecialchars(__("Add"))?></a>
 
 
 </div>
 </div>

+ 7 - 7
views/become_a_tester.php

@@ -1,16 +1,16 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
-	<h2><?=htmlspecialchars(_("Join our Team"))?></h2>
+	<h2><?=htmlspecialchars(__("Join our Team"))?></h2>
 
 
-	<p><?=htmlspecialchars(_("We are always actively recruiting testers!"))?></p>
+	<p><?=htmlspecialchars(__("We are always actively recruiting testers!"))?></p>
 
 
-	<p><?=htmlspecialchars(_("We pay a fee per test, straight into your chosen bank account on a fortnightly/monthly basis. Ideal for students who want to earn some extra money for very little effort."))?></p>
+	<p><?=htmlspecialchars(__("We pay a fee per test, straight into your chosen bank account on a fortnightly/monthly basis. Ideal for students who want to earn some extra money for very little effort."))?></p>
 
 
-	<p><?=htmlspecialchars(_("If you are aged 18-20 and look younger than your years - we want to hear from you."))?></p>
+	<p><?=htmlspecialchars(__("If you are aged 18-20 and look younger than your years - we want to hear from you."))?></p>
 
 
-	<p><?=htmlspecialchars(_("There is no commitment to undertake - simply be available when called upon to visit a site and complete a test. Full training is given and you can earn as you test."))?></p>
+	<p><?=htmlspecialchars(__("There is no commitment to undertake - simply be available when called upon to visit a site and complete a test. Full training is given and you can earn as you test."))?></p>
 
 
-	<p><a class="btn btn-lg btn-primary" href="/register"><?=htmlspecialchars(_("Join our team now!"))?></a></p>
+	<p><a class="btn btn-lg btn-primary" href="/register"><?=htmlspecialchars(__("Join our team now!"))?></a></p>
 
 
-	<em><?=htmlspecialchars(_("Your details will NOT be shared with any third party."))?></em>
+	<em><?=htmlspecialchars(__("Your details will NOT be shared with any third party."))?></em>
 
 
 </div>
 </div>

+ 9 - 9
views/contact.php

@@ -1,9 +1,9 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 	<div class="row">
 	<div class="row">
 		<div class="col-lg-4">
 		<div class="col-lg-4">
-			<h2><?=htmlspecialchars(_("Contact Info"))?></h2>
+			<h2><?=htmlspecialchars(__("Contact Info"))?></h2>
 
 
-			<p><?=htmlspecialchars(_("We are always happy to receive correspondence. We try to answer all emails within an hour during working hours."))?></p>
+			<p><?=htmlspecialchars(__("We are always happy to receive correspondence. We try to answer all emails within an hour during working hours."))?></p>
 
 
 			<strong><address><?=htmlspecialchars(COMPANY_NAME)?><br /><?=nl2br(ADDRESS)?></address></strong>
 			<strong><address><?=htmlspecialchars(COMPANY_NAME)?><br /><?=nl2br(ADDRESS)?></address></strong>
 
 
@@ -13,28 +13,28 @@
 			</ul>
 			</ul>
 		</div>
 		</div>
 		<div class="col-lg-8">
 		<div class="col-lg-8">
-			<h2><?=htmlspecialchars(_("Contact Form"))?></h2>
+			<h2><?=htmlspecialchars(__("Contact Form"))?></h2>
 			<form method="post" data-recaptcha-form>
 			<form method="post" data-recaptcha-form>
 				<div class="row">
 				<div class="row">
 					<div class="col-md">
 					<div class="col-md">
 						<div class="form-group">
 						<div class="form-group">
-							<input class="form-control" type="text" name="name" placeholder="<?=htmlspecialchars(_("Enter name"))?>" required />
+							<input class="form-control" type="text" name="name" placeholder="<?=htmlspecialchars(__("Enter name"))?>" required />
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="col-md">
 					<div class="col-md">
 						<div class="form-group">
 						<div class="form-group">
-							<input class="form-control" type="text" name="email" placeholder="<?=htmlspecialchars(_("Enter email address"))?>" required />
+							<input class="form-control" type="text" name="email" placeholder="<?=htmlspecialchars(__("Enter email address"))?>" required />
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="col-md">
 					<div class="col-md">
 						<div class="form-group">
 						<div class="form-group">
-							<input class="form-control" type="text" name="phone" placeholder="<?=htmlspecialchars(_("Enter contact number"))?>" required />
+							<input class="form-control" type="text" name="phone" placeholder="<?=htmlspecialchars(__("Enter contact number"))?>" required />
 						</div>
 						</div>
 					</div>
 					</div>
 				</div>
 				</div>
 
 
 				<div class="form-group">
 				<div class="form-group">
-					<textarea class="form-control mb-3" name="message" placeholder="<?=htmlspecialchars(_("Enter message"))?>" rows="8" required></textarea>
+					<textarea class="form-control mb-3" name="message" placeholder="<?=htmlspecialchars(__("Enter message"))?>" rows="8" required></textarea>
 				</div>
 				</div>
 
 
 				<?php
 				<?php
@@ -48,7 +48,7 @@
 						?>
 						?>
 						<div class="mb-3 text-muted">
 						<div class="mb-3 text-muted">
 							<small>
 							<small>
-								<?=sprintf(htmlspecialchars(_("This site is protected by reCAPTCHA and the Google %sPrivacy Policy%s and %sTerms of Service%s apply.")),
+								<?=sprintf(htmlspecialchars(__("This site is protected by reCAPTCHA and the Google %sPrivacy Policy%s and %sTerms of Service%s apply.")),
 								'<a href="https://policies.google.com/privacy">', '</a>',
 								'<a href="https://policies.google.com/privacy">', '</a>',
 								'<a href="https://policies.google.com/terms">', '</a>'
 								'<a href="https://policies.google.com/terms">', '</a>'
 								)?>
 								)?>
@@ -61,7 +61,7 @@
 				}
 				}
 				?>
 				?>
 
 
-				<button class="btn btn-primary" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(_("Send Message"))?></button>
+				<button class="btn btn-primary" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(__("Send Message"))?></button>
 			</form>
 			</form>
 		</div>
 		</div>
 	</div>
 	</div>

+ 1 - 1
views/error.php

@@ -1,6 +1,6 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Error"))?></h2>
+	<h2><?=htmlspecialchars(__("Error"))?></h2>
 
 
 	<div class="alert alert-danger">
 	<div class="alert alert-danger">
 		<i class="fal fa-fw fa-exclamation-circle"></i>
 		<i class="fal fa-fw fa-exclamation-circle"></i>

+ 12 - 12
views/footer.php

@@ -9,30 +9,30 @@
 
 
 				<div class="row">
 				<div class="row">
 					<div class="col-md mb-3">
 					<div class="col-md mb-3">
-						<h5><?=htmlspecialchars(_("Navigation"))?></h5>
+						<h5><?=htmlspecialchars(__("Navigation"))?></h5>
 						<ul class="nav flex-column">
 						<ul class="nav flex-column">
-							<li><a href="/home"><?=htmlspecialchars(_("Home"))?></a></li>
+							<li><a href="/home"><?=htmlspecialchars(__("Home"))?></a></li>
 
 
 							<?php
 							<?php
 							if(!Core::$user) {
 							if(!Core::$user) {
 								?>
 								?>
-								<li><a href="/services"><?=htmlspecialchars(_("Services"))?></a></li>
-								<li><a href="/become-a-tester"><?=htmlspecialchars(_("Become a Tester"))?></a></li>
-								<li><a href="/contact"><?=htmlspecialchars(_("Contact"))?></a></li>
-								<li><a href="/jobs"><?=htmlspecialchars(_("Jobs"))?></a></li>
+								<li><a href="/services"><?=htmlspecialchars(__("Services"))?></a></li>
+								<li><a href="/become-a-tester"><?=htmlspecialchars(__("Become a Tester"))?></a></li>
+								<li><a href="/contact"><?=htmlspecialchars(__("Contact"))?></a></li>
+								<li><a href="/jobs"><?=htmlspecialchars(__("Jobs"))?></a></li>
 								<?php
 								<?php
 							}
 							}
 							else {
 							else {
 								?>
 								?>
-								<li><a href="/contact"><?=htmlspecialchars(_("Contact"))?></a></li>
-								<li><a href="/account"><?=htmlspecialchars(_("Account"))?></a></li>
+								<li><a href="/contact"><?=htmlspecialchars(__("Contact"))?></a></li>
+								<li><a href="/account"><?=htmlspecialchars(__("Account"))?></a></li>
 								<?php
 								<?php
 							}
 							}
 							?>
 							?>
 						</ul>
 						</ul>
 					</div>
 					</div>
 					<div class="col-md mb-3">
 					<div class="col-md mb-3">
-						<h5><?=htmlspecialchars(_("Follow Us"))?></h5>
+						<h5><?=htmlspecialchars(__("Follow Us"))?></h5>
 						<ul class="nav flex-column">
 						<ul class="nav flex-column">
 							<li><i class="fab fa-fw fa-facebook"></i> <a href="https://www.facebook.com/checkpolicy" target="_blank">Facebook</a></li>
 							<li><i class="fab fa-fw fa-facebook"></i> <a href="https://www.facebook.com/checkpolicy" target="_blank">Facebook</a></li>
 							<?php
 							<?php
@@ -45,7 +45,7 @@
 						</ul>
 						</ul>
 					</div>
 					</div>
 					<div class="col-md mb-3">
 					<div class="col-md mb-3">
-						<h5><?=htmlspecialchars(_("Our Location"))?></h5>
+						<h5><?=htmlspecialchars(__("Our Location"))?></h5>
 						<ul class="nav flex-column">
 						<ul class="nav flex-column">
 							<li><i class="fal fa-fw fa-map-marker"></i> <?=htmlspecialchars(str_replace("\n", ", ", ADDRESS))?></li>
 							<li><i class="fal fa-fw fa-map-marker"></i> <?=htmlspecialchars(str_replace("\n", ", ", ADDRESS))?></li>
 							<li><i class="fal fa-fw fa-phone"></i> <a href="tel:<?=urlencode(PHONE)?>"><?=htmlspecialchars(PHONE)?></a></li>
 							<li><i class="fal fa-fw fa-phone"></i> <a href="tel:<?=urlencode(PHONE)?>"><?=htmlspecialchars(PHONE)?></a></li>
@@ -58,8 +58,8 @@
 				<div class="text-center">
 				<div class="text-center">
 					&copy; <?=date("Y")?> <?=APP_NAME?><br />
 					&copy; <?=date("Y")?> <?=APP_NAME?><br />
 					<small>
 					<small>
-						<a class="mx-1" href="/terms-and-conditions"><?=htmlspecialchars(_("Terms & Conditions"))?></a>
-						<a class="mx-1" href="/privacy-policy"><?=htmlspecialchars(_("Privacy Policy"))?></a>
+						<a class="mx-1" href="/terms-and-conditions"><?=htmlspecialchars(__("Terms & Conditions"))?></a>
+						<a class="mx-1" href="/privacy-policy"><?=htmlspecialchars(__("Privacy Policy"))?></a>
 					</small>
 					</small>
 				</div>
 				</div>
 			</div>
 			</div>

+ 12 - 12
views/header.php

@@ -25,7 +25,7 @@ if($print) $body_class = "print";
 
 
 		<meta property="og:site_name" content="<?=htmlspecialchars(APP_NAME)?>" />
 		<meta property="og:site_name" content="<?=htmlspecialchars(APP_NAME)?>" />
 		<meta property="og:title" content="<?=htmlspecialchars($page_title)?>" />
 		<meta property="og:title" content="<?=htmlspecialchars($page_title)?>" />
-		<meta property="og:description" content="<?=htmlspecialchars(_("Age Verification Testing and Training across the UK"))?>" />
+		<meta property="og:description" content="<?=htmlspecialchars(__("Age Verification Testing and Training across the UK"))?>" />
 		<meta property="og:type" content="website" />
 		<meta property="og:type" content="website" />
 		<meta property="og:image" content="<?=PROTOCOL?>://<?=DOMAIN?>/img/logo.png" />
 		<meta property="og:image" content="<?=PROTOCOL?>://<?=DOMAIN?>/img/logo.png" />
 		<meta property="og:image:alt" content="Check Policy logo" />
 		<meta property="og:image:alt" content="Check Policy logo" />
@@ -71,38 +71,38 @@ if($print) $body_class = "print";
 						if(!Core::isLoggedIn()) {
 						if(!Core::isLoggedIn()) {
 							?>
 							?>
 							<li class="nav-item">
 							<li class="nav-item">
-								<a class="nav-link" href="/services"><?=htmlspecialchars(_("Services"))?></a>
+								<a class="nav-link" href="/services"><?=htmlspecialchars(__("Services"))?></a>
 							</li>
 							</li>
 							<li class="nav-item">
 							<li class="nav-item">
-								<a class="nav-link" href="/become-a-tester"><?=htmlspecialchars(_("Become a Tester"))?></a>
+								<a class="nav-link" href="/become-a-tester"><?=htmlspecialchars(__("Become a Tester"))?></a>
 							</li>
 							</li>
 							<?php
 							<?php
 						}
 						}
 						?>
 						?>
 						<li class="nav-item">
 						<li class="nav-item">
-							<a class="nav-link" href="/contact"><?=htmlspecialchars(_("Contact"))?></a>
+							<a class="nav-link" href="/contact"><?=htmlspecialchars(__("Contact"))?></a>
 						</li>
 						</li>
 						<?php
 						<?php
 						if(Core::isLoggedIn()) {
 						if(Core::isLoggedIn()) {
 							?>
 							?>
 							<li class="nav-item">
 							<li class="nav-item">
-								<a class="nav-link" href="/account"><?=htmlspecialchars(_("Account"))?></a>
+								<a class="nav-link" href="/account"><?=htmlspecialchars(__("Account"))?></a>
 							</li>
 							</li>
 							<li class="nav-item">
 							<li class="nav-item">
-								<a class="nav-link" href="/log-out"><?=htmlspecialchars(_("Log Out"))?></a>
+								<a class="nav-link" href="/log-out"><?=htmlspecialchars(__("Log Out"))?></a>
 							</li>
 							</li>
 							<?php
 							<?php
 						}
 						}
 						else {
 						else {
 							?>
 							?>
 							<li class="nav-item">
 							<li class="nav-item">
-								<a class="nav-link" href="/jobs"><?=htmlspecialchars(_("Jobs"))?></a>
+								<a class="nav-link" href="/jobs"><?=htmlspecialchars(__("Jobs"))?></a>
 							</li>
 							</li>
 							<li class="nav-item">
 							<li class="nav-item">
-								<a class="nav-link" href="/register"><?=htmlspecialchars(_("Register"))?></a>
+								<a class="nav-link" href="/register"><?=htmlspecialchars(__("Register"))?></a>
 							</li>
 							</li>
 							<li class="nav-item">
 							<li class="nav-item">
-								<a class="nav-link" href="/log-in"><?=htmlspecialchars(_("Log In"))?></a>
+								<a class="nav-link" href="/log-in"><?=htmlspecialchars(__("Log In"))?></a>
 							</li>
 							</li>
 							<?php
 							<?php
 						}
 						}
@@ -122,7 +122,7 @@ if($print) $body_class = "print";
 			$style = (count(Core::$breadcrumbs) > 1) ? "margin-top: -1rem;" : "";
 			$style = (count(Core::$breadcrumbs) > 1) ? "margin-top: -1rem;" : "";
 			?>
 			?>
 			<div class="p-2 mb-3 bg-danger text-white text-center d-print-none" style="<?=$style?>">
 			<div class="p-2 mb-3 bg-danger text-white text-center d-print-none" style="<?=$style?>">
-				<strong><?=htmlspecialchars(_("PLEASE NOTE:"))?></strong> <?=htmlspecialchars(_("This is a development version of the site."))?>
+				<strong><?=htmlspecialchars(__("PLEASE NOTE:"))?></strong> <?=htmlspecialchars(__("This is a development version of the site."))?>
 			</div>
 			</div>
 			<?php
 			<?php
 		}
 		}
@@ -168,8 +168,8 @@ if($print) $body_class = "print";
 							<i class="fal fa-fw fa-info-circle"></i>
 							<i class="fal fa-fw fa-info-circle"></i>
 						</div>
 						</div>
 						<div class="col">
 						<div class="col">
-							<strong><?=htmlspecialchars(_("This site uses cookies to improve functionality and personalisation."))?></strong><br />
-							<?=htmlspecialchars(_("By continuing to use the site, you consent to our use of cookies and our privacy policy."))?>
+							<strong><?=htmlspecialchars(__("This site uses cookies to improve functionality and personalisation."))?></strong><br />
+							<?=htmlspecialchars(__("By continuing to use the site, you consent to our use of cookies and our privacy policy."))?>
 						</div>
 						</div>
 					</div>
 					</div>
 				</div>
 				</div>

+ 13 - 13
views/home.php

@@ -8,7 +8,7 @@
 		    <img class="d-block w-100" src="/img/blank_carousel.png" alt="Gaming Machine" style="background-image: url(/img/gaming_machine.jpg);" />
 		    <img class="d-block w-100" src="/img/blank_carousel.png" alt="Gaming Machine" style="background-image: url(/img/gaming_machine.jpg);" />
 			<div class="carousel-caption d-none d-md-block">
 			<div class="carousel-caption d-none d-md-block">
 				<div class="carousel-caption-inner">
 				<div class="carousel-caption-inner">
-					<h5><?=htmlspecialchars(_("Age Verification Testing and Training across the UK"))?></h5>
+					<h5><?=htmlspecialchars(__("Age Verification Testing and Training across the UK"))?></h5>
 				</div>
 				</div>
 			</div>
 			</div>
 		</div>
 		</div>
@@ -16,18 +16,18 @@
 		    <img class="d-block w-100" src="/img/blank_carousel.png" alt="Wine Aisle" style="background-image: url(/img/wine.jpg);" />
 		    <img class="d-block w-100" src="/img/blank_carousel.png" alt="Wine Aisle" style="background-image: url(/img/wine.jpg);" />
 			<div class="carousel-caption d-none d-md-block">
 			<div class="carousel-caption d-none d-md-block">
 				<div class="carousel-caption-inner">
 				<div class="carousel-caption-inner">
-					<h5><?=htmlspecialchars(_("Do you know how old your clients are? Do you ask for proof of ID if not sure?"))?></h5>
+					<h5><?=htmlspecialchars(__("Do you know how old your clients are? Do you ask for proof of ID if not sure?"))?></h5>
 				</div>
 				</div>
 			</div>
 			</div>
 		</div>
 		</div>
 	</div>
 	</div>
 	<a class="carousel-control-prev" href="#home-carousel" role="button" data-slide="prev">
 	<a class="carousel-control-prev" href="#home-carousel" role="button" data-slide="prev">
 		<span class="carousel-control-prev-icon" aria-hidden="true"></span>
 		<span class="carousel-control-prev-icon" aria-hidden="true"></span>
-		<span class="sr-only"><?=htmlspecialchars(_("Previous"))?></span>
+		<span class="sr-only"><?=htmlspecialchars(__("Previous"))?></span>
 	</a>
 	</a>
 	<a class="carousel-control-next" href="#home-carousel" role="button" data-slide="next">
 	<a class="carousel-control-next" href="#home-carousel" role="button" data-slide="next">
 		<span class="carousel-control-next-icon" aria-hidden="true"></span>
 		<span class="carousel-control-next-icon" aria-hidden="true"></span>
-		<span class="sr-only"><?=htmlspecialchars(_("Next"))?></span>
+		<span class="sr-only"><?=htmlspecialchars(__("Next"))?></span>
 	</a>
 	</a>
 </div>
 </div>
 
 
@@ -42,21 +42,21 @@
 	<div class="py-4">
 	<div class="py-4">
 
 
 		<div class="text-lg-center">
 		<div class="text-lg-center">
-			<h2><?=htmlspecialchars(_("What else can Check Policy do for you?"))?></h2>
+			<h2><?=htmlspecialchars(__("What else can Check Policy do for you?"))?></h2>
 		</div>
 		</div>
 
 
 		<div class="row">
 		<div class="row">
 			<div class="col-xl">
 			<div class="col-xl">
-				<h3><?=htmlspecialchars(_("Immediate Test Results"))?></h3>
-				<p><?=htmlspecialchars(_("All our testers provide live test results or at least as live as a data connection will allow. Once the test has been completed, you will get the result emailed to you immediately with total transparency. We believe you need the results, whether good or bad, to satisfy guidelines and regulations."))?></p>
+				<h3><?=htmlspecialchars(__("Immediate Test Results"))?></h3>
+				<p><?=htmlspecialchars(__("All our testers provide live test results or at least as live as a data connection will allow. Once the test has been completed, you will get the result emailed to you immediately with total transparency. We believe you need the results, whether good or bad, to satisfy guidelines and regulations."))?></p>
 			</div>
 			</div>
 			<div class="col-xl">
 			<div class="col-xl">
-				<h3><?=htmlspecialchars(_("Test Certificates Awarded"))?></h3>
-				<p><?=htmlspecialchars(_("If you pass the test, then you will be awarded a certificate of evidence to prove you and your team (if applicable) are following guidelines and regulations. You can decide whether to frame it to show clients or file it to show any future testing authority. It's up to you."))?></p>
+				<h3><?=htmlspecialchars(__("Test Certificates Awarded"))?></h3>
+				<p><?=htmlspecialchars(__("If you pass the test, then you will be awarded a certificate of evidence to prove you and your team (if applicable) are following guidelines and regulations. You can decide whether to frame it to show clients or file it to show any future testing authority. It's up to you."))?></p>
 			</div>
 			</div>
 			<div class="col-xl">
 			<div class="col-xl">
-				<h3><?=htmlspecialchars(_("Ongoing Training & Testing"))?></h3>
-				<p><?=htmlspecialchars(_("Should you fail the test, we would obviously like to provide you with support and ongoing training to improve your results for the next time. With our training we will highlight your weaknesses and strengths so your business is following the required regulations."))?></p>
+				<h3><?=htmlspecialchars(__("Ongoing Training & Testing"))?></h3>
+				<p><?=htmlspecialchars(__("Should you fail the test, we would obviously like to provide you with support and ongoing training to improve your results for the next time. With our training we will highlight your weaknesses and strengths so your business is following the required regulations."))?></p>
 			</div>
 			</div>
 		</div>
 		</div>
 	</div>
 	</div>
@@ -65,8 +65,8 @@
 		<div class="col-sm align-self-center mb-3 text-center">
 		<div class="col-sm align-self-center mb-3 text-center">
 			<i class="fab fa-whatsapp fa-4x mb-3"></i>
 			<i class="fab fa-whatsapp fa-4x mb-3"></i>
 			<div class="lead">
 			<div class="lead">
-				<?=sprintf(htmlspecialchars(_("Call or WhatsApp us on %s")), PHONE)?><br />
-				<small><?=htmlspecialchars(_("Calls are charged at mobile call rates"))?></small>
+				<?=sprintf(htmlspecialchars(__("Call or WhatsApp us on %s")), PHONE)?><br />
+				<small><?=htmlspecialchars(__("Calls are charged at mobile call rates"))?></small>
 			</div>
 			</div>
 		</div>
 		</div>
 	</div>
 	</div>

+ 8 - 8
views/jobs.php

@@ -1,19 +1,19 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
-	<h2><?=htmlspecialchars(_("We are recruiting!"))?></h2>
+	<h2><?=htmlspecialchars(__("We are recruiting!"))?></h2>
 
 
-	<p><?=htmlspecialchars(_("We are looking for testers nationwide!"))?></p>
+	<p><?=htmlspecialchars(__("We are looking for testers nationwide!"))?></p>
 
 
-	<p><?=htmlspecialchars(_("The job entails visiting Gaming Arcades with a view to perform Age Verification Checking - getting challenged for ID."))?></p>
+	<p><?=htmlspecialchars(__("The job entails visiting Gaming Arcades with a view to perform Age Verification Checking - getting challenged for ID."))?></p>
 
 
-	<p><?=htmlspecialchars(_("Full training will be given by webinar, videos and telephone."))?></p>
+	<p><?=htmlspecialchars(__("Full training will be given by webinar, videos and telephone."))?></p>
 
 
-	<p><?=htmlspecialchars(_("We pay £10 per visit which will last a maximum of 5 minutes!"))?></p>
+	<p><?=htmlspecialchars(__("We pay £10 per visit which will last a maximum of 5 minutes!"))?></p>
 
 
-	<p><?=htmlspecialchars(_("Register to get your pack now!"))?></p>
+	<p><?=htmlspecialchars(__("Register to get your pack now!"))?></p>
 
 
-	<p><?=htmlspecialchars(_("Our new testing campaign begins in January - so be quick and register."))?></p>
+	<p><?=htmlspecialchars(__("Our new testing campaign begins in January - so be quick and register."))?></p>
 
 
-	<p><em><?=htmlspecialchars(_("Please note that NONE of your details will be shared with any third party apart from your photo which may have to be provided to our clients should they have a need to confirm CCTV identity."))?></em></p>
+	<p><em><?=htmlspecialchars(__("Please note that NONE of your details will be shared with any third party apart from your photo which may have to be provided to our clients should they have a need to confirm CCTV identity."))?></em></p>
 
 
 
 
 </div>
 </div>

+ 7 - 7
views/log_in.php

@@ -1,29 +1,29 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Log In"))?></h2>
+	<h2><?=htmlspecialchars(__("Log In"))?></h2>
 
 
 	<form method="post">
 	<form method="post">
 
 
 		<div class="row">
 		<div class="row">
 			<div class="col-lg-8 offset-lg-2">
 			<div class="col-lg-8 offset-lg-2">
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label" for="email"><?=htmlspecialchars(_("Email Address"))?></label>
+					<label class="col-sm-4 col-form-label" for="email"><?=htmlspecialchars(__("Email Address"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="email" name="email" placeholder="<?=htmlspecialchars(_("Enter email address"))?>" required />
+						<input class="form-control" type="email" name="email" placeholder="<?=htmlspecialchars(__("Enter email address"))?>" required />
 					</div>
 					</div>
 				</div>
 				</div>
 
 
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label" for="password"><?=htmlspecialchars(_("Password"))?></label>
+					<label class="col-sm-4 col-form-label" for="password"><?=htmlspecialchars(__("Password"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="password" name="password" placeholder="<?=htmlspecialchars(_("Enter password"))?>" required />
+						<input class="form-control" type="password" name="password" placeholder="<?=htmlspecialchars(__("Enter password"))?>" required />
 					</div>
 					</div>
 				</div>
 				</div>
 
 
 				<div class="row">
 				<div class="row">
 					<div class="col-sm offset-sm-4">
 					<div class="col-sm offset-sm-4">
-						<button class="btn btn-primary" type="submit" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>"><?=htmlspecialchars(_("Log In"))?></button>
-						<a class="btn btn-secondary" href="/reset-password"><?=htmlspecialchars(_("Forgot Password"))?></a>
+						<button class="btn btn-primary" type="submit" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>"><?=htmlspecialchars(__("Log In"))?></button>
+						<a class="btn btn-secondary" href="/reset-password"><?=htmlspecialchars(__("Forgot Password"))?></a>
 					</div>
 					</div>
 				</div>
 				</div>
 
 

+ 7 - 7
views/modal_services_1.php

@@ -3,23 +3,23 @@
 		<div class="modal-content">
 		<div class="modal-content">
 			<form>
 			<form>
 				<div class="modal-header">
 				<div class="modal-header">
-					<h5 class="modal-title"><strong><?=htmlspecialchars(_("Age-Related Products"))?></strong></h5>
+					<h5 class="modal-title"><strong><?=htmlspecialchars(__("Age-Related Products"))?></strong></h5>
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
 						<span aria-hidden="true">&times;</span>
 						<span aria-hidden="true">&times;</span>
 					</button>
 					</button>
 				</div>
 				</div>
 				<div class="modal-body">
 				<div class="modal-body">
 
 
-					<p><img class="img-fluid" src="/img/cigarettes.jpg" alt="<?=htmlspecialchars(_("Cigarettes"))?>" /></p>
+					<p><img class="img-fluid" src="/img/cigarettes.jpg" alt="<?=htmlspecialchars(__("Cigarettes"))?>" /></p>
 
 
-					<p><?=htmlspecialchars(_("If you are selling age-related products or services such as cigarettes, alcohol and gambling. Then it is advisable to be tested independently to ensure you are able to identify and refuse persons wishing to purchase your services. Again this sounds very easy, to ask someones age and verify it, but in reality it's quite an issue."))?></p>
+					<p><?=htmlspecialchars(__("If you are selling age-related products or services such as cigarettes, alcohol and gambling. Then it is advisable to be tested independently to ensure you are able to identify and refuse persons wishing to purchase your services. Again this sounds very easy, to ask someones age and verify it, but in reality it's quite an issue."))?></p>
 
 
-					<p><?=htmlspecialchars(_("A simple check by one of Check Policy's mystery shoppers will determine whether you and your staff are adhering to guidelines when serving age-related products."))?></p>
+					<p><?=htmlspecialchars(__("A simple check by one of Check Policy's mystery shoppers will determine whether you and your staff are adhering to guidelines when serving age-related products."))?></p>
 
 
-					<p><?=htmlspecialchars(_("How it works:"))?><br />
-					<?=htmlspecialchars(_("One of our Shoppers will visit your site and try to purchase an age-related product or service. If they are successful and not asked any questions to verify their age you will fail. The test report will be sent to you immediately upon completing the test by our automated system; designed to show the full procedure of the test and after you can make a decision to opt for further training if needed."))?></p>
+					<p><?=htmlspecialchars(__("How it works:"))?><br />
+					<?=htmlspecialchars(__("One of our Shoppers will visit your site and try to purchase an age-related product or service. If they are successful and not asked any questions to verify their age you will fail. The test report will be sent to you immediately upon completing the test by our automated system; designed to show the full procedure of the test and after you can make a decision to opt for further training if needed."))?></p>
 
 
-					<p><?=htmlspecialchars(_("Check Policy is here to help and guide you along the way."))?></p>
+					<p><?=htmlspecialchars(__("Check Policy is here to help and guide you along the way."))?></p>
 				</div>
 				</div>
 			</form>
 			</form>
 		</div>
 		</div>

+ 6 - 6
views/modal_services_2.php

@@ -3,21 +3,21 @@
 		<div class="modal-content">
 		<div class="modal-content">
 			<form>
 			<form>
 				<div class="modal-header">
 				<div class="modal-header">
-					<h5 class="modal-title"><strong><?=htmlspecialchars(_("Age Verification Testing"))?></strong></h5>
+					<h5 class="modal-title"><strong><?=htmlspecialchars(__("Age Verification Testing"))?></strong></h5>
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
 						<span aria-hidden="true">&times;</span>
 						<span aria-hidden="true">&times;</span>
 					</button>
 					</button>
 				</div>
 				</div>
 				<div class="modal-body">
 				<div class="modal-body">
 
 
-					<p><img class="img-fluid" src="/img/driving_licence.jpg" alt="<?=htmlspecialchars(_("Driving Licence"))?>" /></p>
+					<p><img class="img-fluid" src="/img/driving_licence.jpg" alt="<?=htmlspecialchars(__("Driving Licence"))?>" /></p>
 
 
-					<p><?=htmlspecialchars(_("It sounds simple doesn't it, to verify someones age?!"))?><br />
-					<?=htmlspecialchars(_("However our tests have revealed that it's quite a challenge for some people to actually ask for ID when selling age-related products or services. It is against the law to sell age-related products or services to minors so it does become quite an issue."))?></p>
+					<p><?=htmlspecialchars(__("It sounds simple doesn't it, to verify someones age?!"))?><br />
+					<?=htmlspecialchars(__("However our tests have revealed that it's quite a challenge for some people to actually ask for ID when selling age-related products or services. It is against the law to sell age-related products or services to minors so it does become quite an issue."))?></p>
 
 
-					<p><?=htmlspecialchars(_("Our tests are designed to show if you or your team are asking the right questions and getting the honest answer in return."))?></p>
+					<p><?=htmlspecialchars(__("Our tests are designed to show if you or your team are asking the right questions and getting the honest answer in return."))?></p>
 
 
-					<p><?=htmlspecialchars(_("Training courses are designed to help you and your team meet the demanding requirements, by law, to verify age; and how to ask is very important without offending – keep safe and get training."))?></p>
+					<p><?=htmlspecialchars(__("Training courses are designed to help you and your team meet the demanding requirements, by law, to verify age; and how to ask is very important without offending – keep safe and get training."))?></p>
 				</div>
 				</div>
 			</form>
 			</form>
 		</div>
 		</div>

+ 4 - 4
views/modal_services_3.php

@@ -3,18 +3,18 @@
 		<div class="modal-content">
 		<div class="modal-content">
 			<form>
 			<form>
 				<div class="modal-header">
 				<div class="modal-header">
-					<h5 class="modal-title"><strong><?=htmlspecialchars(_("Bespoke Policy Checks"))?></strong></h5>
+					<h5 class="modal-title"><strong><?=htmlspecialchars(__("Bespoke Policy Checks"))?></strong></h5>
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
 						<span aria-hidden="true">&times;</span>
 						<span aria-hidden="true">&times;</span>
 					</button>
 					</button>
 				</div>
 				</div>
 				<div class="modal-body">
 				<div class="modal-body">
 
 
-					<p><img class="img-fluid" src="/img/office.jpg" alt="<?=htmlspecialchars(_("Office"))?>" /></p>
+					<p><img class="img-fluid" src="/img/office.jpg" alt="<?=htmlspecialchars(__("Office"))?>" /></p>
 
 
-					<p><?=htmlspecialchars(_("Unlike our other tests which are quite specific, this service is tailored to suit your business. We were approached by several clients to test their premises for various company policy related issues such as attire, attitude and so on."))?></p>
+					<p><?=htmlspecialchars(__("Unlike our other tests which are quite specific, this service is tailored to suit your business. We were approached by several clients to test their premises for various company policy related issues such as attire, attitude and so on."))?></p>
 
 
-					<p><?=htmlspecialchars(_("First impressions count, so if your staff aren't presenting the \"Face of the Company\" correctly, you may lose that client and all the possible benefits with it. A simple test by Check Policy will help you train your staff accordingly and keep them sharp with company policy."))?></p>
+					<p><?=htmlspecialchars(__("First impressions count, so if your staff aren't presenting the \"Face of the Company\" correctly, you may lose that client and all the possible benefits with it. A simple test by Check Policy will help you train your staff accordingly and keep them sharp with company policy."))?></p>
 				</div>
 				</div>
 			</form>
 			</form>
 		</div>
 		</div>

+ 9 - 9
views/modal_test_claim.php

@@ -11,33 +11,33 @@ $selected_day = date("j", $unix_default);
 		<div class="modal-content">
 		<div class="modal-content">
 			<form>
 			<form>
 				<div class="modal-header">
 				<div class="modal-header">
-					<h5 class="modal-title"><strong><?=htmlspecialchars(_("Confirm Selected Tests"))?></strong></h5>
+					<h5 class="modal-title"><strong><?=htmlspecialchars(__("Confirm Selected Tests"))?></strong></h5>
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="modal-close-button">
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close" id="modal-close-button">
 						<span aria-hidden="true">&times;</span>
 						<span aria-hidden="true">&times;</span>
 					</button>
 					</button>
 				</div>
 				</div>
 				<div class="modal-body">
 				<div class="modal-body">
 
 
-					<p><?=htmlspecialchars(_("You have selected the following tests:"))?></p>
+					<p><?=htmlspecialchars(__("You have selected the following tests:"))?></p>
 
 
 					<div class="list-group limit-height-2 mb-3">
 					<div class="list-group limit-height-2 mb-3">
 					</div>
 					</div>
 
 
-					<p><?=htmlspecialchars(_("The due date is:"))?> <strong class="text-danger"><?=date("l jS F", $unix_default)?></strong></p>
+					<p><?=htmlspecialchars(__("The due date is:"))?> <strong class="text-danger"><?=date("l jS F", $unix_default)?></strong></p>
 
 
-					<p><?=htmlspecialchars(_("By confirming, you agree that:"))?></p>
+					<p><?=htmlspecialchars(__("By confirming, you agree that:"))?></p>
 
 
 					<ul>
 					<ul>
-						<li><?=htmlspecialchars(_("You will execute these tests by the due date displayed above."))?></li>
-						<li><?=htmlspecialchars(_("Failure to complete tests by the due date without good reason may result in the tests being unassigned from yourself and limit your ability to claim tests in the future."))?></li>
+						<li><?=htmlspecialchars(__("You will execute these tests by the due date displayed above."))?></li>
+						<li><?=htmlspecialchars(__("Failure to complete tests by the due date without good reason may result in the tests being unassigned from yourself and limit your ability to claim tests in the future."))?></li>
 					</ul>
 					</ul>
 
 
 
 
 				</div>
 				</div>
 				<div class="modal-footer">
 				<div class="modal-footer">
-					<button type="button" class="btn btn-secondary" id="claim-cancel-button" data-dismiss="modal"><?=htmlspecialchars(_("Cancel"))?></button>
-					<button type="button" class="btn btn-primary" id="claim-confirm-button"><?=htmlspecialchars(_("Confirm"))?></button>
-					<a class="btn btn-primary" id="claim-finish-button" style="display: none;" href="/account/tests/available"><?=htmlspecialchars(_("Finish"))?></a>
+					<button type="button" class="btn btn-secondary" id="claim-cancel-button" data-dismiss="modal"><?=htmlspecialchars(__("Cancel"))?></button>
+					<button type="button" class="btn btn-primary" id="claim-confirm-button"><?=htmlspecialchars(__("Confirm"))?></button>
+					<a class="btn btn-primary" id="claim-finish-button" style="display: none;" href="/account/tests/available"><?=htmlspecialchars(__("Finish"))?></a>
 				</div>
 				</div>
 			</form>
 			</form>
 		</div>
 		</div>

+ 6 - 6
views/modal_test_invoice.php

@@ -4,7 +4,7 @@
 			<form method="get" action="" target="_blank">
 			<form method="get" action="" target="_blank">
 
 
 				<div class="modal-header">
 				<div class="modal-header">
-					<h5 class="modal-title"><strong><?=htmlspecialchars(_("Download Invoice"))?></strong></h5>
+					<h5 class="modal-title"><strong><?=htmlspecialchars(__("Download Invoice"))?></strong></h5>
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
 					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
 						<span aria-hidden="true">&times;</span>
 						<span aria-hidden="true">&times;</span>
 					</button>
 					</button>
@@ -12,22 +12,22 @@
 				<div class="modal-body">
 				<div class="modal-body">
 					<div class="row mb-3">
 					<div class="row mb-3">
 						<div class="col-sm-4 col-form-label">
 						<div class="col-sm-4 col-form-label">
-							<label for="travel-cost"><?=htmlspecialchars(_("Travel Costs"))?></label>
+							<label for="travel-cost"><?=htmlspecialchars(__("Travel Costs"))?></label>
 						</div>
 						</div>
 						<div class="col-sm">
 						<div class="col-sm">
 							<div class="input-group">
 							<div class="input-group">
 								<div class="input-group-prepend">
 								<div class="input-group-prepend">
-									<span class="input-group-text"><?=htmlspecialchars(_("£"))?></span>
+									<span class="input-group-text"><?=htmlspecialchars(__("£"))?></span>
 								</div>
 								</div>
 								<input class="form-control" type="number" step="0.01" min="0" name="travel_cost" id="travel-cost" value="0.00" />
 								<input class="form-control" type="number" step="0.01" min="0" name="travel_cost" id="travel-cost" value="0.00" />
 							</div>
 							</div>
-							<small class="form-text text-muted"><?=htmlspecialchars(_("You may be contacted for verification purposes."))?></small>
+							<small class="form-text text-muted"><?=htmlspecialchars(__("You may be contacted for verification purposes."))?></small>
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="row">
 					<div class="row">
 						<div class="col-sm offset-sm-4">
 						<div class="col-sm offset-sm-4">
-							<button class="btn btn-primary" type="submit"><?=htmlspecialchars(_("Download Invoice"))?></button>
-							<small class="form-text text-danger"><?=htmlspecialchars(_("Travel costs are locked after downloading for the first time, please ensure it is correct!"))?></small>
+							<button class="btn btn-primary" type="submit"><?=htmlspecialchars(__("Download Invoice"))?></button>
+							<small class="form-text text-danger"><?=htmlspecialchars(__("Travel costs are locked after downloading for the first time, please ensure it is correct!"))?></small>
 						</div>
 						</div>
 					</div>
 					</div>
 				</div>
 				</div>

+ 3 - 3
views/pagination.php

@@ -29,18 +29,18 @@ $next_url = $path . "?" . http_build_query(array_merge($nvp, ["page" => $page +
 				<li class="page-item <?=$previous_disabled?>">
 				<li class="page-item <?=$previous_disabled?>">
 					<a class="page-link" href="<?=htmlspecialchars($previous_url)?>">
 					<a class="page-link" href="<?=htmlspecialchars($previous_url)?>">
 						<span aria-hidden="true">&laquo;</span>
 						<span aria-hidden="true">&laquo;</span>
-						<span class="sr-only"><?=htmlspecialchars(_("Previous"))?></span>
+						<span class="sr-only"><?=htmlspecialchars(__("Previous"))?></span>
 					</a>
 					</a>
 				</li>
 				</li>
 				<li class="page-item">
 				<li class="page-item">
 					<a class="page-link" href="#" data-toggle="modal" data-target="#modal-page-jump">
 					<a class="page-link" href="#" data-toggle="modal" data-target="#modal-page-jump">
-						<?=sprintf(_("Page %s of %s"), number_format($page), number_format($page_count))?>
+						<?=sprintf(__("Page %s of %s"), number_format($page), number_format($page_count))?>
 					</a>
 					</a>
 				</li>
 				</li>
 				<li class="page-item <?=$next_disabled?>">
 				<li class="page-item <?=$next_disabled?>">
 					<a class="page-link" href="<?=htmlspecialchars($next_url)?>">
 					<a class="page-link" href="<?=htmlspecialchars($next_url)?>">
 						<span aria-hidden="true">&raquo;</span>
 						<span aria-hidden="true">&raquo;</span>
-						<span class="sr-only"><?=htmlspecialchars(_("Next"))?></span>
+						<span class="sr-only"><?=htmlspecialchars(__("Next"))?></span>
 					</a>
 					</a>
 				</li>
 				</li>
 			</ul>
 			</ul>

+ 7 - 7
views/practice_form.php

@@ -8,11 +8,11 @@ else if($test->status == Test::STATUS_STARTED) {
 }
 }
 else {
 else {
 	?>
 	?>
-	<h2><?=htmlspecialchars(_("Test Completed"))?></h2>
+	<h2><?=htmlspecialchars(__("Test Completed"))?></h2>
 
 
-	<p class="text-lead"><?=htmlspecialchars(_("Thanks for taking a practice test. You can find your submitted results below."))?></p>
+	<p class="text-lead"><?=htmlspecialchars(__("Thanks for taking a practice test. You can find your submitted results below."))?></p>
 
 
-	<p><a class="btn btn-lg btn-primary" href="/account/practice/<?=$template->id?>?reset=1"><?=htmlspecialchars(_("Start Over"))?></a></p>
+	<p><a class="btn btn-lg btn-primary" href="/account/practice/<?=$template->id?>?reset=1"><?=htmlspecialchars(__("Start Over"))?></a></p>
 	<?php
 	<?php
 
 
 	$values = $test->getValues();
 	$values = $test->getValues();
@@ -38,7 +38,7 @@ else {
 					<?=htmlspecialchars($field->label)?>
 					<?=htmlspecialchars($field->label)?>
 				</div>
 				</div>
 				<div class="col-sm">
 				<div class="col-sm">
-					<a class="btn btn-primary" href="/account/practice/<?=$template->id?>/files/<?=htmlspecialchars($name)?>" target="_blank"><?=htmlspecialchars(_("View Image"))?></a>
+					<a class="btn btn-primary" href="/account/practice/<?=$template->id?>/files/<?=htmlspecialchars($name)?>" target="_blank"><?=htmlspecialchars(__("View Image"))?></a>
 				</div>
 				</div>
 			</div>
 			</div>
 			<?php
 			<?php
@@ -53,17 +53,17 @@ else {
 
 
 	<hr />
 	<hr />
 
 
-	<h3><?=htmlspecialchars(_("Test Date/Time"))?></h3>
+	<h3><?=htmlspecialchars(__("Test Date/Time"))?></h3>
 
 
 	<div class="row mb-1">
 	<div class="row mb-1">
-		<label class="col-sm-4 col-form-label"><?=htmlspecialchars(_("Test Start"))?></label>
+		<label class="col-sm-4 col-form-label"><?=htmlspecialchars(__("Test Start"))?></label>
 		<div class="col-sm">
 		<div class="col-sm">
 			<?=htmlspecialchars($test->dts_start)?>
 			<?=htmlspecialchars($test->dts_start)?>
 		</div>
 		</div>
 	</div>
 	</div>
 
 
 	<div class="row mb-1">
 	<div class="row mb-1">
-		<label class="col-sm-4 col-form-label"><?=htmlspecialchars(_("Test End"))?></label>
+		<label class="col-sm-4 col-form-label"><?=htmlspecialchars(__("Test End"))?></label>
 		<div class="col-sm">
 		<div class="col-sm">
 			<?=htmlspecialchars($test->dts_end)?>
 			<?=htmlspecialchars($test->dts_end)?>
 		</div>
 		</div>

+ 3 - 3
views/practice_template_select.php

@@ -1,12 +1,12 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Select Practice Form"))?></h2>
+	<h2><?=htmlspecialchars(__("Select Practice Form"))?></h2>
 
 
 	<?php
 	<?php
 	if(empty($templates)) {
 	if(empty($templates)) {
 		?>
 		?>
 		<div class="alert alert-info">
 		<div class="alert alert-info">
-			<?=htmlspecialchars(_("There are no practice forms available at the moment. Please try again later."))?>
+			<?=htmlspecialchars(__("There are no practice forms available at the moment. Please try again later."))?>
 		</div>
 		</div>
 		<?php
 		<?php
 	}
 	}
@@ -17,7 +17,7 @@
 		foreach($templates as $template) {
 		foreach($templates as $template) {
 			?>
 			?>
 			<a class="list-group-item list-group-item-action" href="/account/practice/<?=$template->id?>">
 			<a class="list-group-item list-group-item-action" href="/account/practice/<?=$template->id?>">
-				<?=sprintf(htmlspecialchars(_("Practice Form #%d")), $template->id)?>
+				<?=sprintf(htmlspecialchars(__("Practice Form #%d")), $template->id)?>
 			</a>
 			</a>
 			<?php
 			<?php
 		}
 		}

+ 30 - 30
views/register.php

@@ -4,12 +4,12 @@ $newsletter_consent_checked = ($user->newsletter_consent) ? "checked" : "";
 
 
 ?>
 ?>
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
-	<h2><?=htmlspecialchars(_("Register"))?></h2>
+	<h2><?=htmlspecialchars(__("Register"))?></h2>
 
 
-	<p><?=htmlspecialchars(_("Become a tester and earn £10 per test which should last no longer than 8 minutes!"))?></p>
+	<p><?=htmlspecialchars(__("Become a tester and earn £10 per test which should last no longer than 8 minutes!"))?></p>
 
 
 	<p>
 	<p>
-		<?=sprintf(htmlspecialchars(_("If you want more information on our security policy, please call us on %s (mobile call rate).")), PHONE)?>
+		<?=sprintf(htmlspecialchars(__("If you want more information on our security policy, please call us on %s (mobile call rate).")), PHONE)?>
 	</p>
 	</p>
 
 
 	<hr />
 	<hr />
@@ -20,10 +20,10 @@ $newsletter_consent_checked = ($user->newsletter_consent) ? "checked" : "";
 			<div class="col-lg-8 offset-lg-2">
 			<div class="col-lg-8 offset-lg-2">
 
 
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label" for="title"><?=htmlspecialchars(_("Title"))?></label>
+					<label class="col-sm-4 col-form-label" for="title"><?=htmlspecialchars(__("Title"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
 						<select class="form-control" name="title" id="title" required>
 						<select class="form-control" name="title" id="title" required>
-							<option value=""><?=htmlspecialchars(_("Select title"))?></option>
+							<option value=""><?=htmlspecialchars(__("Select title"))?></option>
 							<?php
 							<?php
 							foreach(User::titles() as $value => $display) {
 							foreach(User::titles() as $value => $display) {
 								$selected = ($user->title == $value) ? "selected" : "";
 								$selected = ($user->title == $value) ? "selected" : "";
@@ -36,22 +36,22 @@ $newsletter_consent_checked = ($user->newsletter_consent) ? "checked" : "";
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="first-name"><?=htmlspecialchars(_("First Name"))?></label>
+					<label class="col-sm-4 col-form-label"  for="first-name"><?=htmlspecialchars(__("First Name"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="text" name="first_name" id="first-name" placeholder="<?=htmlspecialchars(_("Enter first name"))?>" value="<?=htmlspecialchars($user->first_name)?>" required />
+						<input class="form-control" type="text" name="first_name" id="first-name" placeholder="<?=htmlspecialchars(__("Enter first name"))?>" value="<?=htmlspecialchars($user->first_name)?>" required />
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="last-name"><?=htmlspecialchars(_("Last Name"))?></label>
+					<label class="col-sm-4 col-form-label"  for="last-name"><?=htmlspecialchars(__("Last Name"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="text" name="last_name" id="last-name" placeholder="<?=htmlspecialchars(_("Enter last name"))?>" value="<?=htmlspecialchars($user->last_name)?>" required />
+						<input class="form-control" type="text" name="last_name" id="last-name" placeholder="<?=htmlspecialchars(__("Enter last name"))?>" value="<?=htmlspecialchars($user->last_name)?>" required />
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="gender"><?=htmlspecialchars(_("Gender"))?></label>
+					<label class="col-sm-4 col-form-label"  for="gender"><?=htmlspecialchars(__("Gender"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
 						<select class="form-control" name="gender" id="gender" required>
 						<select class="form-control" name="gender" id="gender" required>
-							<option value=""><?=htmlspecialchars(_("Select gender"))?></option>
+							<option value=""><?=htmlspecialchars(__("Select gender"))?></option>
 							<?php
 							<?php
 							foreach(User::genders() as $value => $display) {
 							foreach(User::genders() as $value => $display) {
 								$value = substr($value, 0, 1);
 								$value = substr($value, 0, 1);
@@ -65,22 +65,22 @@ $newsletter_consent_checked = ($user->newsletter_consent) ? "checked" : "";
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="email"><?=htmlspecialchars(_("Email Address"))?></label>
+					<label class="col-sm-4 col-form-label"  for="email"><?=htmlspecialchars(__("Email Address"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="email" name="email" id="email" placeholder="<?=htmlspecialchars(_("Enter email address"))?>" value="<?=htmlspecialchars($user->email)?>" required />
+						<input class="form-control" type="email" name="email" id="email" placeholder="<?=htmlspecialchars(__("Enter email address"))?>" value="<?=htmlspecialchars($user->email)?>" required />
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="phone"><?=htmlspecialchars(_("Mobile Number"))?></label>
+					<label class="col-sm-4 col-form-label"  for="phone"><?=htmlspecialchars(__("Mobile Number"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="phone" name="phone" id="phone" placeholder="<?=htmlspecialchars(_("Enter mobile number"))?>" value="<?=htmlspecialchars($user->phone)?>" required />
+						<input class="form-control" type="phone" name="phone" id="phone" placeholder="<?=htmlspecialchars(__("Enter mobile number"))?>" value="<?=htmlspecialchars($user->phone)?>" required />
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="password"><?=htmlspecialchars(_("Password"))?></label>
+					<label class="col-sm-4 col-form-label"  for="password"><?=htmlspecialchars(__("Password"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="password" name="password" id="password" placeholder="<?=htmlspecialchars(_("Enter password"))?>" required />
-						<small class="text-muted form-text"><?=sprintf(htmlspecialchars(_("At least %s6 characters%s. Must contain at least one %slowercase%s, %suppercase%s, %snumber%s and %sspecial%s character.")),
+						<input class="form-control" type="password" name="password" id="password" placeholder="<?=htmlspecialchars(__("Enter password"))?>" required />
+						<small class="text-muted form-text"><?=sprintf(htmlspecialchars(__("At least %s6 characters%s. Must contain at least one %slowercase%s, %suppercase%s, %snumber%s and %sspecial%s character.")),
 							'<span data-length-requirement>', '</span>',
 							'<span data-length-requirement>', '</span>',
 							'<span data-lowercase-requirement>', '</span>',
 							'<span data-lowercase-requirement>', '</span>',
 							'<span data-uppercase-requirement>', '</span>',
 							'<span data-uppercase-requirement>', '</span>',
@@ -90,28 +90,28 @@ $newsletter_consent_checked = ($user->newsletter_consent) ? "checked" : "";
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="password-confirm"><?=htmlspecialchars(_("Confirm Password"))?></label>
+					<label class="col-sm-4 col-form-label"  for="password-confirm"><?=htmlspecialchars(__("Confirm Password"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="password" name="password_confirm" id="password-confirm" placeholder="<?=htmlspecialchars(_("Confirm password"))?>" required />
+						<input class="form-control" type="password" name="password_confirm" id="password-confirm" placeholder="<?=htmlspecialchars(__("Confirm password"))?>" required />
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="date-of-birth"><?=htmlspecialchars(_("Date of Birth"))?></label>
+					<label class="col-sm-4 col-form-label"  for="date-of-birth"><?=htmlspecialchars(__("Date of Birth"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
 						<select class="form-control w-auto d-inline-block" name="date_of_birth_day" id="date-of-birth-day">
 						<select class="form-control w-auto d-inline-block" name="date_of_birth_day" id="date-of-birth-day">
-							<option value=""><?=htmlspecialchars(_("Day"))?></option>
+							<option value=""><?=htmlspecialchars(__("Day"))?></option>
 							<?php
 							<?php
 							Form::renderDayOptions();
 							Form::renderDayOptions();
 							?>
 							?>
 						</select>
 						</select>
 						<select class="form-control w-auto d-inline-block" name="date_of_birth_month" id="date-of-birth-month">
 						<select class="form-control w-auto d-inline-block" name="date_of_birth_month" id="date-of-birth-month">
-							<option value=""><?=htmlspecialchars(_("Month"))?></option>
+							<option value=""><?=htmlspecialchars(__("Month"))?></option>
 							<?php
 							<?php
 							Form::renderMonthOptions();
 							Form::renderMonthOptions();
 							?>
 							?>
 						</select>
 						</select>
 						<select class="form-control w-auto d-inline-block" name="date_of_birth_year" id="date-of-birth-year">
 						<select class="form-control w-auto d-inline-block" name="date_of_birth_year" id="date-of-birth-year">
-							<option value=""><?=htmlspecialchars(_("Year"))?></option>
+							<option value=""><?=htmlspecialchars(__("Year"))?></option>
 							<?php
 							<?php
 							Form::renderYearOptionsDescending();
 							Form::renderYearOptionsDescending();
 							?>
 							?>
@@ -119,13 +119,13 @@ $newsletter_consent_checked = ($user->newsletter_consent) ? "checked" : "";
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="postal-code"><?=htmlspecialchars(_("Postal Code"))?></label>
+					<label class="col-sm-4 col-form-label"  for="postal-code"><?=htmlspecialchars(__("Postal Code"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="text" name="postal_code" id="postal-code" placeholder="<?=htmlspecialchars(_("Enter postal code"))?>" value="<?=htmlspecialchars($user_address->postal_code)?>" required />
+						<input class="form-control" type="text" name="postal_code" id="postal-code" placeholder="<?=htmlspecialchars(__("Enter postal code"))?>" value="<?=htmlspecialchars($user_address->postal_code)?>" required />
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-3">
 				<div class="row mb-3">
-					<label class="col-sm-4 col-form-label" for="country"><?=htmlspecialchars(_("Country"))?></label>
+					<label class="col-sm-4 col-form-label" for="country"><?=htmlspecialchars(__("Country"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
 						<select class="form-control" name="country" id="country" required>
 						<select class="form-control" name="country" id="country" required>
 						<?=Form::renderCountryOptions($user_address->country)?>
 						<?=Form::renderCountryOptions($user_address->country)?>
@@ -135,7 +135,7 @@ $newsletter_consent_checked = ($user->newsletter_consent) ? "checked" : "";
 				<div class="row mb-1">
 				<div class="row mb-1">
 					<div class="col-sm offset-sm-4">
 					<div class="col-sm offset-sm-4">
 						<label>
 						<label>
-							<input type="checkbox" value="1" name="terms_accepted" /> <?=sprintf(htmlspecialchars(_("I agree to and have read the %sTerms and Conditions%s and %sPrivacy Policy%s")),
+							<input type="checkbox" value="1" name="terms_accepted" /> <?=sprintf(htmlspecialchars(__("I agree to and have read the %sTerms and Conditions%s and %sPrivacy Policy%s")),
 								'<a href="/terms-and-conditions" target="_blank">', '</a>',
 								'<a href="/terms-and-conditions" target="_blank">', '</a>',
 								'<a href="/privacy-policy" target="_blank">', '</a>'
 								'<a href="/privacy-policy" target="_blank">', '</a>'
 							)?>
 							)?>
@@ -144,7 +144,7 @@ $newsletter_consent_checked = ($user->newsletter_consent) ? "checked" : "";
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
 					<div class="col-sm offset-sm-4 align-self-center">
 					<div class="col-sm offset-sm-4 align-self-center">
-						<label><input type="checkbox" name="newsletter_content" id="newsletter-consent" value="1" <?=$newsletter_consent_checked?> /> <?=sprintf(htmlspecialchars(_("Opt-in to newsletters about %s")), APP_NAME)?></label>
+						<label><input type="checkbox" name="newsletter_content" id="newsletter-consent" value="1" <?=$newsletter_consent_checked?> /> <?=sprintf(htmlspecialchars(__("Opt-in to newsletters about %s")), APP_NAME)?></label>
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row">
 				<div class="row">
@@ -157,7 +157,7 @@ $newsletter_consent_checked = ($user->newsletter_consent) ? "checked" : "";
 						}
 						}
 						?>
 						?>
 
 
-						<button class="btn btn-primary" type="submit" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>"><?=htmlspecialchars(_("Register"))?></button>
+						<button class="btn btn-primary" type="submit" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>"><?=htmlspecialchars(__("Register"))?></button>
 					</div>
 					</div>
 				</div>
 				</div>
 
 

+ 9 - 9
views/reset_password.php

@@ -1,5 +1,5 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
-	<h2><?=htmlspecialchars(_("Reset Password"))?></h2>
+	<h2><?=htmlspecialchars(__("Reset Password"))?></h2>
 
 
 	<form method="post">
 	<form method="post">
 
 
@@ -9,10 +9,10 @@
 			if($token) {
 			if($token) {
 				?>
 				?>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="password"><?=htmlspecialchars(_("Password"))?></label>
+					<label class="col-sm-4 col-form-label"  for="password"><?=htmlspecialchars(__("Password"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="password" name="password" id="password" placeholder="<?=htmlspecialchars(_("Enter password"))?>" required />
-						<small class="text-muted form-text"><?=sprintf(htmlspecialchars(_("At least %s6 characters%s. Must contain at least one %slowercase%s, %suppercase%s, %snumber%s and %sspecial%s character.")),
+						<input class="form-control" type="password" name="password" id="password" placeholder="<?=htmlspecialchars(__("Enter password"))?>" required />
+						<small class="text-muted form-text"><?=sprintf(htmlspecialchars(__("At least %s6 characters%s. Must contain at least one %slowercase%s, %suppercase%s, %snumber%s and %sspecial%s character.")),
 							'<span data-length-requirement>', '</span>',
 							'<span data-length-requirement>', '</span>',
 							'<span data-lowercase-requirement>', '</span>',
 							'<span data-lowercase-requirement>', '</span>',
 							'<span data-uppercase-requirement>', '</span>',
 							'<span data-uppercase-requirement>', '</span>',
@@ -22,9 +22,9 @@
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="password-confirm"><?=htmlspecialchars(_("Confirm Password"))?></label>
+					<label class="col-sm-4 col-form-label"  for="password-confirm"><?=htmlspecialchars(__("Confirm Password"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="password" name="password_confirm" id="password-confirm" placeholder="<?=htmlspecialchars(_("Confirm password"))?>" required />
+						<input class="form-control" type="password" name="password_confirm" id="password-confirm" placeholder="<?=htmlspecialchars(__("Confirm password"))?>" required />
 					</div>
 					</div>
 				</div>
 				</div>
 				<?php
 				<?php
@@ -32,9 +32,9 @@
 			else {
 			else {
 				?>
 				?>
 				<div class="row mb-1">
 				<div class="row mb-1">
-					<label class="col-sm-4 col-form-label"  for="email"><?=htmlspecialchars(_("Email Address"))?></label>
+					<label class="col-sm-4 col-form-label"  for="email"><?=htmlspecialchars(__("Email Address"))?></label>
 					<div class="col-sm">
 					<div class="col-sm">
-						<input class="form-control" type="email" name="email" id="email" placeholder="<?=htmlspecialchars(_("Enter email address"))?>" required />
+						<input class="form-control" type="email" name="email" id="email" placeholder="<?=htmlspecialchars(__("Enter email address"))?>" required />
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="g-recaptcha my-3" data-sitekey="<?=GOOGLE_RECAPTCHA_SITE_KEY?>"></div>
 				<div class="g-recaptcha my-3" data-sitekey="<?=GOOGLE_RECAPTCHA_SITE_KEY?>"></div>
@@ -42,7 +42,7 @@
 			}
 			}
 			?>
 			?>
 
 
-				<button class="btn btn-primary" type="submit" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>"><?=htmlspecialchars(_("Submit"))?></button>
+				<button class="btn btn-primary" type="submit" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>"><?=htmlspecialchars(__("Submit"))?></button>
 			</div>
 			</div>
 		</div>
 		</div>
 	</form>
 	</form>

+ 12 - 12
views/services.php

@@ -1,17 +1,17 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Check Policy Services"))?></h2>
+	<h2><?=htmlspecialchars(__("Check Policy Services"))?></h2>
 
 
 	<div class="row">
 	<div class="row">
 		<div class="col-md-4 mb-3 text-center">
 		<div class="col-md-4 mb-3 text-center">
 			<a class="block-link" href="#" data-toggle="modal" data-target="#modal-services-1">
 			<a class="block-link" href="#" data-toggle="modal" data-target="#modal-services-1">
 				<div class="p-3 bg-danger text-white">
 				<div class="p-3 bg-danger text-white">
 					<strong>
 					<strong>
-						<?=htmlspecialchars(strtoupper(_("Age Related Products")))?>
+						<?=htmlspecialchars(strtoupper(__("Age Related Products")))?>
 					</strong>
 					</strong>
 				</div>
 				</div>
 				<div class="p-3 bg-dark text-white">
 				<div class="p-3 bg-dark text-white">
-					<?=htmlspecialchars(_("Testing your team to keep you and your clients safe."))?>
+					<?=htmlspecialchars(__("Testing your team to keep you and your clients safe."))?>
 				</div>
 				</div>
 			</a>
 			</a>
 		</div>
 		</div>
@@ -19,12 +19,12 @@
 			<a class="block-link" href="#" data-toggle="modal" data-target="#modal-services-2">
 			<a class="block-link" href="#" data-toggle="modal" data-target="#modal-services-2">
 				<div class="p-3 bg-danger text-white">
 				<div class="p-3 bg-danger text-white">
 					<strong>
 					<strong>
-						<?=htmlspecialchars(strtoupper(_("Age Verification Testing")))?>
+						<?=htmlspecialchars(strtoupper(__("Age Verification Testing")))?>
 					</strong>
 					</strong>
 				</div>
 				</div>
 				<div class="p-3 bg-dark text-white">
 				<div class="p-3 bg-dark text-white">
-					<?=htmlspecialchars(_("Being prepared."))?><br />
-					<?=htmlspecialchars(_("Better protected."))?>
+					<?=htmlspecialchars(__("Being prepared."))?><br />
+					<?=htmlspecialchars(__("Better protected."))?>
 				</div>
 				</div>
 			</a>
 			</a>
 		</div>
 		</div>
@@ -32,12 +32,12 @@
 			<a class="block-link" href="#" data-toggle="modal" data-target="#modal-services-3">
 			<a class="block-link" href="#" data-toggle="modal" data-target="#modal-services-3">
 				<div class="p-3 bg-danger text-white">
 				<div class="p-3 bg-danger text-white">
 					<strong>
 					<strong>
-						<?=htmlspecialchars(strtoupper(_("Bespoke Policy Checks")))?>
+						<?=htmlspecialchars(strtoupper(__("Bespoke Policy Checks")))?>
 					</strong>
 					</strong>
 				</div>
 				</div>
 				<div class="p-3 bg-dark text-white">
 				<div class="p-3 bg-dark text-white">
-					<?=htmlspecialchars(_("Need a specific check?"))?><br />
-					<?=htmlspecialchars(_("We can cover it!"))?>
+					<?=htmlspecialchars(__("Need a specific check?"))?><br />
+					<?=htmlspecialchars(__("We can cover it!"))?>
 				</div>
 				</div>
 			</a>
 			</a>
 		</div>
 		</div>
@@ -45,13 +45,13 @@
 
 
 	<hr />
 	<hr />
 
 
-	<h2><?=htmlspecialchars(_("Still not sure what service you need?"))?></h2>
+	<h2><?=htmlspecialchars(__("Still not sure what service you need?"))?></h2>
 
 
 	<p>
 	<p>
-		<?=sprintf(htmlspecialchars(_("Simply call us on %s and we will gladly walk you through the process to begin your testing and training with %s.")), '<strong>' . PHONE . '</strong>', APP_NAME)?>
+		<?=sprintf(htmlspecialchars(__("Simply call us on %s and we will gladly walk you through the process to begin your testing and training with %s.")), '<strong>' . PHONE . '</strong>', APP_NAME)?>
 	</p>
 	</p>
 	<p>
 	<p>
-		<?=sprintf(htmlspecialchars(_("Alternatively, complete the form on the %sContact%s page and we will contact you.")), '<a href="/contact">', '</a>')?>
+		<?=sprintf(htmlspecialchars(__("Alternatively, complete the form on the %sContact%s page and we will contact you.")), '<a href="/contact">', '</a>')?>
 	</p>
 	</p>
 
 
 
 

+ 36 - 36
views/settings.php

@@ -5,20 +5,20 @@ if(is_null($user->locale)) $user->locale = LOCALE;
 
 
 ?>
 ?>
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
-	<h2><?=htmlspecialchars(_("Settings"))?></h2>
+	<h2><?=htmlspecialchars(__("Settings"))?></h2>
 
 
 	<form method="post">
 	<form method="post">
 		<div class="row">
 		<div class="row">
 			<div class="col-lg-8 offset-lg-2">
 			<div class="col-lg-8 offset-lg-2">
 
 
 				<div class="card card-body mb-3">
 				<div class="card card-body mb-3">
-					<h3><?=htmlspecialchars(_("Personal"))?></h3>
+					<h3><?=htmlspecialchars(__("Personal"))?></h3>
 
 
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label" for="title"><?=htmlspecialchars(_("Title"))?></label>
+						<label class="col-sm-4 col-form-label" for="title"><?=htmlspecialchars(__("Title"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
 							<select class="form-control" name="title" id="title" required>
 							<select class="form-control" name="title" id="title" required>
-								<option value=""><?=htmlspecialchars(_("Select title"))?></option>
+								<option value=""><?=htmlspecialchars(__("Select title"))?></option>
 								<?php
 								<?php
 								foreach(User::titles() as $value => $display) {
 								foreach(User::titles() as $value => $display) {
 									$selected = ($user->title == $value) ? "selected" : "";
 									$selected = ($user->title == $value) ? "selected" : "";
@@ -31,46 +31,46 @@ if(is_null($user->locale)) $user->locale = LOCALE;
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label"  for="first-name"><?=htmlspecialchars(_("First Name"))?></label>
+						<label class="col-sm-4 col-form-label"  for="first-name"><?=htmlspecialchars(__("First Name"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
-							<input class="form-control" type="text" name="first_name" id="first-name" placeholder="<?=htmlspecialchars(_("Enter first name"))?>" value="<?=htmlspecialchars($user->first_name)?>" required />
+							<input class="form-control" type="text" name="first_name" id="first-name" placeholder="<?=htmlspecialchars(__("Enter first name"))?>" value="<?=htmlspecialchars($user->first_name)?>" required />
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label"  for="last-name"><?=htmlspecialchars(_("Last Name"))?></label>
+						<label class="col-sm-4 col-form-label"  for="last-name"><?=htmlspecialchars(__("Last Name"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
-							<input class="form-control" type="text" name="last_name" id="last-name" placeholder="<?=htmlspecialchars(_("Enter last name"))?>" value="<?=htmlspecialchars($user->last_name)?>" required />
+							<input class="form-control" type="text" name="last_name" id="last-name" placeholder="<?=htmlspecialchars(__("Enter last name"))?>" value="<?=htmlspecialchars($user->last_name)?>" required />
 						</div>
 						</div>
 					</div>
 					</div>
 				</div>
 				</div>
 
 
 				<div class="card card-body mb-3">
 				<div class="card card-body mb-3">
-					<h3><?=htmlspecialchars(_("Contact"))?></h3>
+					<h3><?=htmlspecialchars(__("Contact"))?></h3>
 
 
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label"  for="email"><?=htmlspecialchars(_("Email Address"))?></label>
+						<label class="col-sm-4 col-form-label"  for="email"><?=htmlspecialchars(__("Email Address"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
-							<input class="form-control" type="email" name="email" id="email" placeholder="<?=htmlspecialchars(_("Enter email address"))?>" value="<?=htmlspecialchars($user->email)?>" required />
+							<input class="form-control" type="email" name="email" id="email" placeholder="<?=htmlspecialchars(__("Enter email address"))?>" value="<?=htmlspecialchars($user->email)?>" required />
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="row mb-1">
 					<div class="row mb-1">
 						<div class="col-sm offset-sm-4 align-self-center">
 						<div class="col-sm offset-sm-4 align-self-center">
-							<label><input type="checkbox" name="newsletter_content" id="newsletter-consent" value="1" <?=$newsletter_consent_checked?> /> <?=sprintf(htmlspecialchars(_("Opt-in to newsletters about %s")), APP_NAME)?></label>
+							<label><input type="checkbox" name="newsletter_content" id="newsletter-consent" value="1" <?=$newsletter_consent_checked?> /> <?=sprintf(htmlspecialchars(__("Opt-in to newsletters about %s")), APP_NAME)?></label>
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label"  for="phone"><?=htmlspecialchars(_("Mobile Number"))?></label>
+						<label class="col-sm-4 col-form-label"  for="phone"><?=htmlspecialchars(__("Mobile Number"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
-							<input class="form-control" type="phone" name="phone" id="phone" placeholder="<?=htmlspecialchars(_("Enter mobile number"))?>" value="<?=htmlspecialchars($user->phone)?>" required />
+							<input class="form-control" type="phone" name="phone" id="phone" placeholder="<?=htmlspecialchars(__("Enter mobile number"))?>" value="<?=htmlspecialchars($user->phone)?>" required />
 						</div>
 						</div>
 					</div>
 					</div>
 				</div>
 				</div>
 
 
 				<div class="card card-body mb-3">
 				<div class="card card-body mb-3">
-					<h3><?=htmlspecialchars(_("Language"))?></h3>
+					<h3><?=htmlspecialchars(__("Language"))?></h3>
 
 
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label" for="locale"><?=htmlspecialchars(_("Language"))?></label>
+						<label class="col-sm-4 col-form-label" for="locale"><?=htmlspecialchars(__("Language"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
 							<select class="form-control" name="locale" id="locale">
 							<select class="form-control" name="locale" id="locale">
 							<?php
 							<?php
@@ -87,13 +87,13 @@ if(is_null($user->locale)) $user->locale = LOCALE;
 				</div>
 				</div>
 
 
 				<div class="card card-body mb-3">
 				<div class="card card-body mb-3">
-					<h3><?=htmlspecialchars(_("Security"))?></h3>
+					<h3><?=htmlspecialchars(__("Security"))?></h3>
 
 
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label" for="password"><?=htmlspecialchars(_("Password (if changing)"))?></label>
+						<label class="col-sm-4 col-form-label" for="password"><?=htmlspecialchars(__("Password (if changing)"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
-							<input class="form-control" type="password" name="password" id="password" autocomplete="new-password" placeholder="<?=htmlspecialchars(_("Enter password"))?>" />
-							<small class="text-muted form-text"><?=sprintf(htmlspecialchars(_("At least %s6 characters%s. Must contain at least one %slowercase%s, %suppercase%s, %snumber%s and %sspecial%s character.")),
+							<input class="form-control" type="password" name="password" id="password" autocomplete="new-password" placeholder="<?=htmlspecialchars(__("Enter password"))?>" />
+							<small class="text-muted form-text"><?=sprintf(htmlspecialchars(__("At least %s6 characters%s. Must contain at least one %slowercase%s, %suppercase%s, %snumber%s and %sspecial%s character.")),
 								'<span data-length-requirement>', '</span>',
 								'<span data-length-requirement>', '</span>',
 								'<span data-lowercase-requirement>', '</span>',
 								'<span data-lowercase-requirement>', '</span>',
 								'<span data-uppercase-requirement>', '</span>',
 								'<span data-uppercase-requirement>', '</span>',
@@ -103,16 +103,16 @@ if(is_null($user->locale)) $user->locale = LOCALE;
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label"  for="password-confirm"><?=htmlspecialchars(_("Confirm Password"))?></label>
+						<label class="col-sm-4 col-form-label"  for="password-confirm"><?=htmlspecialchars(__("Confirm Password"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
-							<input class="form-control" type="password" name="password_confirm" id="password-confirm" placeholder="<?=htmlspecialchars(_("Confirm password"))?>" />
+							<input class="form-control" type="password" name="password_confirm" id="password-confirm" placeholder="<?=htmlspecialchars(__("Confirm password"))?>" />
 						</div>
 						</div>
 					</div>
 					</div>
 				</div>
 				</div>
 				<div class="card card-body mb-3">
 				<div class="card card-body mb-3">
-					<h3><?=htmlspecialchars(_("Payment"))?></h3>
+					<h3><?=htmlspecialchars(__("Payment"))?></h3>
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label" for="preferred-payment-method"><?=htmlspecialchars(_("Preferred Payment Method"))?></label>
+						<label class="col-sm-4 col-form-label" for="preferred-payment-method"><?=htmlspecialchars(__("Preferred Payment Method"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
 							<select class="form-control" name="preferred_payment_method" id="preferred-payment-method">
 							<select class="form-control" name="preferred_payment_method" id="preferred-payment-method">
 								<?php
 								<?php
@@ -127,27 +127,27 @@ if(is_null($user->locale)) $user->locale = LOCALE;
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label"  for="bank-name"><?=htmlspecialchars(_("Bank Name"))?></label>
+						<label class="col-sm-4 col-form-label"  for="bank-name"><?=htmlspecialchars(__("Bank Name"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
-							<input class="form-control" type="text" name="bank_name" id="bank-name" placeholder="<?=htmlspecialchars(_("Enter bank name"))?>" value="<?=htmlspecialchars($user->bank_name)?>" />
+							<input class="form-control" type="text" name="bank_name" id="bank-name" placeholder="<?=htmlspecialchars(__("Enter bank name"))?>" value="<?=htmlspecialchars($user->bank_name)?>" />
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label"  for="bank-sort-code"><?=htmlspecialchars(_("Bank Sort Code"))?></label>
+						<label class="col-sm-4 col-form-label"  for="bank-sort-code"><?=htmlspecialchars(__("Bank Sort Code"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
-							<input class="form-control" type="text" name="bank_sort_code" id="bank-sort-code" placeholder="<?=htmlspecialchars(_("Enter bank sort code"))?>" value="<?=htmlspecialchars($user->bank_sort_code)?>" />
+							<input class="form-control" type="text" name="bank_sort_code" id="bank-sort-code" placeholder="<?=htmlspecialchars(__("Enter bank sort code"))?>" value="<?=htmlspecialchars($user->bank_sort_code)?>" />
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label"  for="bank-account-number"><?=htmlspecialchars(_("Bank Account Number"))?></label>
+						<label class="col-sm-4 col-form-label"  for="bank-account-number"><?=htmlspecialchars(__("Bank Account Number"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
-							<input class="form-control" type="text" name="bank_account_number" id="bank-account-number" placeholder="<?=htmlspecialchars(_("Enter bank account number"))?>" value="<?=htmlspecialchars($user->bank_account_number)?>" />
+							<input class="form-control" type="text" name="bank_account_number" id="bank-account-number" placeholder="<?=htmlspecialchars(__("Enter bank account number"))?>" value="<?=htmlspecialchars($user->bank_account_number)?>" />
 						</div>
 						</div>
 					</div>
 					</div>
 					<div class="row mb-1">
 					<div class="row mb-1">
-						<label class="col-sm-4 col-form-label" for="paypal-email"><?=htmlspecialchars(_("PayPal Email Address"))?></label>
+						<label class="col-sm-4 col-form-label" for="paypal-email"><?=htmlspecialchars(__("PayPal Email Address"))?></label>
 						<div class="col-sm">
 						<div class="col-sm">
-							<input class="form-control" type="email" name="paypal_email" id="paypal-email" placeholder="<?=htmlspecialchars(_("Enter PayPal email address"))?>" value="<?=htmlspecialchars($user->paypal_email)?>" />
+							<input class="form-control" type="email" name="paypal_email" id="paypal-email" placeholder="<?=htmlspecialchars(__("Enter PayPal email address"))?>" value="<?=htmlspecialchars($user->paypal_email)?>" />
 						</div>
 						</div>
 					</div>
 					</div>
 				</div>
 				</div>
@@ -157,19 +157,19 @@ if(is_null($user->locale)) $user->locale = LOCALE;
 						<?php
 						<?php
 						if(Core::$user->isTester()) {
 						if(Core::$user->isTester()) {
 							?>
 							?>
-							<a href="/account/deactivate"><?=htmlspecialchars(_("Deactivate Account..."))?></a><br />
+							<a href="/account/deactivate"><?=htmlspecialchars(__("Deactivate Account..."))?></a><br />
 							<?php
 							<?php
 						}
 						}
 						if(Core::$user->isDeactivated()) {
 						if(Core::$user->isDeactivated()) {
 							?>
 							?>
-							<a href="/account/reactivate"><?=htmlspecialchars(_("Reactivate Account"))?></a><br />
+							<a href="/account/reactivate"><?=htmlspecialchars(__("Reactivate Account"))?></a><br />
 							<?php
 							<?php
 						}
 						}
 						?>
 						?>
-						<a class="text-danger" href="/account/delete"><?=htmlspecialchars(_("Delete Account..."))?></a><br />
+						<a class="text-danger" href="/account/delete"><?=htmlspecialchars(__("Delete Account..."))?></a><br />
 					</div>
 					</div>
 					<div class="col text-right">
 					<div class="col text-right">
-						<button class="btn btn-primary" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(_("Save"))?></button>
+						<button class="btn btn-primary" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(__("Save"))?></button>
 					</div>
 					</div>
 				</div>
 				</div>
 			</div>
 			</div>

+ 16 - 16
views/submit_id.php

@@ -1,45 +1,45 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
-	<h2><?=htmlspecialchars(_("Submit ID"))?></h2>
+	<h2><?=htmlspecialchars(__("Submit ID"))?></h2>
 
 
 	<div class="row">
 	<div class="row">
 		<div class="col-md order-md-2">
 		<div class="col-md order-md-2">
-			<h3><?=htmlspecialchars(_("Important Info"))?></h3>
+			<h3><?=htmlspecialchars(__("Important Info"))?></h3>
 
 
 			<ul>
 			<ul>
 				<li>
 				<li>
-					<?=htmlspecialchars(_("Acceptable forms of ID include:"))?>
+					<?=htmlspecialchars(__("Acceptable forms of ID include:"))?>
 					<ul>
 					<ul>
-						<li><?=htmlspecialchars(_("Current EU/EEA passport."))?></li>
-						<li><?=htmlspecialchars(_("Current driver's licence."))?></li>
+						<li><?=htmlspecialchars(__("Current EU/EEA passport."))?></li>
+						<li><?=htmlspecialchars(__("Current driver's licence."))?></li>
 					</ul>
 					</ul>
 				</li>
 				</li>
-				<li><?=htmlspecialchars(_("A photo of you must be shown."))?></li>
-				<li><?=htmlspecialchars(_("Expired documents will not be accepted."))?></li>
-				<li><?=htmlspecialchars(_("Submitted images must be clear and not obscured in any way."))?></li>
-				<li><?=htmlspecialchars(_("Only JPEG format accepted."))?></li>
+				<li><?=htmlspecialchars(__("A photo of you must be shown."))?></li>
+				<li><?=htmlspecialchars(__("Expired documents will not be accepted."))?></li>
+				<li><?=htmlspecialchars(__("Submitted images must be clear and not obscured in any way."))?></li>
+				<li><?=htmlspecialchars(__("Only JPEG format accepted."))?></li>
 			</ul>
 			</ul>
 		</div>
 		</div>
 		<div class="col-md order-md-1">
 		<div class="col-md order-md-1">
 
 
-			<h3><?=htmlspecialchars(_("Submission Form"))?></h3>
+			<h3><?=htmlspecialchars(__("Submission Form"))?></h3>
 
 
 			<form method="post" enctype="multipart/form-data">
 			<form method="post" enctype="multipart/form-data">
 
 
 				<div class="form-group">
 				<div class="form-group">
-					<label for="id-document"><?=htmlspecialchars(_("ID Document"))?></label>
+					<label for="id-document"><?=htmlspecialchars(__("ID Document"))?></label>
 					<input class="form-control-file" type="file" name="id_document" id="id-document" accept="image/*" />
 					<input class="form-control-file" type="file" name="id_document" id="id-document" accept="image/*" />
-					<small class="form-text text-muted"><?=htmlspecialchars(_("Passport, driver's licence, etc."))?></small>
+					<small class="form-text text-muted"><?=htmlspecialchars(__("Passport, driver's licence, etc."))?></small>
 				</div>
 				</div>
 
 
 				<div class="form-group">
 				<div class="form-group">
-					<label for="photo"><?=htmlspecialchars(_("Photo"))?></label>
+					<label for="photo"><?=htmlspecialchars(__("Photo"))?></label>
 					<input class="form-control-file" type="file" name="photo" id="photo" accept="image/*" />
 					<input class="form-control-file" type="file" name="photo" id="photo" accept="image/*" />
-					<small class="form-text text-muted"><?=htmlspecialchars(_("Photo of yourself, selfie, etc."))?></small>
+					<small class="form-text text-muted"><?=htmlspecialchars(__("Photo of yourself, selfie, etc."))?></small>
 				</div>
 				</div>
 
 
-				<span class="text-danger"><?=htmlspecialchars(_("Please note that it may take a while for photos to upload. Please do not refresh the page when it is uploading."))?></span><br />
+				<span class="text-danger"><?=htmlspecialchars(__("Please note that it may take a while for photos to upload. Please do not refresh the page when it is uploading."))?></span><br />
 
 
-				<button class="btn btn-primary mt-3" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(_("Submit"))?></button>
+				<button class="btn btn-primary mt-3" type="submit" name="submit" value="<?=$_SESSION["csrf_token"]?>"><?=htmlspecialchars(__("Submit"))?></button>
 			</form>
 			</form>
 		</div>
 		</div>
 	</div>
 	</div>

+ 8 - 8
views/terms_decline.php

@@ -1,24 +1,24 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Decline Terms & Conditions"))?></h2>
+	<h2><?=htmlspecialchars(__("Decline Terms & Conditions"))?></h2>
 
 
 	<p>
 	<p>
-		<?=sprintf(htmlspecialchars(_("We are sorry that you have chosen not to accept our %sTerms and Conditions%s.")), '<a href="/terms-and-conditions">', '</a>')?>
+		<?=sprintf(htmlspecialchars(__("We are sorry that you have chosen not to accept our %sTerms and Conditions%s.")), '<a href="/terms-and-conditions">', '</a>')?>
 	</p>
 	</p>
 
 
-	<p><?=htmlspecialchars(_("Please select an action below:"))?></p>
+	<p><?=htmlspecialchars(__("Please select an action below:"))?></p>
 
 
 	<div class="list-group">
 	<div class="list-group">
 		<a class="list-group-item list-group-item-action" href="/account/deactivate">
 		<a class="list-group-item list-group-item-action" href="/account/deactivate">
-			<strong><?=htmlspecialchars(_("Deactivate Account"))?></strong><br />
-			<?=htmlspecialchars(_("Mark your account as deactivated. You will not be assigned any tests. You will be able to login to your account to reactivate your account and/or accept the Terms and Conditions if you choose to do so at a later date. You will be taken to a confirmation page before your account is deactivated."))?>
+			<strong><?=htmlspecialchars(__("Deactivate Account"))?></strong><br />
+			<?=htmlspecialchars(__("Mark your account as deactivated. You will not be assigned any tests. You will be able to login to your account to reactivate your account and/or accept the Terms and Conditions if you choose to do so at a later date. You will be taken to a confirmation page before your account is deactivated."))?>
 		</a>
 		</a>
 		<a class="list-group-item list-group-item-action text-danger" href="/account/delete">
 		<a class="list-group-item list-group-item-action text-danger" href="/account/delete">
-			<strong><?=htmlspecialchars(_("Delete Account"))?></strong><br />
-			<?=htmlspecialchars(_("Delete all personal identifiable information associated with your account. If you choose to use our services at a later date, you will be required to re-register. You will be taken to a confirmation page before your account is deleted."))?>
+			<strong><?=htmlspecialchars(__("Delete Account"))?></strong><br />
+			<?=htmlspecialchars(__("Delete all personal identifiable information associated with your account. If you choose to use our services at a later date, you will be required to re-register. You will be taken to a confirmation page before your account is deleted."))?>
 		</a>
 		</a>
 		<a class="list-group-item list-group-item-action text-success" href="/account/accept-terms">
 		<a class="list-group-item list-group-item-action text-success" href="/account/accept-terms">
-			<strong><?=htmlspecialchars(_("Accept Terms and Conditions"))?></strong>
+			<strong><?=htmlspecialchars(__("Accept Terms and Conditions"))?></strong>
 		</a>
 		</a>
 	</div>
 	</div>
 
 

+ 6 - 6
views/test_form.php

@@ -16,7 +16,7 @@ else if($test->status == Test::STATUS_PENDING_VERIFICATION) {
 	?>
 	?>
 	<div class="alert alert-info">
 	<div class="alert alert-info">
 		<i class="fal fa-fw fa-info-circle"></i>
 		<i class="fal fa-fw fa-info-circle"></i>
-		<?=htmlspecialchars(_("Answer as clearly and accurately as you can otherwise you may be contacted after the test for clarification and/or verification purposes."))?>
+		<?=htmlspecialchars(__("Answer as clearly and accurately as you can otherwise you may be contacted after the test for clarification and/or verification purposes."))?>
 	</div>
 	</div>
 
 
 	<form method="post" id="test-form">
 	<form method="post" id="test-form">
@@ -33,10 +33,10 @@ else if($test->status == Test::STATUS_PENDING_VERIFICATION) {
 	?>
 	?>
 		<div class="bg-light text-center p-3 mt-3">
 		<div class="bg-light text-center p-3 mt-3">
 			<input type="hidden" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>" />
 			<input type="hidden" name="submit" value="<?=htmlspecialchars($_SESSION["csrf_token"])?>" />
-			<button class="btn btn-block btn-primary" type="submit" id="test-submit-button"><?=htmlspecialchars(_("Submit Test Results"))?></button>
+			<button class="btn btn-block btn-primary" type="submit" id="test-submit-button"><?=htmlspecialchars(__("Submit Test Results"))?></button>
 			<small class="form-text text-muted d-none" id="test-no-internet-text">
 			<small class="form-text text-muted d-none" id="test-no-internet-text">
-				<span class="text-danger"><?=htmlspecialchars(_("No Internet Connectivity"))?></span><br />
-				<?=htmlspecialchars(_("Please check your Internet connectivity and try again."))?>
+				<span class="text-danger"><?=htmlspecialchars(__("No Internet Connectivity"))?></span><br />
+				<?=htmlspecialchars(__("Please check your Internet connectivity and try again."))?>
 			</small>
 			</small>
 			<small id="test-submit-status">
 			<small id="test-submit-status">
 
 
@@ -47,9 +47,9 @@ else if($test->status == Test::STATUS_PENDING_VERIFICATION) {
 }
 }
 else {
 else {
 	?>
 	?>
-	<h2><?=htmlspecialchars(_("Test Completed"))?></h2>
+	<h2><?=htmlspecialchars(__("Test Completed"))?></h2>
 	<div class="alert alert-success">
 	<div class="alert alert-success">
-		<?=sprintf(htmlspecialchars(_("This test is now completed. %sClick here%s to return to the Account page.")), '<a href="/account">', '</a>')?>
+		<?=sprintf(htmlspecialchars(__("This test is now completed. %sClick here%s to return to the Account page.")), '<a href="/account">', '</a>')?>
 	</div>
 	</div>
 	<?php
 	<?php
 }
 }

+ 12 - 12
views/test_list_assigned.php

@@ -2,14 +2,14 @@
 
 
 	<div class="row">
 	<div class="row">
 		<div class="col">
 		<div class="col">
-			<h2><?=htmlspecialchars(_("Tests"))?></h2>
+			<h2><?=htmlspecialchars(__("Tests"))?></h2>
 		</div>
 		</div>
 		<div class="col-auto">
 		<div class="col-auto">
 		<?php
 		<?php
 
 
 		if(Core::$user->can_claim) {
 		if(Core::$user->can_claim) {
 			?>
 			?>
-			<a class="btn btn-primary" href="/account/tests/available"><?=htmlspecialchars(_("Find Tests"))?></a>
+			<a class="btn btn-primary" href="/account/tests/available"><?=htmlspecialchars(__("Find Tests"))?></a>
 			<?php
 			<?php
 		}
 		}
 
 
@@ -17,12 +17,12 @@
 			?>
 			?>
 			<div class="dropdown d-inline">
 			<div class="dropdown d-inline">
 				<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="actions-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
 				<a class="btn btn-secondary dropdown-toggle" href="#" role="button" id="actions-button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
-					<?=htmlspecialchars(_("Actions"))?>
+					<?=htmlspecialchars(__("Actions"))?>
 				</a>
 				</a>
 
 
 				<div class="dropdown-menu" aria-labelledby="actions-button">
 				<div class="dropdown-menu" aria-labelledby="actions-button">
-					<a class="dropdown-item" href="/account/tests/kml"><?=htmlspecialchars(_("Export KML"))?></a>
-					<a class="dropdown-item" href="/account/tests/postal-codes"><?=htmlspecialchars(_("Export Postcodes"))?></a>
+					<a class="dropdown-item" href="/account/tests/kml"><?=htmlspecialchars(__("Export KML"))?></a>
+					<a class="dropdown-item" href="/account/tests/postal-codes"><?=htmlspecialchars(__("Export Postcodes"))?></a>
 				</div>
 				</div>
 			</div>
 			</div>
 			<?php
 			<?php
@@ -37,7 +37,7 @@
 	if(empty($tests)) {
 	if(empty($tests)) {
 		?>
 		?>
 		<div class="alert alert-info">
 		<div class="alert alert-info">
-			<?=htmlspecialchars(_("No tests have been assigned to you at this time."))?>
+			<?=htmlspecialchars(__("No tests have been assigned to you at this time."))?>
 		</div>
 		</div>
 		<?php
 		<?php
 	}
 	}
@@ -76,7 +76,7 @@
 					<div class="col-lg-8">
 					<div class="col-lg-8">
 						<div class="row">
 						<div class="row">
 							<div class="col-sm align-self-center">
 							<div class="col-sm align-self-center">
-								<strong><?=htmlspecialchars(_("Due:"))?> <?=$date_due?></strong><br />
+								<strong><?=htmlspecialchars(__("Due:"))?> <?=$date_due?></strong><br />
 								<em><?=htmlspecialchars($template->name)?></em>
 								<em><?=htmlspecialchars($template->name)?></em>
 							</div>
 							</div>
 							<div class="col-sm text-sm-center align-self-center">
 							<div class="col-sm text-sm-center align-self-center">
@@ -88,23 +88,23 @@
 							<?php
 							<?php
 							if($is_assigned) {
 							if($is_assigned) {
 								?>
 								?>
-								<a class="btn btn-outline-success" href="/account/tests/<?=$test->id?>/accept"><?=htmlspecialchars(_("Accept"))?></a>
-								<a class="btn btn-outline-danger" href="/account/tests/<?=$test->id?>/decline"><?=htmlspecialchars(_("Decline"))?></a>
+								<a class="btn btn-outline-success" href="/account/tests/<?=$test->id?>/accept"><?=htmlspecialchars(__("Accept"))?></a>
+								<a class="btn btn-outline-danger" href="/account/tests/<?=$test->id?>/decline"><?=htmlspecialchars(__("Decline"))?></a>
 								<?php
 								<?php
 							}
 							}
 							else if($is_confirmed) {
 							else if($is_confirmed) {
 								?>
 								?>
-								<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>"><?=htmlspecialchars(_("Begin"))?></a>
+								<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>"><?=htmlspecialchars(__("Begin"))?></a>
 								<?php
 								<?php
 							}
 							}
 							else if($is_started) {
 							else if($is_started) {
 								?>
 								?>
-								<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>"><?=htmlspecialchars(_("Continue"))?></a>
+								<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>"><?=htmlspecialchars(__("Continue"))?></a>
 								<?php
 								<?php
 							}
 							}
 							else if($is_unverified) {
 							else if($is_unverified) {
 								?>
 								?>
-								<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>"><?=htmlspecialchars(_("Amend"))?></a>
+								<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>"><?=htmlspecialchars(__("Amend"))?></a>
 								<?php
 								<?php
 							}
 							}
 							?>
 							?>

+ 13 - 13
views/test_list_completed.php

@@ -1,13 +1,13 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Completed Tests"))?></h2>
+	<h2><?=htmlspecialchars(__("Completed Tests"))?></h2>
 
 
 	<?php
 	<?php
 
 
 	if(empty($tests)) {
 	if(empty($tests)) {
 		?>
 		?>
 		<div class="alert alert-info">
 		<div class="alert alert-info">
-			<?=htmlspecialchars(_("You have not completed any tests yet."))?>
+			<?=htmlspecialchars(__("You have not completed any tests yet."))?>
 		</div>
 		</div>
 		<?php
 		<?php
 	}
 	}
@@ -24,7 +24,7 @@
 			?>
 			?>
 			<div class="alert alert-warning">
 			<div class="alert alert-warning">
 				<i class="fal fa-fw fa-exclamation-triangle"></i>
 				<i class="fal fa-fw fa-exclamation-triangle"></i>
-				<?=sprintf(htmlspecialchars(_("You have multiple addresses. %sClick here%s to manage your addresses and set one as the invoice address to enable the invoice link.")), '<a href="/account/addresses">', '</a>')?>
+				<?=sprintf(htmlspecialchars(__("You have multiple addresses. %sClick here%s to manage your addresses and set one as the invoice address to enable the invoice link.")), '<a href="/account/addresses">', '</a>')?>
 			</div>
 			</div>
 			<?php
 			<?php
 		}
 		}
@@ -32,7 +32,7 @@
 			?>
 			?>
 			<div class="alert alert-warning">
 			<div class="alert alert-warning">
 				<i class="fal fa-fw fa-exclamation-triangle"></i>
 				<i class="fal fa-fw fa-exclamation-triangle"></i>
-				<?=sprintf(htmlspecialchars(_("You have no valid payment method. %sClick here%s and verify your payment method settings are correct to enable the invoice link.")), '<a href="/account/settings">', '</a>')?>
+				<?=sprintf(htmlspecialchars(__("You have no valid payment method. %sClick here%s and verify your payment method settings are correct to enable the invoice link.")), '<a href="/account/settings">', '</a>')?>
 			</div>
 			</div>
 			<?php
 			<?php
 		}
 		}
@@ -47,7 +47,7 @@
 			$location = $test->getLocation();
 			$location = $test->getLocation();
 			$project = $test->getProject();
 			$project = $test->getProject();
 
 
-			$attire = $date_start = $time_start = $duration = _("N/A");
+			$attire = $date_start = $time_start = $duration = __("N/A");
 			$attire_class = $date_start_class = $time_start_class = $duration_class = $fee_class = "text-muted";
 			$attire_class = $date_start_class = $time_start_class = $duration_class = $fee_class = "text-muted";
 
 
 			date_default_timezone_set("UTC");
 			date_default_timezone_set("UTC");
@@ -62,7 +62,7 @@
 			if($test->dts_start && $test->dts_end) {
 			if($test->dts_start && $test->dts_end) {
 				$end_dt = new DateTime($test->dts_end);
 				$end_dt = new DateTime($test->dts_end);
 				$diff = $start_dt->diff($end_dt, true);
 				$diff = $start_dt->diff($end_dt, true);
-				$duration = $diff->format(_("%i min. %S sec."));
+				$duration = $diff->format(__("%i min. %S sec."));
 				$duration_class = "";
 				$duration_class = "";
 			}
 			}
 
 
@@ -72,16 +72,16 @@
 			$status_text = $test->getStatusText();
 			$status_text = $test->getStatusText();
 
 
 			$status_class = "secondary";
 			$status_class = "secondary";
-			$status_text = _("Pending");
+			$status_text = __("Pending");
 
 
 			if($test->status == Test::STATUS_CANCELLED) {
 			if($test->status == Test::STATUS_CANCELLED) {
 				$status_class = "danger";
 				$status_class = "danger";
-				$status_text = _("Rejected");
+				$status_text = __("Rejected");
 				$fee = "N/A";
 				$fee = "N/A";
 			}
 			}
 			if($test->status == Test::STATUS_COMPLETED) {
 			if($test->status == Test::STATUS_COMPLETED) {
 				$status_class = "success";
 				$status_class = "success";
-				$status_text = _("Accepted");
+				$status_text = __("Accepted");
 				$fee = $test->fee ? $test->fee : $project->default_tester_fee;
 				$fee = $test->fee ? $test->fee : $project->default_tester_fee;
 				$fee = "£" . $fee;
 				$fee = "£" . $fee;
 				$fee_class = "";
 				$fee_class = "";
@@ -93,12 +93,12 @@
 						<div class="col-xl">
 						<div class="col-xl">
 							<div class="row">
 							<div class="row">
 								<div class="col order-1 order-sm-1">
 								<div class="col order-1 order-sm-1">
-									<strong><?=htmlspecialchars(_("ID:"))?> <?=$test->id?></strong><br />
+									<strong><?=htmlspecialchars(__("ID:"))?> <?=$test->id?></strong><br />
 									<?php
 									<?php
 									if($test->status == Test::STATUS_COMPLETED && $can_invoice) {
 									if($test->status == Test::STATUS_COMPLETED && $can_invoice) {
 										?>
 										?>
 										<a href="#" data-toggle="modal" data-target="#modal-test-invoice" data-invoice data-id="<?=$test->id?>">
 										<a href="#" data-toggle="modal" data-target="#modal-test-invoice" data-invoice data-id="<?=$test->id?>">
-											<i class="fal fa-fw fa-external-link"></i> <?=htmlspecialchars(_("Invoice"))?>
+											<i class="fal fa-fw fa-external-link"></i> <?=htmlspecialchars(__("Invoice"))?>
 										</a>
 										</a>
 										<?php
 										<?php
 									}
 									}
@@ -124,12 +124,12 @@
 								</div>
 								</div>
 								<div class="col-sm <?=$fee_class?> align-self-xl-center">
 								<div class="col-sm <?=$fee_class?> align-self-xl-center">
 									<hr class="d-block d-sm-none" />
 									<hr class="d-block d-sm-none" />
-									<?=htmlspecialchars(_("Fee:"))?> <?=$fee?>
+									<?=htmlspecialchars(__("Fee:"))?> <?=$fee?>
 								</div>
 								</div>
 								<div class="col-sm <?=$attire_class?> align-self-xl-center">
 								<div class="col-sm <?=$attire_class?> align-self-xl-center">
 									<hr class="d-block d-sm-none" />
 									<hr class="d-block d-sm-none" />
 									<?=htmlspecialchars($attire)?><br />
 									<?=htmlspecialchars($attire)?><br />
-									<a href="/account/tests/<?=$test->id?>/selfie"><?=htmlspecialchars(_("View selfie."))?></a>
+									<a href="/account/tests/<?=$test->id?>/selfie"><?=htmlspecialchars(__("View selfie."))?></a>
 								</div>
 								</div>
 							</div>
 							</div>
 						</div>
 						</div>

+ 3 - 3
views/tests.php

@@ -1,13 +1,13 @@
 <div class="container mt-3 py-4">
 <div class="container mt-3 py-4">
 
 
-	<h2><?=htmlspecialchars(_("Tests"))?></h2>
+	<h2><?=htmlspecialchars(__("Tests"))?></h2>
 
 
 	<?php
 	<?php
 
 
 	if(empty($tests)) {
 	if(empty($tests)) {
 		?>
 		?>
 		<div class="alert alert-info">
 		<div class="alert alert-info">
-			<?=htmlspecialchars(_("You have no assigned tests at this time."))?>
+			<?=htmlspecialchars(__("You have no assigned tests at this time."))?>
 		</div>
 		</div>
 		<?php
 		<?php
 	}
 	}
@@ -25,7 +25,7 @@
 						<?=htmlspecialchars($location->getDisplayAddress())?>
 						<?=htmlspecialchars($location->getDisplayAddress())?>
 					</div>
 					</div>
 					<div class="col-auto align-self-center">
 					<div class="col-auto align-self-center">
-						<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>" title="<?=htmlspecialchars(_("Begin"))?>" data-toggle="tooltip"><i class="fal fa-play"></i></a>
+						<a class="btn btn-outline-primary" href="/account/tests/<?=$test->id?>" title="<?=htmlspecialchars(__("Begin"))?>" data-toggle="tooltip"><i class="fal fa-play"></i></a>
 					</div>
 					</div>
 				</div>
 				</div>
 			</div>
 			</div>

+ 8 - 8
views/tests_available.php

@@ -4,18 +4,18 @@
 
 
 	<div class="row">
 	<div class="row">
 		<div class="col">
 		<div class="col">
-			<h2><?=htmlspecialchars(_("Find Tests"))?></h2>
+			<h2><?=htmlspecialchars(__("Find Tests"))?></h2>
 		</div>
 		</div>
 		<div class="col-auto">
 		<div class="col-auto">
 			<a id="claim-tests-button" class="btn btn-primary disabled" href="#" data-toggle="modal" data-target="#modal-test-claim">
 			<a id="claim-tests-button" class="btn btn-primary disabled" href="#" data-toggle="modal" data-target="#modal-test-claim">
-				<?=sprintf(htmlspecialchars(_("Claim %s0%s ...")), '<span id="claim-number">', '</span>')?>
+				<?=sprintf(htmlspecialchars(__("Claim %s0%s ...")), '<span id="claim-number">', '</span>')?>
 			</a>
 			</a>
 		</div>
 		</div>
 	</div>
 	</div>
 
 
 	<div class="card mb-3">
 	<div class="card mb-3">
 		<div class="card-body">
 		<div class="card-body">
-			<?=htmlspecialchars(_("On this page you can search for tests that are currently available. Please use the \"Select\" buttons or click on the map markers to select and deselect a test. After you have made your selections, please click the \"Claim\" button on the top-right of this page to assign yourself the tests."))?>
+			<?=htmlspecialchars(__("On this page you can search for tests that are currently available. Please use the \"Select\" buttons or click on the map markers to select and deselect a test. After you have made your selections, please click the \"Claim\" button on the top-right of this page to assign yourself the tests."))?>
 		</div>
 		</div>
 	</div>
 	</div>
 
 
@@ -36,13 +36,13 @@
 							<div><?=htmlspecialchars($location->name)?></div>
 							<div><?=htmlspecialchars($location->name)?></div>
 							<div><small><?=htmlspecialchars($location->getDisplayAddress())?></small></div>
 							<div><small><?=htmlspecialchars($location->getDisplayAddress())?></small></div>
 							<div>
 							<div>
-								<small><strong><?=htmlspecialchars(_("Type:"))?></strong> <?=htmlspecialchars($template->name)?></small>
+								<small><strong><?=htmlspecialchars(__("Type:"))?></strong> <?=htmlspecialchars($template->name)?></small>
 								<?php
 								<?php
 								if($project->isNighttime()) {
 								if($project->isNighttime()) {
 									?>
 									?>
 									<span class="badge badge-dark">
 									<span class="badge badge-dark">
 										<i class="fas fa-fw fa-moon"></i>
 										<i class="fas fa-fw fa-moon"></i>
-										<?=htmlspecialchars(_("Nighttime"))?>
+										<?=htmlspecialchars(__("Nighttime"))?>
 									</span>
 									</span>
 									<?php
 									<?php
 								}
 								}
@@ -50,11 +50,11 @@
 							</div>
 							</div>
 							<div>
 							<div>
 								<small>
 								<small>
-									<?=sprintf(htmlspecialchars(_("%s%s mi%s from your %s address")), '<strong>', '</strong>', htmlspecialchars($address->name)?>
+									<?=sprintf(htmlspecialchars(__("%s%s mi%s from your %s address")), '<strong>', '</strong>', htmlspecialchars($address->name)?>
 								</small>
 								</small>
 							</div>
 							</div>
 						</div>
 						</div>
-						<button class="btn btn-primary align-self-start" data-test-id="<?=$test->id?>"><?=htmlspecialchars(_("Select"))?></button>
+						<button class="btn btn-primary align-self-start" data-test-id="<?=$test->id?>"><?=htmlspecialchars(__("Select"))?></button>
 					</div>
 					</div>
 				</div>
 				</div>
 				<?php
 				<?php
@@ -67,7 +67,7 @@
 			<div class="input-group mb-3">
 			<div class="input-group mb-3">
 				<div class="input-group-prepend">
 				<div class="input-group-prepend">
 					<span class="input-group-text">
 					<span class="input-group-text">
-						<?=htmlspecialchars(_("Location"))?>
+						<?=htmlspecialchars(__("Location"))?>
 					</span>
 					</span>
 				</div>
 				</div>
 				<input class="form-control" type="text" data-autocomplete="map" />
 				<input class="form-control" type="text" data-autocomplete="map" />