From a56478d4aeffde8ab1b879fbcb0560261e20cb6b Mon Sep 17 00:00:00 2001 From: leeos Date: Mon, 13 Nov 2023 14:46:16 +0100 Subject: [PATCH] Opinion, DeleteModal translation update, wip --- lang/pl.json | 5 ++++- lang/pl/validation.php | 1 + resources/js/Shared/Components/DeleteModal.vue | 8 ++++++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lang/pl.json b/lang/pl.json index f91a412e..e8e987b9 100644 --- a/lang/pl.json +++ b/lang/pl.json @@ -29,6 +29,7 @@ "advert2": "Ta aplikacja pomoże Ci z planowaniem Twoich wakacji, lub podróży biznesowych.", "Edit": "Edytuj", "Delete": "Usuń", + "Cancel": "Anuluj", "Add": "Dodaj", "Create city": "Utwórz miasto", "Create country": "Utwórz kraj", @@ -126,7 +127,6 @@ "Cities with no country assigned": "Miasta bez przypisanego kraju", "Cities with no coordinates assigned": "Miasta bez przypisanych współrzędnych", "Delete all cities with no country assigned": "Usuń wszystkie miasta bez przypisanego kraju", - "Opinion added successfully.": "Opinia dodana pomyślnie.", "There was an error adding your opinion.": "Wystąpił błąd podczas dodawania opinii.", "Opinion edited successfully.": "Opinia zaktualizowana pomyślnie.", @@ -136,6 +136,9 @@ "Edit opinion": "Edytuj opinię", "Send": "Wyślij", "Users' opinions": "Opinie użytkowników", + "Delete that opinion?": "Usunąć tę opinię?", + "Delete city?": "Usunąć miasto?", + "That opinion will be permanently deleted.": "Ta opinia zostanie trwale usunięta.", "You have logged in successfully.": "Zalogowano pomyślnie.", "You have logged out successfully.": "Wylogowano pomyślnie.", diff --git a/lang/pl/validation.php b/lang/pl/validation.php index 043ad6dc..3e000fdf 100644 --- a/lang/pl/validation.php +++ b/lang/pl/validation.php @@ -124,5 +124,6 @@ "password" => "hasło", "latitude" => "szerokość geograficzna", "longitude" => "długość geograficzna", + "content" => "treść", ], ]; diff --git a/resources/js/Shared/Components/DeleteModal.vue b/resources/js/Shared/Components/DeleteModal.vue index 07dbaff2..4d394d11 100644 --- a/resources/js/Shared/Components/DeleteModal.vue +++ b/resources/js/Shared/Components/DeleteModal.vue @@ -14,7 +14,7 @@ const open = ref(true) const props = defineProps({ name: { type: String, - required: true, + required: false, }, type: { type: String, @@ -37,7 +37,11 @@ const renderText = () => { let translationKey = '' translationKey = ':type :name will be permanently deleted.' - return __(translationKey, { type: __(props.type), name: props.name }) + if (props.type == 'That opinion') { + translationKey = ':type will be permanently deleted.' + } + + return __(translationKey, { type: __(props.type), name: __(props.name) }) } const dialogRef = ref(null)