Added PTB Translation of emails and some pages

Now the main page, item page and e-mails are translated
into Brazilian Portuguese
This commit is contained in:
2018-09-27 13:00:03 -03:00
parent 1ff8a4f492
commit 63ef369e16
28 changed files with 476 additions and 66 deletions

View File

@@ -1,15 +1,18 @@
@component('mail::message')
Hi, {{$username}},
&nbsp;<br>
&nbsp;<br>
#Good news: {{$item->name}} is available!
&nbsp;<br>
The item <em>{{$item->name}} ({{$item->product->name}})</em> is now available on **Share&nbsp;It**.
&nbsp;<br>
**Take It** before anyone else at the website:
{!! __('Hi, :username,', ['username' => $username]) !!}
#{!! __('Good news: :itemname is available!', ['itemname' => $item->name]) !!}
{!! __('The item <em>:itemname (:productname)</em> is now available on **Share&nbsp;It**.', ['itemname' => $item->name, 'productname' => $item->product->name]) !!}
{!! __('**Take It** before anyone else at the website:') !!}
@component('mail::button', ['url' => 'https://shareit.brunofontes.net/home'])
Share It!
{{ config('app.name') }}
@endcomponent
@endcomponent

View File

@@ -1,11 +1,15 @@
@component('mail::message')
Hello, {{$userWithItem}},
{!! __('Hi, :username,', ['username' => $userWithItem]) !!}
Are you still using {{$item->name}}?
We just want to let you know that {{$waitingUser}} asked us to be alerted when this item were available.
{!! __('Are you still using :itemname?', ['itemname' => $item->name]) !!}
{!! __('We just want to let you know that :waitinguser asked us to be alerted when this item were available.', ['waitinguser' => $waitingUser]) !!}
{!! __('So, if you are not using it anymore, please **Return It** at the website:') !!}
So, if you are not using it anymore, please **Return It** at the website:
@component('mail::button', ['url' => 'https://shareit.brunofontes.net/home'])
Share It!

View File

@@ -1,12 +1,17 @@
@component('mail::message')
# Welcome, {{$user->name}},
# @lang('Welcome, :username,', ['username' => $user->name])
Thank's for registering at **Share&nbsp;It!**
Your account was created, but you still need to activate it. We've sent you another e-mail and we are ready to go!
@lang("Thank's for registering at **Share It!**")
@lang("Your account was created, but you still need to activate it. We've sent you another e-mail and we are ready to go!")
@lang("And you? Are you ready to Share It with your friends?")
And you? Are you ready to Share It with your friends? :)
@component('mail::button', ['url' => 'https://shareit.brunofontes.net'])
Share It!
{{ config('app.name') }}
@endcomponent
@endcomponent

View File

@@ -29,7 +29,7 @@
@include ('item.otherItems')
<div class="float-right mt-2"><a class="btn btn-secondary" href="/product/{{ $item->product->id }}">BACK</a></div>
<div class="float-right mt-2"><a class="btn btn-secondary" href="/product/{{ $item->product->id }}">{{ __('item.back') }}</a></div>
</div>
</div>
</div>

View File

@@ -5,22 +5,22 @@
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="deleteModalLabel">Confirmation...</h5>
<h5 class="modal-title" id="deleteModalLabel">{{ __('item.confirmation') }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<p>Would you like to delete the item <strong>{{$item->name}}</strong>?</p>
<p>You will not be able to restore it after deletion.</p>
<p>{!! __('item.confirmDeletion', ['itemname' => $item->name]) !!}</p>
<p>{!! __('item.notAbleRestore') !!}</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ __('item.close') }}</button>
<form action="/item/" method="POST">
@method('DELETE')
{{ csrf_field() }}
<input type="hidden" name="item" value="{{$item->id}}">
<button type="submit" class="btn btn-danger">Delete</button>
<button type="submit" class="btn btn-danger">{{ __('item.delete') }}</button>
</form>
</div>
</div>

View File

