Translated Account Information page, minor refactoring regarding IS currency names

This commit is contained in:
Exynox 2025-01-01 11:29:15 +02:00
parent 505d9eb00a
commit 2491f0bece
11 changed files with 161 additions and 33 deletions

View File

@ -7,11 +7,19 @@ enum MallItemPricingEnum: string
case CASH = 'CASH';
case MILEAGE = 'MILEAGE';
public function description(): string
public function name(): string
{
return match($this) {
self::CASH => __('mall/main.currency.cash'),
self::MILEAGE => __('mall/main.currency.mileage')
};
}
public function longName(): string
{
return match($this) {
self::CASH => __('mall/main.currency.cash_long'),
self::MILEAGE => __('mall/main.currency.mileage_long')
};
}
}

View File

@ -10,10 +10,10 @@
'header.register_steps_3' => '3. Download & play for free',
'header.welcome' => 'Welcome, :name!',
'header.cash_balance' => 'You have :cash Dragon Coins',
'header.cash_balance' => 'You have :cash :cashName',
'header.nav.buy_coins' => 'Buy DC',
'header.nav.administration' => 'User information',
'header.nav.administration' => 'Account Information',
'header.nav.logout' => 'Logout',
'nav.home' => 'Start',

View File

@ -0,0 +1,29 @@
<?php
return [
'title' => 'Your Account',
'subtitle' => 'Account Information',
'username' => 'Username',
'email' => 'Email',
'cash-topup' => '(top up)',
'delete-code' => 'Character deletion code',
'delete-code-not-available' => 'not yet specified',
'btn-topup' => 'Buy Dragon Coins',
'btn-topup-desc' => 'Top up your account with Dragon Coins',
'btn-characters' => 'Characters',
'btn-characters-desc' => 'Character list',
'btn-recruit' => 'Friends',
'btn-recruit-desc' => 'Recruit friends and see the status of newly recruited friends',
'btn-email-change' => 'Email',
'btn-email-change-desc' => 'Change email address',
'btn-password-change' => 'Password',
'btn-password-change-desc' => 'Change password',
'btn-storage-password' => 'Storekeeper',
'btn-storage-password-desc' => 'Request Storekeeper password',
'btn-display-code' => 'Display code',
'btn-display-code-desc' => 'Character deletion code',
'btn-delete-account' => 'Delete account',
'btn-delete-account-desc' => 'Delete account',
];

View File

@ -10,7 +10,7 @@
'header.register_steps_3' => '3. Descarcă și joacă pe gratis',
'header.welcome' => 'Bun venit, :name!',
'header.cash_balance' => 'Ai :cash Monede Dragon',
'header.cash_balance' => 'Ai :cash :cashName',
'header.nav.buy_coins' => 'Încarcă MD',
'header.nav.administration' => 'Datele utilizatorului',

View File

@ -0,0 +1,29 @@
<?php
return [
'title' => 'Contul tău',
'subtitle' => 'Datele utilizatorului',
'username' => 'Nume de utilizator',
'email' => 'Email',
'cash-topup' => '(top up)',
'delete-code' => 'Cod de ștergere personaj',
'delete-code-not-available' => 'încă nespecificat',
'btn-topup' => 'Încarcă MD',
'btn-topup-desc' => 'Îmbunătățește-ți contul folosind Monede Dragon',
'btn-characters' => 'Personaje',
'btn-characters-desc' => 'Lista personajelor',
'btn-recruit' => 'Prieteni',
'btn-recruit-desc' => 'Recrutează prieteni și vezi statusul noilor prieteni recrutați',
'btn-email-change' => 'Email',
'btn-email-change-desc' => 'Schimbă adresa de email',
'btn-password-change' => 'Parola',
'btn-password-change-desc' => 'Schimbă parola contului tău',
'btn-storage-password' => 'Parolă Depozit',
'btn-storage-password-desc' => 'Cere parola de la Depozit',
'btn-display-code' => 'Parolă ștergere',
'btn-display-code-desc' => 'Obține codul pentru ştergerea personajelor',
'btn-delete-account' => 'Șterge contul',
'btn-delete-account-desc' => 'Șterge-ți contul',
];

21
lang/ro/mall/main.php Normal file
View File

@ -0,0 +1,21 @@
<?php
return [
'title' => 'Magazinul de item-uri',
'currency.cash' => 'MD',
'currency.cash_long' => 'Monede Dragon',
'currency.mileage' => 'JD',
'currency.mileage_long' => 'Jetoane Dragon',
'nav.home' => 'Acasă',
'nav.search_placeholder' => 'Caută',
'nav.help_tooltip' => 'Mergi la pagina de ajutor',
'nav.buy_coins_tooltip' => 'Obține Monede Dragon',
'nav.buy_coins_btn' => "Obține\nMonede Dragon",
'nav.user_data_tooltip' => 'Date utilizator',
'nav.stored_items' => 'Obiecte depozitate: :storageCount',
];

