From 678ac68c57981c136fcadc684f197b2e321974ed Mon Sep 17 00:00:00 2001 From: miguel456 Date: Sat, 19 Mar 2022 18:05:49 +0000 Subject: [PATCH] refactor: refactored strings on user profile views --- .../user/profile/displayprofile.blade.php | 104 +++++++-------- .../user/profile/useraccount.blade.php | 122 +++++++++--------- .../user/profile/userprofile.blade.php | 38 +++--- 3 files changed, 134 insertions(+), 130 deletions(-) diff --git a/resources/views/dashboard/user/profile/displayprofile.blade.php b/resources/views/dashboard/user/profile/displayprofile.blade.php index 42f2fd9..a1a46ea 100755 --- a/resources/views/dashboard/user/profile/displayprofile.blade.php +++ b/resources/views/dashboard/user/profile/displayprofile.blade.php @@ -1,10 +1,10 @@ @extends('adminlte::page') -@section('title', config('app.name') . ' | ' . __('messages.profile.title', ['name' => $profile->user->name])) +@section('title', config('app.name') . ' | ' . __(":userNameValue's profile", ['userNameValue' => $profile->user->name])) @section('content_header') -

{{__('messages.profile.users')}} / {{__('messages.profile.profile')}} / {{ $profile->user->name }}

+

{{__('Users')}} / {{__('Profile')}} / {{ $profile->user->name }}

@stop @@ -22,9 +22,9 @@
- {{__('messages.profile.account_banned')}} {{ ($suspensionInfo['isPermanent']) ? __('permanently.') : __('until :date.', ['date' => $suspensionInfo['bannedUntil']]) }} + {{__('This account has been suspended :suspensionTypeValue', ['suspensionTypeValue' => ($suspensionInfo['isPermanent']) ? __('permanently.') : __('until :date.', ['date' => $suspensionInfo['bannedUntil']])]) }} -

{{__('messages.profile.account_banned_exp')}}

+

{{__('This user has been suspended by the admins. Admins suspend accounts for a variety of reasons, including spam.')}}

{{$suspensionInfo['reason']}} @@ -36,16 +36,16 @@ @if (Auth::user()->hasRole('admin')) - + -

{{__('messages.profile.ban_confirm')}}

+

{{__("Please confirm that you want to suspend this account. You'll need to add a reason and expiration date to confirm this.")}}

@csrf @if($demoActive)
-

This feature is disabled

+

{{ __('This feature is disabled') }}

@endif @@ -53,7 +53,7 @@
- +
@@ -66,7 +66,7 @@
-
+

{{ __('Temporary suspensions will be automatically lifted. The suspension note is visible to all users. Suspended users will not be able to login or register.') }}

@@ -81,20 +81,20 @@ @if (!Auth::user()->is($profile->user) && $profile->user->isStaffMember()) - + @if($demoActive)
-

This feature is disabled

+

{{ __('This feature is disabled') }}

@endif -

{{__('messages.profile.terminate_notice')}}

+

{{__('You are about to terminate a recruited staff member')}}

- {{__('messages.profile.terminate_notice_warning')}} + {{__('Terminating a staff member will remove their privileges on the application management site and connected integrations configured for the vacancy they applied for.')}}

- {{__('messages.profile.terminate_notice_consequence')}} + {{__('THIS PROCESS IS IRREVERSIBLE AND IMMEDIATE')}}

@@ -103,7 +103,7 @@ @csrf @method('PATCH') - + @@ -116,34 +116,34 @@ @if($demoActive)
-

This feature is disabled

+

{{ __('This feature is disabled') }}

@endif -

{{__('messages.profile.delete_acc_warn')}}

+

{{__('WARNING: This is a potentially destructive action!')}}

-

{{__('messages.profile.delete_acc_consequence')}}

+

{{__("Deleting a user's account is an irreversible process. Historic and current applications, votes, and profile content, as well as any personally identifiable information will be immediately erased.")}}

