Make translatable

This commit is contained in:
Jay Trees 2022-03-22 09:46:14 +01:00
parent 30e37ef8c2
commit 91ff7c6eab

View file

@ -309,13 +309,13 @@ class Page
$pages = array( $pages = array(
$system => array( $system => array(
'text' => 'System', 'text' => __('System'),
'icon' => 'wrench', 'icon' => 'wrench',
'alignment' => 'right', 'alignment' => 'right',
'items' => array(), 'items' => array(),
), ),
$account => array( $account => array(
'text' => 'Account', 'text' => __('Account'),
'icon' => 'user circle', 'icon' => 'user circle',
'alignment' => 'right', 'alignment' => 'right',
'items' => array(), 'items' => array(),
@ -324,12 +324,12 @@ class Page
if ($user->isLoggedIn()) { if ($user->isLoggedIn()) {
$pages[$wishlists] = array( $pages[$wishlists] = array(
'text' => 'Wishlists', 'text' => __('Wishlists'),
'alignment' => 'left', 'alignment' => 'left',
'items' => array( 'items' => array(
array( array(
'text' => __('My lists'),
'url' => '/?page=wishlists', 'url' => '/?page=wishlists',
'text' => 'My lists',
'icon' => 'list', 'icon' => 'list',
) )
), ),
@ -338,41 +338,41 @@ class Page
if ($user->isLoggedIn()) { if ($user->isLoggedIn()) {
$pages[$account]['items'][] = array( $pages[$account]['items'][] = array(
'text' => __('Profile'),
'url' => '/?page=profile', 'url' => '/?page=profile',
'text' => 'Profile',
'icon' => 'user circle alternate', 'icon' => 'user circle alternate',
); );
if (100 === $user->power) { if (100 === $user->power) {
$pages[$account]['items'][] = array( $pages[$account]['items'][] = array(
'text' => __('Login as'),
'url' => '/?page=login-as', 'url' => '/?page=login-as',
'text' => 'Login as',
'icon' => 'sign out alternate', 'icon' => 'sign out alternate',
); );
} }
$pages[$account]['items'][] = array( $pages[$account]['items'][] = array(
'text' => __('Logout'),
'url' => '/?page=logout', 'url' => '/?page=logout',
'text' => 'Logout',
'icon' => 'sign out alternate', 'icon' => 'sign out alternate',
); );
} else { } else {
$pages[$login] = array( $pages[$login] = array(
'text' => 'Login', 'text' => __('Login'),
'alignment' => 'right', 'alignment' => 'right',
'items' => array( 'items' => array(
array( array(
'text' => __('Login'),
'url' => '/?page=login', 'url' => '/?page=login',
'text' => 'Login',
'icon' => 'sign in alternate', 'icon' => 'sign in alternate',
) )
), ),
); );
$pages[$register] = array( $pages[$register] = array(
'text' => 'Register', 'text' => __('Register'),
'alignment' => 'right', 'alignment' => 'right',
'items' => array( 'items' => array(
array( array(
'text' => __('Register'),
'url' => '/?page=register', 'url' => '/?page=register',
'text' => 'Register',
'icon' => 'user plus alternate', 'icon' => 'user plus alternate',
) )
), ),
@ -383,16 +383,16 @@ class Page
if ($options->getOption('updateAvailable') && isset($user->power) && 100 === $user->power) { if ($options->getOption('updateAvailable') && isset($user->power) && 100 === $user->power) {
$pages[$system]['items'][] = array( $pages[$system]['items'][] = array(
'text' => __('Update'),
'url' => '/?page=update', 'url' => '/?page=update',
'text' => 'Update',
'icon' => 'upload', 'icon' => 'upload',
); );
} }
if (isset($user->power) && 100 === $user->power) { if (isset($user->power) && 100 === $user->power) {
$pages[$system]['items'][] = array( $pages[$system]['items'][] = array(
'text' => __('Settings'),
'url' => '/?page=settings', 'url' => '/?page=settings',
'text' => 'Settings',
'icon' => 'cog', 'icon' => 'cog',
); );
} }
@ -404,7 +404,7 @@ class Page
<div class="ui container"> <div class="ui container">
<a class="item home" href="/?page=home"> <a class="item home" href="/?page=home">
<img src="/src/assets/img/logo.svg" alt="wishthis logo" /> <img src="/src/assets/img/logo.svg" alt="<?= __('wishthis logo') ?>" />
</a> </a>
<?php foreach ($pages as $page) { ?> <?php foreach ($pages as $page) { ?>