aboutsummaryrefslogtreecommitdiffhomepage
path: root/templates
diff options
context:
space:
mode:
authorwinter2024-12-31 14:30:16 +0000
committerwinter2024-12-31 14:30:16 +0000
commitad554b48e7dc355d9b33eede98f4e3e829fd867e (patch)
treeeb11cd4357bdbe2964b9d04495ab2e6c7212d9ed /templates
parent721674973ca0a4d98cd081e9ff130c3356ddac03 (diff)
switch to my own translations system
i really don't like gettext
Diffstat (limited to 'templates')
-rw-r--r--templates/actor_profile.php6
-rw-r--r--templates/actor_profile_page.php2
-rw-r--r--templates/global_timeline.php4
-rw-r--r--templates/interaction_button.php6
-rw-r--r--templates/local_timeline.php4
-rw-r--r--templates/placeholder_text.php2
-rw-r--r--templates/skeleton.php6
7 files changed, 15 insertions, 15 deletions
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 @@
<div>
<div class="displayName"><?= $actor->displayName ?></div>
<div class="handle">@<?= $actor->getFullHandle() ?></div>
- <div class="joinedDate"><?= sprintf(_('Joined on %s'), $actor->created->format('Y-m-d')) ?></div>
+ <div class="joinedDate"><?= sprintf(__('user.profile.createdAt'), $actor->created->format('Y-m-d')) ?></div>
</div>
<div>
<?php if (!$actor->isLocal): ?>
<a class="icon material-symbols-outlined" href="<?= $actor->homepage ?>"
- title="<?= _('Open remote profile page') ?>" target="_blank">open_in_new</a>
+ title="<?= __('user.profile.openRemote') ?>" target="_blank">open_in_new</a>
<?php endif; ?>
</div>
</div>
<?php if (isset($actor->bio) && $actor->bio != '') { ?>
<p class="bio"><?= $actor->bio ?></p>
<?php } else {
- call_template('placeholder_text', ['message' => _("This user hasn't written a bio yet.")]);
+ call_template('placeholder_text', ['message' => __('user.profile.bio.placeholder')]);
} ?>
</div> \ 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 '<hr>';
$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 @@
-<?php call_template('skeleton', ['pageTitle' => _('Global timeline')], function () {
+<?php call_template('skeleton', ['pageTitle' => __('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 @@
<?php
$active = $active ?? false;
$tooltip = match ($action) {
- 'like' => _('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 @@
-<?php call_template('skeleton', ['pageTitle' => _('Local timeline')], function () {
+<?php call_template('skeleton', ['pageTitle' => __('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 @@
-<p class="placeholder"><?= $message ?? _("There's nothing here.") ?></p> \ No newline at end of file
+<p class="placeholder"><?= $message ?? __('placeholder') ?></p> \ 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 @@
<header>
<nav>
<ul>
- <li><a href="/feed/global"><?= _('Global') ?></a></li>
- <li><a href="/feed/local"><?= _('Local') ?></a></li>
+ <li><a href="/feed/global"><?= __('timeline.global.shortName') ?></a></li>
+ <li><a href="/feed/local"><?= __('timeline.local.shortName') ?></a></li>
</ul>
- <span id="siteTitle"><?= _('Digitigrade') ?></span>
+ <span id="siteTitle"><?= __('digitigrade') ?></span>
</nav>
</header>
<main>