View File

@ -212,7 +212,7 @@ function () {
@else
<div id="userBox">
<div class="welcome-text welcome-text-left">{{ __('app/main.header.welcome', ['name' => Auth::user()->login]) }}</div>
<div class="welcome-text welcome-text-right">{{ __('app/main.header.cash_balance', ['cash' => Auth::user()->cash]) }}</div>
<div class="welcome-text welcome-text-right">{{ __('app/main.header.cash_balance', ['cash' => Auth::user()->cash, 'cashName' => \App\Models\Enums\MallItemPricingEnum::CASH->longName()]) }}</div>
<br class="clearfloat" />
<div class="header-box-nav-container">
<ul class="header-box-nav-login" style="position:absolute; margin-left:-0px;">

View File

@ -37,13 +37,13 @@
{{ $item->quantity }} pcs. for:
@if (!$item->old_price)
<span class="price">{{ $item->price }} {{ $item->pricing->description() }}</span>
<span class="price">{{ $item->price }} {{ $item->pricing->name() }}</span>
@endif
</div>
@if ($item->old_price)
<div class="price discount price-discount-ie6">{{ $item->price }} {{ $item->pricing->description() }}</div>
<div class="discountOldPriceCategory">{{ $item->old_price }} {{ $item->pricing ->description() }}</div>
<div class="price discount price-discount-ie6">{{ $item->price }} {{ $item->pricing->name() }}</div>
<div class="discountOldPriceCategory">{{ $item->old_price }} {{ $item->pricing ->name() }}</div>
<div class="discountPercentCircleCategory"></div>
@endif
</div>

View File

@ -19,19 +19,19 @@
<a href="{{ route('mall.item', ['id' => $item->id]) }}" class="openinformation" title="More information"></a>
</div>
<div class="discountPercentCirclePromoted"></div>
<p class="discountOldPricePromoted">{{ $item->old_price }}&nbsp;{{ $item->pricing->description() }}</p>
<p class="discountOldPricePromoted">{{ $item->old_price }}&nbsp;{{ $item->pricing->name() }}</p>
@endif
<div @class(['promotedItemBtns', 'promotedItemBtns-discount' => $item->old_price])>
@if ($item->old_price)
<p class="pdiscount">
{{ $item->quantity }} pcs: <span class="price discount price-discount-ie6">{{ $item->price }} {{ $item->pricing->description() }}</span>
{{ $item->quantity }} pcs: <span class="price discount price-discount-ie6">{{ $item->price }} {{ $item->pricing->name() }}</span>
</p>
<div class="divdiscount">
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" class="detail-discount openinformation">Details</a>
</div>
@else
<p>{{ $item->quantity }} pcs. only: <span class="price">{{ $item->price }} {{ $item->pricing->description() }}</span></p>
<p>{{ $item->quantity }} pcs. only: <span class="price">{{ $item->price }} {{ $item->pricing->name() }}</span></p>
<a href="{{ route('mall.item', ['id' => $item->id]) }}" title="More information" class="detail openinformation">Details</a>
@endif
</div>

View File

@ -44,13 +44,13 @@ function disableLink(link, id) {
</div>
<div class="sprice-discount">
<div id="oldPriceAmountDiv">
<span id="oldPriceAmount">{{ $item->old_price }}</span>&nbsp;{{ $item->pricing->description() }}
<span id="oldPriceAmount">{{ $item->old_price }}</span>&nbsp;{{ $item->pricing->name() }}
</div>
Price: <span id="priceAmount">{{$item->price }}</span>&nbsp;{{ $item->pricing->description() }}
Price: <span id="priceAmount">{{$item->price }}</span>&nbsp;{{ $item->pricing->name() }}
</div>
@else
<div class="sprice">
Price: <span id="priceAmount">{{ $item->price }}</span>&nbsp;{{ $item->pricing->description() }}
Price: <span id="priceAmount">{{ $item->price }}</span>&nbsp;{{ $item->pricing->name() }}
</div>
@endif
</div>
@ -61,7 +61,7 @@ function disableLink(link, id) {
<a id="linkBlank" class="blank" style="display:none" href="#">Buy item</a>
@else
<a id="buyItemLink" class="blank" href="#" style="cursor: default">Not
enough {{ $item->pricing->description() }}</a>
enough {{ $item->pricing->name() }}</a>
@endif
@if ($item->pricing == \App\Models\Enums\MallItemPricingEnum::CASH)

View File

@ -6,39 +6,80 @@
<div class="content content-last">
<div class="content-bg">
<div class="content-bg-bottom">
<h2>Contul tău</h2>
<h2>{{ __('app/user/administration.title') }}</h2>
<div class="administration-inner-content">
<div class="input-data-box">
<h4>Datele utilizatorului</h4>
<h4>{{ __('app/user/administration.subtitle') }}</h4>
<ul>
<li>Nume de utilizator: {{ Auth::user()->login }}</li>
<li>Email: <span id="yourEmail">{{ Auth::user()->email }}</span></li>
<li>Monede Dragon: {{ Auth::user()->cash }} <a href="#" class="load-link">(top up)</a></li>
<li>Semnele Dragonului: {{ Auth::user()->mileage }}</li>
<li>{{ __('app/user/administration.username') }}: {{ Auth::user()->login }}</li>
<li>
{{ __('app/user/administration.email') }}:
<span id="yourEmail">{{ Auth::user()->email }}</span>
</li>
<li>
{{ \App\Models\Enums\MallItemPricingEnum::CASH->longName() }}:
{{ Auth::user()->cash }} {{ \App\Models\Enums\MallItemPricingEnum::CASH->name() }}
<a href="#" class="load-link">{{ __('app/user/administration.cash-topup') }}</a>
</li>
<li>
{{ \App\Models\Enums\MallItemPricingEnum::MILEAGE->longName() }}:
{{ Auth::user()->mileage }} {{ \App\Models\Enums\MallItemPricingEnum::MILEAGE->name() }}
</li>
@if (Auth::user()->social_id)
<li class="long-li-code">Cod de ștergere caracter: <span class="delete-code">{{ Auth::user()->social_id }}</span></li>
<li class="long-li-code">
{{ __('app/user/administration.delete-code') }}:
<span class="delete-code">{{ Auth::user()->social_id }}</span>
</li>
@else
<li class="long-li-code">Cod de ștergere caracter: <span class="delete-code">încă nespecificat</span></li>
<li class="long-li-code">
{{ __('app/user/administration.delete-code') }}:
<span class="delete-code">{{ __('app/user/administration.delete-code-not-available') }}</span>
</li>
@endif
</ul>
<div class="administration-box"><a href="#" class="btn">Încarcă MD</a><p>Îmbunătățește-ți contul folosind Monede Dragon</p></div>
<div class="administration-box"><a href="{{ url('user/characters') }}" class="btn">Caracter</a><p>Lista caracterelor</p></div>
{{-- <div class="administration-box"><a href="#" class="btn">Prieteni</a><p>Recruteaza prieteni si vezi statusul noilor prieteni recrutati</p></div> --}}
<div class="administration-box"><a href="{{ url('user/emailchange') }}" class="btn">Email</a><p>Schimbă adresa de email</p></div>
<div class="administration-box"><a href="{{ url('user/passwordchangerequest') }}" class="btn">Parola</a><p>Schimbă parola</p></div>
<div class="administration-box"><a href="{{ url('user/storagepasswordlost') }}" class="btn">Parola Depozit</a><p>Cere parola de la Depozit</p></div>
<div class="administration-box"><a href="{{ url('user/displaycode') }}" class="btn">Parola Stergere</a><p>Codul pentru ştergerea personajelor</p></div>
<div class="administration-box"><a href="#" class="btn">Anularea contului</a><p>Anularea contului</p></div>
<div class="administration-box">
<a href="#" class="btn">{{ __('app/user/administration.btn-topup') }}</a>
<p>{{ __('app/user/administration.btn-topup-desc') }}</p>
</div>
<div class="administration-box">
<a href="{{ url('user/characters') }}" class="btn">{{ __('app/user/administration.btn-characters') }}</a>
<p>{{ __('app/user/administration.btn-characters-desc') }}</p>
</div>
{{--
<div class="administration-box">
<a href="#" class="btn">{{ __('app/user/administration.btn-recruit') }}</a>
<p>{{ __('app/user/administration.btn-desc') }}</p>
</div>
--}}
<div class="administration-box">
<a href="{{ url('user/emailchange') }}" class="btn">{{ __('app/user/administration.btn-email-change') }}</a>
<p>{{ __('app/user/administration.btn-email-change-desc') }}</p>
</div>
<div class="administration-box">
<a href="{{ url('user/passwordchangerequest') }}" class="btn">{{ __('app/user/administration.btn-password-change') }}</a>
<p>{{ __('app/user/administration.btn-password-change-desc') }}</p>
</div>
<div class="administration-box">
<a href="{{ url('user/storagepasswordlost') }}" class="btn">{{ __('app/user/administration.btn-storage-password') }}</a>
<p>{{ __('app/user/administration.btn-storage-password-desc') }}</p>
</div>
<div class="administration-box">
<a href="{{ url('user/displaycode') }}" class="btn">{{ __('app/user/administration.btn-display-code') }}</a>
<p>{{ __('app/user/administration.btn-display-code-desc') }}</p>
</div>
<div class="administration-box">
<a href="#" class="btn">{{ __('app/user/administration.btn-delete-account') }}</a>
<p>{{ __('app/user/administration.btn-delete-account-desc') }}</p>
</div>
</div>
<div class="box-foot"></div>
</div>
</div>
</div>
</div>
<div class="shadow">&nbsp;</div>
<div class="shadow"></div>
</div>
@endsection