$profile->user->id])}}> @csrf @method('DELETE') - - + +
- +
-

{{__('messages.profile.search_result')}}

+

{{__('Search results')}}

@if (!isset($ipInfo->message)) @@ -152,59 +152,59 @@ - {{__('messages.profile.origin_cc')}} + {{__('Origin country')}} {{$ipInfo->country_name ?? 'N/A'}} - {{__('messages.profile.state_prov')}} + {{__('State/Province')}} {{$ipInfo->state_prov ?? 'None'}} - {{__('messages.profile.district')}} + {{__('District (if any)')}} {{$ipInfo->district ?? 'N/A'}} - {{__('messages.profile.city')}} + {{__('City')}} {{$ipInfo->city ?? 'N/A'}} - {{__('messages.profile.zipcode')}} + {{__('Postal code')}} {{$ipInfo->zipcode ?? 'N/A'}} - {{__('messages.profile.coords')}} + {{__('Geographical coordinates')}} {{$ipInfo->latitude ?? 0}}, {{$ipInfo->longitude ?? 0}} - {{__('messages.profile.european')}} - {{($ipInfo->is_eu) ? __('messages.reusable.yes') : __('messages.reusable.no')}} + {{__('European?')}} + {{($ipInfo->is_eu) ? __('Yes') : __('No')}} - {{__('messages.profile.isp')}} + {{__('ISP')}} {{$ipInfo->isp ?? 'N/A'}} - {{__('messages.profile.org')}} + {{__('Organization')}} {{$ipInfo->organization ?? 'N/A'}} - {{__('messages.profile.ctype')}} + {{__('Connection type (e.g. datacenter, home)')}} {{$ipInfo->connection_type ?? 'N/A'}} - {{__('messages.profile.timezone')}} - {{$ipInfo->time_zone->name ?? 'N/A'}} + {{__('Timezone')}} + {{$ipInfo->time_zone->name ?? __('N/A')}} @@ -214,7 +214,7 @@ @else
- {{__('messages.profile.noresults')}} + {{__("This query didn't return any results.")}}

{{$ipInfo->message}}

@@ -229,7 +229,7 @@ @if($demoActive)
-

This feature is disabled

+

{{ __('This feature is disabled') }}

@endif @@ -237,13 +237,13 @@ @csrf @method('PATCH') - + - + - +

{{__('messages.profile.edituser_consequence')}} @@ -251,7 +251,7 @@

- + @@ -274,7 +274,7 @@ - + @@ -290,9 +290,9 @@
@if($profile->avatarPreference == 'gravatar') - User profile picture + {{ __('User profile picture') }} @else - User profile picture + {{ __('User profile picture') }} @endif
@@ -315,15 +315,15 @@ @endif

{{$profile->profileShortBio}}

-

{{__('messages.reusable.member_since', ['date' => $since])}}

+

{{__('Member since :date', ['date' => $since])}}

@if (Auth::user()->hasRole('admin')) - + @endif @if ($profile->user->is(Auth::user())) @elseif (Auth::user()->hasRole('admin') && $profile->user->isStaffMember()) - + @endif @@ -350,7 +350,7 @@
@@ -369,9 +369,9 @@ @endif -
+
-
+
@@ -393,7 +393,7 @@
- + $discord])}}')" class="pr-2 pl-2"> @@ -413,7 +413,7 @@
-

{{__('messages.reusable.abt')}}

+

{{__('About')}}

diff --git a/resources/views/dashboard/user/profile/useraccount.blade.php b/resources/views/dashboard/user/profile/useraccount.blade.php index d5aedde..bf21354 100755 --- a/resources/views/dashboard/user/profile/useraccount.blade.php +++ b/resources/views/dashboard/user/profile/useraccount.blade.php @@ -1,10 +1,10 @@ @extends('adminlte::page') -@section('title', config('app.name') . ' | ' . __('messages.profile.account_settings')) +@section('title', config('app.name') . ' | ' . __('Account Settings')) @section('content_header') -

