From 307b61ad625956e478c16f406061c9751baa928a Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Fri, 11 Oct 2024 14:42:25 +0200 Subject: i18n fixes --- src/application/actions/attachment/get.php | 2 +- src/application/actions/lookupuser/get.php | 2 +- src/application/actions/profilepicture/get.php | 2 +- src/application/actions/thumb/get.php | 2 +- src/application/actions/verifyemail/get.php | 4 ++-- src/application/actions/viewtopic/_common.php | 4 ++-- src/application/actions/viewuser/_common.php | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/application/actions') diff --git a/src/application/actions/attachment/get.php b/src/application/actions/attachment/get.php index 598bdb9..39f14a3 100644 --- a/src/application/actions/attachment/get.php +++ b/src/application/actions/attachment/get.php @@ -9,7 +9,7 @@ if (!$currentUser) { exit; } -$attId = $_GET["attachment"] ?? throw new Exception("Missing attachment id"); +$attId = $_GET["attachment"] ?? throw new Exception(__("Missing attachment id")); $attachment = new Attachment(); $attachment->id = $attId; if (!$db->fetch($attachment)) { diff --git a/src/application/actions/lookupuser/get.php b/src/application/actions/lookupuser/get.php index ca6c6f3..74143f4 100644 --- a/src/application/actions/lookupuser/get.php +++ b/src/application/actions/lookupuser/get.php @@ -2,7 +2,7 @@ use mystic\forum\orm\User; -$userHandle = $_GET["handle"] ?? throw new Exception("Missing handle"); +$userHandle = $_GET["handle"] ?? throw new Exception(__("Missing handle")); $user = new User(); $user->name = $userHandle; diff --git a/src/application/actions/profilepicture/get.php b/src/application/actions/profilepicture/get.php index c4860f1..abf9135 100644 --- a/src/application/actions/profilepicture/get.php +++ b/src/application/actions/profilepicture/get.php @@ -2,7 +2,7 @@ use mystic\forum\orm\User; -$userId = $_GET["user"] ?? throw new Exception("Missing user id"); +$userId = $_GET["user"] ?? throw new Exception(__("Missing user id")); $user = new User(); $user->id = $userId; if (!$db->fetch($user)) { diff --git a/src/application/actions/thumb/get.php b/src/application/actions/thumb/get.php index c34bf92..d03e5f9 100644 --- a/src/application/actions/thumb/get.php +++ b/src/application/actions/thumb/get.php @@ -5,7 +5,7 @@ use FFMpeg\FFMpeg; use FFMpeg\FFProbe; use mystic\forum\orm\Attachment; -$attId = $_GET["attachment"] ?? throw new Exception("Missing attachment id"); +$attId = $_GET["attachment"] ?? throw new Exception(__("Missing attachment id")); $attachment = new Attachment(); $attachment->id = $attId; if (!$db->fetch($attachment)) { diff --git a/src/application/actions/verifyemail/get.php b/src/application/actions/verifyemail/get.php index 77a1ef4..2cc2707 100644 --- a/src/application/actions/verifyemail/get.php +++ b/src/application/actions/verifyemail/get.php @@ -6,8 +6,8 @@ use Symfony\Component\Mailer\Transport; use Symfony\Component\Mime\Address; use Symfony\Component\Mime\Email; -$token = $_GET["token"] ?? throw new Exception("Missing token"); -$sig = $_GET["sig"] ?? throw new Exception("Missing signature"); +$token = $_GET["token"] ?? throw new Exception(__("Missing token")); +$sig = $_GET["sig"] ?? throw new Exception(__("Missing signature")); $user = new User(); $user->activationToken = $token; diff --git a/src/application/actions/viewtopic/_common.php b/src/application/actions/viewtopic/_common.php index 7f249bb..b257237 100644 --- a/src/application/actions/viewtopic/_common.php +++ b/src/application/actions/viewtopic/_common.php @@ -3,11 +3,11 @@ use mystic\forum\orm\Topic; $formId = "addpost"; -$topicId = $_GET["topic"] ?? throw new Exception("Missing topic id"); +$topicId = $_GET["topic"] ?? throw new Exception(__("Missing topic id")); $topic = new Topic(); $topic->id = $topicId; if (!$db->fetch($topic)) { http_response_code(404); - msg_error("No topic exists with this id"); + msg_error(__("No topic exists with this id")); exit; } diff --git a/src/application/actions/viewuser/_common.php b/src/application/actions/viewuser/_common.php index 3f8236c..52d0d05 100644 --- a/src/application/actions/viewuser/_common.php +++ b/src/application/actions/viewuser/_common.php @@ -2,7 +2,7 @@ use mystic\forum\orm\User; -$userId = $_GET["user"] ?? throw new Exception("Missing user id"); +$userId = $_GET["user"] ?? throw new Exception(__("Missing user id")); $user = new User(); $user->id = $userId; if (!$db->fetch($user)) { -- cgit v1.2.3