@@ -1,11 +1,11 @@
<button type="button" class="btn btn-sm btn-secondary mr-1" data-toggle="modal" data-target="#editModal">Edit</button>
<button type="button" class="btn btn-sm btn-secondary mr-1" data-toggle="modal" data-target="#editModal">{{ __('item.edit') }}</button>
<!-- MODAL - CHANGE WINDOW -->
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="editModalLabel">Edit item</h5>
<h5 class="modal-title" id="editModalLabel">{{ __('item.edititem') }}</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
@@ -14,7 +14,7 @@
<form action="/item" method="POST">
<div class="modal-body">
<div class="form-group">
<label for="name" class="col-form-label">New name: </label>
<label for="name" class="col-form-label">{{ __('item.newname') }} </label>
<input type="text" name="name" id="name" class="form-control" value="{{$item->name}}">
</div>
</div>
@@ -22,8 +22,8 @@
@method('PATCH')
{{ csrf_field() }}
<input type="hidden" name="item" value="{{$item->id}}">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-danger">Edit</button>
<button type="button" class="btn btn-secondary" data-dismiss="modal">{{ __('item.close') }}</button>
<button type="submit" class="btn btn-danger">{{ __('item.edit') }}</button>
</div>
</form>

View File

@@ -1,6 +1,6 @@
<div class="card mt-4">
<div class="card-header">
Other items from the same product
{{ __('item.otherItems') }}
</div>
<div class="card-body">
@@ -10,7 +10,7 @@
<li><a href="/item/{{ $otherItem->id }}">{{ $otherItem->name }}</a></li>
@endif
@empty
<p>There are no items yet. Include one with the form above.</p>
<p>{{ __('item.noItems') }}</p>
@endforelse
</ul>
</div>

View File

@@ -1,4 +1,4 @@
<p><strong>Users:</strong></p>
<p><strong>{{ __('item.users') }}</strong></p>
@forelse ($users as $user)
@if (!$loop->first)
<hr>
@@ -14,27 +14,27 @@
@method('DELETE')
<input type="hidden" name="item_id" id="item_id" value="{{ $item['id'] }}">
<input type="hidden" class="form-control" name="user_id" id="user_id" value="{{$user->id}}">
<button type="submit" class="btn btn-sm btn-danger">Delete</button>
<button type="submit" class="btn btn-sm btn-danger">{{ __('item.delete') }}</button>
</div>
</div>
</div>
</form>
@empty
<p>There are no items yet. Include one with the form above.</p>
<p>{{ __('item.noItems') }}</p>
@endforelse
<!-- ADD USERS -->
<hr class="mt-5">
<p><strong>Add user</strong></p>
<p><strong>{{ __('item.addUser') }}</strong></p>
<form method="POST" action="/user">
<div class="container-fluid">
<div class="form-group row mt-2">
{{ csrf_field() }}
<div class="col-sm-2 col-lg-auto"><label for="name">E-mail: </label></div>
<div class="col-xs-12 col-sm mb-3"><input type="email" class="form-control" name="email" id="email" placeholder="name@domain.com" required></div>
<div class="col-sm-2 col-lg-auto"><label for="name">{{ __('item.email') }}</label></div>
<div class="col-xs-12 col-sm mb-3"><input type="email" class="form-control" name="email" id="email" placeholder="{{ __('item.nameDomain') }}" required></div>
<input type="hidden" name="item_id" id="item_id" value="{{ $item['id'] }}" required>
<div class="col-sm-2 col-lg-1 mr-4"><button type="submit" class="btn btn-primary">Insert</button></div>
<div class="col-sm-2 col-lg-1 mr-4"><button type="submit" class="btn btn-primary">{{ __('item.insert') }}</button></div>
</div>
</div>
</form>

View File

@@ -79,10 +79,10 @@
@if (Route::has('login'))
<div class="top-right links">
@auth
<a href="{{ url('/home') }}">Home</a>
<a href="{{ url('/home') }}">@lang('welcome.Home')</a>
@else
<a href="{{ route('login') }}">Login</a>
<a href="{{ route('register') }}">Register</a>
<a href="{{ route('login') }}">@lang('welcome.Login')</a>
<a href="{{ route('register') }}">@lang('welcome.Register')</a>
@endauth
</div>
@endif
@@ -94,20 +94,20 @@
<div class="links">
@auth
<a href="/home">Home</a>
<a href="/product">Products</a>
<a href="/home">@lang('welcome.Home')</a>
<a href="/product">@lang('welcome.Products')</a>
@else
<a href="/register">Register</a>
<a href="/login">Login</a>
<a href="/login">@lang('welcome.Login')</a>
<a href="/register">@lang('welcome.Register')</a>
@endauth
<a href="/help">Help</a>
<a href="/help">@lang('welcome.Help')</a>
</div>
<div>
<br>
</div>
<div class="links footer">
<a href="https://brunofontes.net">By Bruno Fontes</a>
<p>© 2018 Bruno Fontes All Rights Reserved</p>
<a href="https://brunofontes.net">@lang('welcome.byAuthor')</a>
<p>@lang('welcome.copyright')</p>
</div>
</div>
</div>