{{__('messages.reusable.profile')}} / {{__('messages.reusable.acc')}} / {{__('messages.reusable.settings')}}

+

{{__('My Profile')}} / {{__('Account')}} / {{__('Settings')}}

@stop @@ -36,19 +36,24 @@
  • {{ __('Name, Email and MC Username') }}
  • {{ __('Your previous applications') }}
  • {{ __('Your profile data and preferences') }}
  • -
  • {{ __('If you were a staff member:') }}
  • -
      -
    • {{ __('Your comments') }}
    • -
    • {{ __('Any votes') }}
    • -
    • {{ __('Your roles') }}
    • -
    +
  • {{ __('Any other information stored in your user profile') }}
  • + @role('reviewer') +
  • {{ __('Since you are a staff member, the following is also removed:') }}
  • +
      +
    • {{ __('Your comments') }}
    • +
    • {{ __('Any votes') }}
    • +
    • {{ __('Your roles') }}
    • +
    • {{ __('Your files on any team') }}
    • +
    + @endrole

    {{ __('What is not deleted:') }}

    • {{ __('Server logs of your visits, including IP addresses') }}
    -

    {{ __("Note: After you verify your identity, you'll receive an email with more information asking you to confirm this request.") }}

    +

    {{ __("Note: After you verify your identity, you'll receive an email with more information asking you to confirm or cancel this request.") }}

    +

    {{ __('Your account will be locked during this process.') }}

    @@ -85,7 +90,7 @@ - + @if($demoActive)
    @@ -93,14 +98,14 @@
    @endif -

    {{__('messages.profile.2fa_welcome')}}

    +

    {{__("We're glad you decided to increase your account's security!")}}

    -

    {{__('messages.profile.supported_apps')}}

    +

    {{__('Supported apps you can install:')}}

    -

    {{__('messages.profile.scan_code', ['scannable', 'QR'])}}

    +

    {{__('Scan the QR code with your preferred app, and then copy the code here.')}}

    @@ -118,7 +123,7 @@ @csrf @method('PATCH') - + @@ -131,7 +136,7 @@ - + @@ -141,21 +146,21 @@ @if (Auth::user()->has2FA()) - + -

    {{__('messages.application_m.modal_confirm')}} {{__('messages.profile.2fa_remove_consequence')}}

    +

    {{__('Are you sure?')}} {{__('Removing two-factor authentication will reduce the security of your account.')}}

    @csrf @method('PATCH') - + -

    {{__('messages.profile.2fa_password_confirm_exp')}}

    +

    {{__('To prevent unauthorized changes, a password is always required for sensitive operations.')}}

    - - {{__('messages.reusable.confirm_click')}} + + {{__('Click to Confirm')}}
    @@ -163,7 +168,7 @@ - + @@ -175,24 +180,24 @@ @@ -206,10 +211,9 @@
    -

    {{__('messages.welcome_back')}} {{Auth::user()->name}}

    +

    {{__('Welcome back, :userNameValue!', ['userNameValue' => Auth::user()->name])}}

    {{Auth::user()->email}}

    - {{__('messages.reusable.view')}} @ NameMC
    @@ -225,10 +229,10 @@

    {{ __('Your password has expired') }}

    - {{ __('You\'ve been redirected here because your password has expired. All users must change their password every :numDaysChangePw days. This is put in place to make sure user accounts remain secure.', ['numDaysChangePw' => \App\Facades\Options::getOption('password_expiry')]) }} + {{ __("You've been redirected here because your password has expired. All users must change their password every :numDaysChangePw days. This is put in place to make sure user accounts remain secure.", ['numDaysChangePw' => \App\Facades\Options::getOption('password_expiry')]) }}

    -

    {{ __('Please change update your password now. You won\'t be able to use the site until you do this.') }}

    +

    {{ __("Please change update your password now. You won't be able to use the site until you do this.") }}

    @@ -241,16 +245,16 @@ @endif -
    {{__('messages.profile.change_password')}}
    -

    {{__('messages.profile.change_password_exp')}}

    +
    {{__('Change Password')}}
    +

    {{__('Change your password here. This will log you out from all existing sessions for your security.')}}

    @csrf @method('PATCH') - + -

    {{__('messages.forgot_pw', ['link' => '' . __('messages.reusable.here') . ''])}}

    +

    {!! __('Forgot password? Reset it here!') !!}

    - + - +
    - +
    -
    {{__('messages.profile.2fa')}}
    +
    {{__('Two Factor Authentication')}}

    @if (Auth::user()->has2FA()) -

    {{__('messages.profile.2fa_enable_success')}}

    - +

    {{__('Hooray! 2FA is setup correctly for your account. A code will be asked each time you login.')}}

    + @else -

    {{__('messages.profile.2fa_avail')}}{{__('messages.profile.2fa_avail_exp')}}

    - +

    {{__('Two-factor auth is available for your account.')}}{{__("Enabling this security option greatly increases your account's security in case your password ever gets stolen.")}}

    + @endif
    -
    {{__('messages.profile.session_manager')}}
    -

    {{__('messages.profile.terminate_others')}}

    -

    {{__('messages.profile.current_session', ['ipAddress' => (!$shouldCollect) ? '0.0.0.0 (censored)' : $ip])}}

    - +
    {{__('Session Manager')}}
    +

    {{__('Terminating other sessions is a mustif your account has been compromised.')}}

    +

    {{__('Your current session: logged in from :ipAddress', ['ipAddress' => (!$shouldCollect) ? __('0.0.0.0 (censored)') : $ip])}}

    +
    @if($demoActive) @@ -316,8 +320,8 @@

    {{ __('This feature is disabled') }}

    @endif -
    {{__('messages.profile.contact_settings')}}
    -

    {{__('messages.profile.personal_data_change')}}

    +
    {{__('Contact settings')}}
    +

    {{__('Need to change personal data? You can do so here.')}}

    @@ -325,11 +329,11 @@ @method('PATCH')
    - + - + @@ -337,13 +341,13 @@
    - + -

    {{__('messages.profile.security_nochangepw')}}

    +

    {{__('For security reasons, you cannot make important account changes without confirming your password. You will also need to verify your new email address.')}}

    - +
    @@ -351,7 +355,7 @@
    {{ __('Danger Zone') }}

    {{ __('Careful! Actions in these tab might result in irreversible loss of data.') }}

    - + diff --git a/resources/views/dashboard/user/profile/userprofile.blade.php b/resources/views/dashboard/user/profile/userprofile.blade.php index 32429f6..c2f1264 100755 --- a/resources/views/dashboard/user/profile/userprofile.blade.php +++ b/resources/views/dashboard/user/profile/userprofile.blade.php @@ -1,10 +1,10 @@ @extends('adminlte::page') -@section('title', config('app.name') . ' | ' . __('messages.profile.profile')) +@section('title', config('app.name') . ' | ' . __('Profile')) @section('content_header') -

    {{__('messages.reusable.profile')}} / {{__('messages.reusable.settings')}}

    +

    {{__('Profile')}} / {{__('Settings')}}

    @stop @@ -47,9 +47,9 @@
    @if($profile->avatarPreference == 'gravatar') - User profile picture + {{ __('User profile picture') }} @else - User profile picture + {{ __('User profile picture') }} @endif
    @@ -100,7 +100,7 @@
    -

    {{__('messages.profile.basic_info')}}

    +

    {{__('Basic Information')}}

    @@ -110,7 +110,7 @@
    - +
    @@ -119,16 +119,16 @@
    - +
    - + -

    {{__('messages.vacancy.markdown')}}

    +

    {{__('Markdown supported')}}

    @@ -143,55 +143,55 @@
    -

    {{__('messages.profile.pref_media')}}

    +

    {{__('Preferences & Media')}}

    - +
    - +
    - +
    - +
    - +
    - +
    @@ -206,7 +206,7 @@
    - +