From ad554b48e7dc355d9b33eede98f4e3e829fd867e Mon Sep 17 00:00:00 2001 From: winter Date: Tue, 31 Dec 2024 14:30:16 +0000 Subject: switch to my own translations system i really don't like gettext --- templates/actor_profile.php | 6 +++--- templates/actor_profile_page.php | 2 +- templates/global_timeline.php | 4 ++-- templates/interaction_button.php | 6 +++--- templates/local_timeline.php | 4 ++-- templates/placeholder_text.php | 2 +- templates/skeleton.php | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-) (limited to 'templates') diff --git a/templates/actor_profile.php b/templates/actor_profile.php index c5b86c4..8a97bd8 100644 --- a/templates/actor_profile.php +++ b/templates/actor_profile.php @@ -4,18 +4,18 @@
displayName ?>
@getFullHandle() ?>
-
created->format('Y-m-d')) ?>
+
created->format('Y-m-d')) ?>
isLocal): ?> open_in_new + title="" target="_blank">open_in_new
bio) && $actor->bio != '') { ?>

bio ?>

_("This user hasn't written a bio yet.")]); + call_template('placeholder_text', ['message' => __('user.profile.bio.placeholder')]); } ?> \ No newline at end of file diff --git a/templates/actor_profile_page.php b/templates/actor_profile_page.php index bd60e2c..e7d28b7 100644 --- a/templates/actor_profile_page.php +++ b/templates/actor_profile_page.php @@ -11,7 +11,7 @@ call_template('skeleton', [ echo '
'; $notes = Note::findAllWithAuthor($actor, 50); if (count($notes) == 0) { - call_template('placeholder_text', ['message' => _("This user hasn't posted anything yet.")]); + call_template('placeholder_text', ['message' => __('user.notes.placeholder')]); } foreach ($notes as $n) { call_template('note', ['note' => $n]); diff --git a/templates/global_timeline.php b/templates/global_timeline.php index f8fca52..f475656 100644 --- a/templates/global_timeline.php +++ b/templates/global_timeline.php @@ -1,8 +1,8 @@ - _('Global timeline')], function () { + __('timeline.global')], function () { global $notes; call_template('alertbox', [ 'variety' => 'info', - 'message' => _('This timeline shows all known public indexable notes.') + 'message' => __('timeline.global.description') ]); foreach ($notes as $n) { call_template('note', ['note' => $n]); diff --git a/templates/interaction_button.php b/templates/interaction_button.php index 40fe392..9115435 100644 --- a/templates/interaction_button.php +++ b/templates/interaction_button.php @@ -1,9 +1,9 @@ _('Like'), - 'dislike' => _('Dislike'), - 'reshare' => _('Reshare') + 'like' => __('note.action.like'), + 'dislike' => __('note.action.dislike'), + 'reshare' => __('note.action.reshare') }; $icon = match ($action) { 'like' => 'favorite', diff --git a/templates/local_timeline.php b/templates/local_timeline.php index ec894a9..9d9027c 100644 --- a/templates/local_timeline.php +++ b/templates/local_timeline.php @@ -1,8 +1,8 @@ - _('Local timeline')], function () { + __('timeline.local')], function () { global $notes; call_template('alertbox', [ 'variety' => 'info', - 'message' => _('This timeline shows all public indexable notes posted by users on this server.') + 'message' => __('timeline.local.description') ]); foreach ($notes as $n) { call_template('note', ['note' => $n]); diff --git a/templates/placeholder_text.php b/templates/placeholder_text.php index 1f03ebc..f529de9 100644 --- a/templates/placeholder_text.php +++ b/templates/placeholder_text.php @@ -1 +1 @@ -

\ No newline at end of file +

\ No newline at end of file diff --git a/templates/skeleton.php b/templates/skeleton.php index 49e4386..0d8afb4 100644 --- a/templates/skeleton.php +++ b/templates/skeleton.php @@ -14,10 +14,10 @@
-- cgit v1.3