From 2491f0becec1f2834a85135c35f87515dce45d5d Mon Sep 17 00:00:00 2001 From: Exynox Date: Wed, 1 Jan 2025 11:29:15 +0200 Subject: [PATCH] Translated Account Information page, minor refactoring regarding IS currency names --- app/Models/Enums/MallItemPricingEnum.php | 10 ++- lang/en/app/main.php | 4 +- lang/en/app/user/administration.php | 29 +++++++ lang/ro/app/main.php | 2 +- lang/ro/app/user/administration.php | 29 +++++++ lang/ro/mall/main.php | 21 +++++ resources/views/layouts/app.blade.php | 2 +- resources/views/mall/category.blade.php | 6 +- resources/views/mall/home.blade.php | 6 +- resources/views/mall/item/show.blade.php | 8 +- resources/views/user/administration.blade.php | 77 ++++++++++++++----- 11 files changed, 161 insertions(+), 33 deletions(-) create mode 100644 lang/en/app/user/administration.php create mode 100644 lang/ro/app/user/administration.php create mode 100644 lang/ro/mall/main.php diff --git a/app/Models/Enums/MallItemPricingEnum.php b/app/Models/Enums/MallItemPricingEnum.php index eeaa6ea..d470050 100644 --- a/app/Models/Enums/MallItemPricingEnum.php +++ b/app/Models/Enums/MallItemPricingEnum.php @@ -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') + }; + } } diff --git a/lang/en/app/main.php b/lang/en/app/main.php index 2556434..4ab0054 100644 --- a/lang/en/app/main.php +++ b/lang/en/app/main.php @@ -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', diff --git a/lang/en/app/user/administration.php b/lang/en/app/user/administration.php new file mode 100644 index 0000000..c575921 --- /dev/null +++ b/lang/en/app/user/administration.php @@ -0,0 +1,29 @@ + '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', +]; diff --git a/lang/ro/app/main.php b/lang/ro/app/main.php index da52aa2..c217021 100644 --- a/lang/ro/app/main.php +++ b/lang/ro/app/main.php @@ -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', diff --git a/lang/ro/app/user/administration.php b/lang/ro/app/user/administration.php new file mode 100644 index 0000000..319f7a6 --- /dev/null +++ b/lang/ro/app/user/administration.php @@ -0,0 +1,29 @@ + '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', +]; diff --git a/lang/ro/mall/main.php b/lang/ro/mall/main.php new file mode 100644 index 0000000..c0518b5 --- /dev/null +++ b/lang/ro/mall/main.php @@ -0,0 +1,21 @@ + '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', +]; diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index fa67352..f4b0ae8 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -212,7 +212,7 @@ function () { @else
{{ __('app/main.header.welcome', ['name' => Auth::user()->login]) }}
-
{{ __('app/main.header.cash_balance', ['cash' => Auth::user()->cash]) }}
+
{{ __('app/main.header.cash_balance', ['cash' => Auth::user()->cash, 'cashName' => \App\Models\Enums\MallItemPricingEnum::CASH->longName()]) }}

@if ($item->old_price) -
{{ $item->price }} {{ $item->pricing->description() }}
-
{{ $item->old_price }} {{ $item->pricing ->description() }}
+
{{ $item->price }} {{ $item->pricing->name() }}
+
{{ $item->old_price }} {{ $item->pricing ->name() }}
@endif
diff --git a/resources/views/mall/home.blade.php b/resources/views/mall/home.blade.php index eef529b..25413ee 100644 --- a/resources/views/mall/home.blade.php +++ b/resources/views/mall/home.blade.php @@ -19,19 +19,19 @@
-

{{ $item->old_price }} {{ $item->pricing->description() }}

+

{{ $item->old_price }} {{ $item->pricing->name() }}

@endif
$item->old_price])> @if ($item->old_price)

- {{ $item->quantity }} pcs: {{ $item->price }} {{ $item->pricing->description() }} + {{ $item->quantity }} pcs: {{ $item->price }} {{ $item->pricing->name() }}

@else -

{{ $item->quantity }} pcs. only: {{ $item->price }} {{ $item->pricing->description() }}

+

{{ $item->quantity }} pcs. only: {{ $item->price }} {{ $item->pricing->name() }}

