Skip to content

[1.x] Make labels translatable in livewire views #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<x-slot name="form">
<!-- Token Name -->
<div class="col-span-6 sm:col-span-4">
<x-jet-label for="name" value="Token Name" />
<x-jet-label for="name" value="{{ __('Token Name') }}" />
<x-jet-input id="name" type="text" class="mt-1 block w-full" wire:model.defer="createApiTokenForm.name" autofocus />
<x-jet-input-error for="name" class="mt-2" />
</div>

<!-- Token Permissions -->
@if (Laravel\Jetstream\Jetstream::hasPermissions())
<div class="col-span-6">
<x-jet-label for="permissions" value="Permissions" />
<x-jet-label for="permissions" value="{{ __('Permissions') }}" />

<div class="mt-2 grid grid-cols-1 md:grid-cols-2 gap-4">
@foreach (Laravel\Jetstream\Jetstream::$permissions as $permission)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@

<x-slot name="form">
<div class="col-span-6 sm:col-span-4">
<x-jet-label for="current_password" value="Current Password" />
<x-jet-label for="current_password" value="{{ __('Current Password') }}" />
<x-jet-input id="current_password" type="password" class="mt-1 block w-full" wire:model.defer="state.current_password" autocomplete="current-password" />
<x-jet-input-error for="current_password" class="mt-2" />
</div>

<div class="col-span-6 sm:col-span-4">
<x-jet-label for="password" value="New Password" />
<x-jet-label for="password" value="{{ __('New Password') }}" />
<x-jet-input id="password" type="password" class="mt-1 block w-full" wire:model.defer="state.password" autocomplete="new-password" />
<x-jet-input-error for="password" class="mt-2" />
</div>

<div class="col-span-6 sm:col-span-4">
<x-jet-label for="password_confirmation" value="Confirm Password" />
<x-jet-label for="password_confirmation" value="{{ __('Confirm Password') }}" />
<x-jet-input id="password_confirmation" type="password" class="mt-1 block w-full" wire:model.defer="state.password_confirmation" autocomplete="new-password" />
<x-jet-input-error for="password_confirmation" class="mt-2" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
reader.readAsDataURL($refs.photo.files[0]);
" />

<x-jet-label for="photo" value="Photo" />
<x-jet-label for="photo" value="{{ __('Photo') }}" />

<!-- Current Profile Photo -->
<div class="mt-2" x-show="! photoPreview">
Expand All @@ -48,7 +48,7 @@

<!-- Name -->
<div class="col-span-6 sm:col-span-4">
<x-jet-label for="name" value="Name" />
<x-jet-label for="name" value="{{ __('Name') }}" />
<x-jet-input id="name" type="text" class="mt-1 block w-full" wire:model.defer="state.name" autocomplete="name" />
<x-jet-input-error for="name" class="mt-2" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<x-slot name="form">
<div class="col-span-6">
<x-jet-label value="Team Owner" />
<x-jet-label value="{{ __('Team Owner') }}" />

<div class="flex items-center mt-2">
<img class="w-12 h-12 rounded-full object-cover" src="{{ $this->user->profile_photo_url }}" alt="{{ $this->user->name }}">
Expand All @@ -22,7 +22,7 @@
</div>

<div class="col-span-6 sm:col-span-4">
<x-jet-label for="name" value="Team Name" />
<x-jet-label for="name" value="{{ __('Team Name') }}" />
<x-jet-input id="name" type="text" class="mt-1 block w-full" wire:model.defer="state.name" autofocus />
<x-jet-input-error for="name" class="mt-2" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@

<!-- Member Email -->
<div class="col-span-6 sm:col-span-4">
<x-jet-label for="email" value="Email" />
<x-jet-label for="email" value="{{ __('Email') }}" />
<x-jet-input id="name" type="text" class="mt-1 block w-full" wire:model.defer="addTeamMemberForm.email" />
<x-jet-input-error for="email" class="mt-2" />
</div>

<!-- Role -->
@if (count($this->roles) > 0)
<div class="col-span-6 lg:col-span-4">
<x-jet-label for="role" value="Role" />
<x-jet-label for="role" value="{{ __('Role') }}" />
<x-jet-input-error for="role" class="mt-2" />

<div class="mt-1 border border-gray-200 rounded-lg cursor-pointer">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<x-slot name="form">
<!-- Team Owner Information -->
<div class="col-span-6">
<x-jet-label value="Team Owner" />
<x-jet-label value="{{ __('Team Owner') }}" />

<div class="flex items-center mt-2">
<img class="w-12 h-12 rounded-full object-cover" src="{{ $team->owner->profile_photo_url }}" alt="{{ $team->owner->name }}">
Expand All @@ -24,7 +24,7 @@

<!-- Team Name -->
<div class="col-span-6 sm:col-span-4">
<x-jet-label for="name" value="Team Name" />
<x-jet-label for="name" value="{{ __('Team Name') }}" />

<x-jet-input id="name"
type="text"
Expand Down