Details @endif
diff --git a/resources/views/mall/item/show.blade.php b/resources/views/mall/item/show.blade.php index a8e3db4..e7927ad 100644 --- a/resources/views/mall/item/show.blade.php +++ b/resources/views/mall/item/show.blade.php @@ -44,13 +44,13 @@ function disableLink(link, id) {
- {{ $item->old_price }} {{ $item->pricing->description() }} + {{ $item->old_price }} {{ $item->pricing->name() }}
- Price: {{$item->price }} {{ $item->pricing->description() }} + Price: {{$item->price }} {{ $item->pricing->name() }}
@else
- Price: {{ $item->price }} {{ $item->pricing->description() }} + Price: {{ $item->price }} {{ $item->pricing->name() }}
@endif @@ -61,7 +61,7 @@ function disableLink(link, id) { @else Not - enough {{ $item->pricing->description() }} + enough {{ $item->pricing->name() }} @endif @if ($item->pricing == \App\Models\Enums\MallItemPricingEnum::CASH) diff --git a/resources/views/user/administration.blade.php b/resources/views/user/administration.blade.php index e31a3bb..bc91240 100644 --- a/resources/views/user/administration.blade.php +++ b/resources/views/user/administration.blade.php @@ -6,39 +6,80 @@
-

Contul tău

+

{{ __('app/user/administration.title') }}

-

Datele utilizatorului

+

{{ __('app/user/administration.subtitle') }}

    -
  • Nume de utilizator: {{ Auth::user()->login }}
  • -
  • Email: {{ Auth::user()->email }}
  • -
  • Monede Dragon: {{ Auth::user()->cash }} (top up)
  • -
  • Semnele Dragonului: {{ Auth::user()->mileage }}
  • +
  • {{ __('app/user/administration.username') }}: {{ Auth::user()->login }}
  • +
  • + {{ __('app/user/administration.email') }}: + {{ Auth::user()->email }} +
  • +
  • + {{ \App\Models\Enums\MallItemPricingEnum::CASH->longName() }}: + {{ Auth::user()->cash }} {{ \App\Models\Enums\MallItemPricingEnum::CASH->name() }} + {{ __('app/user/administration.cash-topup') }} +
  • +
  • + {{ \App\Models\Enums\MallItemPricingEnum::MILEAGE->longName() }}: + {{ Auth::user()->mileage }} {{ \App\Models\Enums\MallItemPricingEnum::MILEAGE->name() }} +
  • @if (Auth::user()->social_id) -
  • Cod de ștergere caracter: {{ Auth::user()->social_id }}
  • +
  • + {{ __('app/user/administration.delete-code') }}: + {{ Auth::user()->social_id }} +
  • @else -
  • Cod de ștergere caracter: încă nespecificat
  • +
  • + {{ __('app/user/administration.delete-code') }}: + {{ __('app/user/administration.delete-code-not-available') }} +
  • @endif
-
Încarcă MD

Îmbunătățește-ți contul folosind Monede Dragon

-
Caracter

Lista caracterelor

- {{--
Prieteni

Recruteaza prieteni si vezi statusul noilor prieteni recrutati

--}} -
Email

Schimbă adresa de email

-
Parola

Schimbă parola

-
Parola Depozit

Cere parola de la Depozit

-
Parola Stergere

Codul pentru ştergerea personajelor

-
Anularea contului

Anularea contului

- +
+ {{ __('app/user/administration.btn-topup') }} +

{{ __('app/user/administration.btn-topup-desc') }}

+
+
+ {{ __('app/user/administration.btn-characters') }} +

{{ __('app/user/administration.btn-characters-desc') }}

+
+ {{-- +
+ {{ __('app/user/administration.btn-recruit') }} +

{{ __('app/user/administration.btn-desc') }}

+
+ --}} +
+ {{ __('app/user/administration.btn-email-change') }} +

{{ __('app/user/administration.btn-email-change-desc') }}

+
+
+ {{ __('app/user/administration.btn-password-change') }} +

{{ __('app/user/administration.btn-password-change-desc') }}

+
+
+ {{ __('app/user/administration.btn-storage-password') }} +

{{ __('app/user/administration.btn-storage-password-desc') }}

+
+
+ {{ __('app/user/administration.btn-display-code') }} +

{{ __('app/user/administration.btn-display-code-desc') }}

+
+
+ {{ __('app/user/administration.btn-delete-account') }} +

{{ __('app/user/administration.btn-delete-account-desc') }}

+
-
 
+
@endsection