mirror of
https://github.com/brunofontes/shareit.git
synced 2024-11-23 20:10:52 +00:00
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:
parent
1ff8a4f492
commit
63ef369e16
@ -73,7 +73,7 @@ class RegisterController extends Controller
|
||||
|
||||
\Mail::to($user)->send(new Welcome($user));
|
||||
|
||||
session()->flash(FlashMessage::PRIMARY, 'Thanks for registering. Please, do not forget to validate your e-mail address.');
|
||||
session()->flash(FlashMessage::PRIMARY, __('Thanks for registering. Please, do not forget to validate your e-mail address.'));
|
||||
|
||||
return $user;
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ class VerificationController extends Controller
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $redirectTo = '/home';
|
||||
protected $redirectTo = '/';
|
||||
|
||||
/**
|
||||
* Create a new controller instance.
|
||||
|
@ -13,7 +13,11 @@ class ItemController extends Controller
|
||||
{
|
||||
$item = Item::find($id);
|
||||
if (!$item || $item->product->user_id != \Auth::id()) {
|
||||
session()->flash(flash::DANGER, "The item doesn't exist.");
|
||||
session()->flash(flash::DANGER,
|
||||
\Lang::getFromJson(
|
||||
"The item doesn't exist."
|
||||
)
|
||||
);
|
||||
return back();
|
||||
}
|
||||
$users = $item->users()->get();
|
||||
|
@ -71,7 +71,12 @@ class ProductController extends Controller
|
||||
$product = Product::fromAuthUser()->find($id);
|
||||
|
||||
if (!$product) {
|
||||
session()->flash(flash::DANGER, "The product doesn't exist or doesn't belongs to you.");
|
||||
session()->flash(
|
||||
flash::DANGER,
|
||||
\Lang::getFromJson(
|
||||
"The product doesn't exist or doesn't belongs to you."
|
||||
)
|
||||
);
|
||||
return redirect('/product');
|
||||
}
|
||||
return view('product.show', compact('product'));
|
||||
|
@ -13,7 +13,11 @@ class TakeController extends Controller
|
||||
{
|
||||
$item = User::loggedIn()->items()->find(request('item'));
|
||||
if ($item->used_by) {
|
||||
return back()->withErrors("This item is already taken");
|
||||
return back()->withErrors(
|
||||
\Lang::getFromJson(
|
||||
"This item is already taken"
|
||||
)
|
||||
);
|
||||
}
|
||||
$item->used_by = \Auth::id();
|
||||
$item->save();
|
||||
|
@ -42,14 +42,22 @@ class UserController extends Controller
|
||||
$userArray = User::where('email', request('email'))->get();
|
||||
|
||||
if (count($userArray) == 0) {
|
||||
return back()->withErrors("The e-mail address is not registered yet.");
|
||||
return back()->withErrors(
|
||||
\Lang::getFromJson("The e-mail address is not registered yet.")
|
||||
);
|
||||
}
|
||||
|
||||
$item = Item::findOrFail(request('item_id'));
|
||||
if ($item->product->user_id == \Auth::id()) {
|
||||
User::findOrFail($userArray[0]->id)->items()->syncWithoutDetaching([request('item_id')]);
|
||||
User::findOrFail($userArray[0]->id)
|
||||
->items()
|
||||
->syncWithoutDetaching([request('item_id')]);
|
||||
} else {
|
||||
return back()->withErrors("You cannot add a user to a product that is not yourse.");
|
||||
return back()->withErrors(
|
||||
\Lang::getFromJson(
|
||||
"You cannot add a user to a product that is not yourse."
|
||||
)
|
||||
);
|
||||
}
|
||||
return back();
|
||||
}
|
||||
@ -67,12 +75,20 @@ class UserController extends Controller
|
||||
$item = Item::findOrFail(request('item_id'));
|
||||
|
||||
if ($item->product->user_id == \Auth::id()) {
|
||||
$returnItem = User::findOrFail(request('user_id'))->items()->findOrFail(request('item_id'));
|
||||
$returnItem = User::findOrFail(request('user_id'))
|
||||
->items()
|
||||
->findOrFail(request('item_id'));
|
||||
$returnItem->used_by = null;
|
||||
$returnItem->save();
|
||||
User::findOrFail(request('user_id'))->items()->detach([request('item_id')]);
|
||||
User::findOrFail(request('user_id'))
|
||||
->items()
|
||||
->detach([request('item_id')]);
|
||||
} else {
|
||||
return back()->withErrors("You cannot remove a user from a product that is not yourse.");
|
||||
return back()->withErrors(
|
||||
\Lang::getFromJson(
|
||||
"You cannot remove a user from a product that is not yourse."
|
||||
)
|
||||
);
|
||||
}
|
||||
return back();
|
||||
}
|
||||
|
@ -32,7 +32,11 @@ class ItemAvailable extends Mailable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->subject($this->item->name . ' is available!')
|
||||
->markdown('emails.itemAvailable');
|
||||
return $this->subject(
|
||||
\Lang::getFromJson(
|
||||
':itemname is available!',
|
||||
['itemname' => $this->item->name]
|
||||
)
|
||||
)->markdown('emails.itemAvailable');
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,14 @@ class UserWaiting extends Mailable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->subject($this->waitingUser . ' wants to use ' . $this->item->name)
|
||||
->markdown('emails.userWaiting');
|
||||
return $this->subject(
|
||||
\Lang::getFromJson(
|
||||
':waitinguser wants to use :itemname',
|
||||
[
|
||||
'waitinguser' => $this->waitingUser,
|
||||
'itemname' => $this->item->name
|
||||
]
|
||||
)
|
||||
)->markdown('emails.userWaiting');
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
|
||||
namespace App\Mail;
|
||||
|
||||
use \Lang;
|
||||
use \App\User;
|
||||
use Illuminate\Bus\Queueable;
|
||||
use Illuminate\Mail\Mailable;
|
||||
@ -30,6 +31,6 @@ class Welcome extends Mailable
|
||||
*/
|
||||
public function build()
|
||||
{
|
||||
return $this->markdown('emails.welcome');
|
||||
return $this->subject(Lang::getFromJson('Welcome'))->markdown('emails.welcome');
|
||||
}
|
||||
}
|
||||
|
40
resources/lang/en/item.php
Normal file
40
resources/lang/en/item.php
Normal file
@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/**
|
||||
* Strings from Item Delete button menu
|
||||
*/
|
||||
'confirmation' => 'Confirmation...',
|
||||
'confirmDeletion' => 'Would you like to delete the item <strong>:itemname</strong>?',
|
||||
'notAbleRestore' => 'You will not be able to restore it after deletion.',
|
||||
'close' => 'Close',
|
||||
'delete' => 'Delete',
|
||||
|
||||
/**
|
||||
* Strings from Item Edit button menu
|
||||
*/
|
||||
'edit' => 'Edit',
|
||||
'edititem' => 'Edit item',
|
||||
'newname' => 'New name:',
|
||||
|
||||
/**
|
||||
* Strings from the Users box on Item page
|
||||
*/
|
||||
'users' => 'Users:',
|
||||
'noItems' => 'There are no items yet. Include one with the form above.',
|
||||
'addUser' => 'Add user',
|
||||
'email' => 'E-mail: ',
|
||||
'nameDomain' => 'name@domain.com',
|
||||
'insert' => 'Insert',
|
||||
|
||||
/**
|
||||
* String from otherItems.blade.php - Other items box from item page
|
||||
*/
|
||||
'otherItems' => 'Other items from the same product',
|
||||
|
||||
/**
|
||||
* String from item.blade.php
|
||||
*/
|
||||
'back' => 'BACK',
|
||||
|
||||
];
|
10
resources/lang/en/welcome.php
Normal file
10
resources/lang/en/welcome.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
return [
|
||||
'Home' => 'Home',
|
||||
'Login' => 'Login',
|
||||
'Register' => 'Register',
|
||||
'Products' => 'Products',
|
||||
'Help' => 'Help',
|
||||
'copyright' => '© 2018 Bruno Fontes All Rights Reserved',
|
||||
'byAuthor' => 'By Bruno Fontes',
|
||||
];
|
50
resources/lang/pt-br.json
Normal file
50
resources/lang/pt-br.json
Normal file
@ -0,0 +1,50 @@
|
||||
{
|
||||
"Reset Password": "Redefinir senha",
|
||||
"E-Mail Address" : "E-mail",
|
||||
"Send Password Reset Link" : "Redefinir senha",
|
||||
"Password" : "Senha",
|
||||
"Confirm Password" : "Confirmar senha",
|
||||
"Login" : "Entrar",
|
||||
"Remember Me" : "Manter conectado",
|
||||
"Forgot Your Password?" : "Esqueceu sua senha?",
|
||||
"Register" : "Cadastrar",
|
||||
"Name" : "Nome",
|
||||
"Logout" : "Desconectar",
|
||||
"Verify Your Email Address" : "Confirme seu e-mail",
|
||||
"A fresh verification link has been sent to your email address." : "Enviamos outro link de confirmação para o seu e-mail.",
|
||||
"Before proceeding, please check your email for a verification link." : "Antes de continuar, use o link de confirmação que enviamos para o seu e-mail.",
|
||||
"If you did not receive the email" : "Se você não recebeu o e-mail",
|
||||
"click here to request another" : "clique aqui para enviar novamente",
|
||||
"Thanks for registering. Please, do not forget to validate your e-mail address." : "Obrigado por se cadastrar. Não esqueça de validar seu e-mail.",
|
||||
|
||||
"Welcome": "Bem-vindo!",
|
||||
"Welcome, :username,": "Bem-vindo, :username,",
|
||||
"Thank's for registering at **Share It!**" : "Obrigado por se registrar no **Share 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!" : "Sua conta foi criada, mas você ainda precisa confirmar o seu e-mail para usá-la. Enviamos um outro e-mail com a confirmação.",
|
||||
"And you? Are you ready to Share It with your friends?" : "E você? Está pronto para compartilhar?",
|
||||
|
||||
":waitinguser wants to use :itemname": ":waitinguser quer usar :itemname",
|
||||
"Hello!": "Olá!",
|
||||
"Verify Email Address" : "Confirme o seu e-mail",
|
||||
"Please click the button below to verify your email address." : "Clique no botão abaixo para confirmar o seu e-mail.",
|
||||
"If you did not create an account, no further action is required." : "Se você não criou uma conta, basta ignorar este e-mail.",
|
||||
"Regards": "Obrigado",
|
||||
|
||||
":itemname is available!": ":itemname está disponível!",
|
||||
"Hi, :username,": "Olá, :username,",
|
||||
"Good news: :itemname is available!": "Uma boa notícia: :itemname está disponível!",
|
||||
"The item <em>:itemname (:productname)</em> is now available on **Share It**.": "O item <em>:itemname (:productname)</em> já está disponível no **Share It**.",
|
||||
"**Take It** before anyone else at the website:": "Entre no nosso site para usar o item antes de todo mundo.",
|
||||
|
||||
"Are you still using :itemname?": "Você ainda está usando o item :itemname?",
|
||||
"We just want to let you know that :waitinguser asked us to be alerted when this item were available.": "A gente apenas queria dizer que :waitinguser nos pediu para avisar quando esse item estivesse disponível.",
|
||||
"So, if you are not using it anymore, please **Return It** at the website:": "Então, se você não estiver mais usando, por favor, **Devolva** no nosso site:",
|
||||
|
||||
"The e-mail address is not registered yet.": "Esse usuário ainda não está cadastrado.",
|
||||
"You cannot add a user to a product that is not yourse.": "Você não pode adicionar um usuário a um produto que não é seu.",
|
||||
"You cannot remove a user from a product that is not yourse.": "Você não pode remover um usuário de um produto que não é seu.",
|
||||
|
||||
"The item doesn't exist.": "O item não existe.",
|
||||
"The product doesn't exist or doesn't belongs to you.": "O produto não existe ou não é seu.",
|
||||
"This item is already taken": "Esse item já está sendo usado"
|
||||
}
|
19
resources/lang/pt-br/auth.php
Normal file
19
resources/lang/pt-br/auth.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Authentication Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used during authentication for various
|
||||
| messages that we need to display to the user. You are free to modify
|
||||
| these language lines according to your application's requirements.
|
||||
|
|
||||
*/
|
||||
|
||||
'failed' => 'Login ou senha inválidos.',
|
||||
'throttle' => 'Limite tentativas excedido. Você pode tentar novamente após :seconds segundos.',
|
||||
|
||||
];
|
@ -5,8 +5,8 @@
|
||||
return [
|
||||
'no_messages' => 'Ainda não há itens compartilhados com você.',
|
||||
'share_item' => 'Compartilhe um item!',
|
||||
'return' => 'Retornar',
|
||||
'return' => 'Devolver',
|
||||
'cancel_alert' => 'Cancelar alerta',
|
||||
'alert_me' => 'Alertar',
|
||||
'take' => 'Pegar'
|
||||
'take' => 'Usar'
|
||||
];
|
39
resources/lang/pt-br/item.php
Normal file
39
resources/lang/pt-br/item.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
/**
|
||||
* Strings from Item Delete button menu
|
||||
*/
|
||||
'confirmation' => 'Confirmação...',
|
||||
'confirmDeletion' => 'Você gostaria de apagar o item <strong>:itemname</strong>?',
|
||||
'notAbleRestore' => 'Não será possível restaurá-lo posteriormente.',
|
||||
'close' => 'Fechar',
|
||||
'delete' => 'Apagar',
|
||||
|
||||
/**
|
||||
* Strings from Item Edit button menu
|
||||
*/
|
||||
'edit' => 'Editar',
|
||||
'edititem' => 'Editar item',
|
||||
'newname' => 'Novo nome:',
|
||||
|
||||
/**
|
||||
* Strings from the Users box on Item page
|
||||
*/
|
||||
'users' => 'Usuários:',
|
||||
'noItems' => 'Não há itens cadastrados. Adicione um no formulário acima.',
|
||||
'addUser' => 'Adicionar usuário',
|
||||
'email' => 'E-mail: ',
|
||||
'nameDomain' => 'nome@dominio.com.br',
|
||||
'insert' => 'Inserir',
|
||||
|
||||
/**
|
||||
* String from otherItems.blade.php - Other items box from item page
|
||||
*/
|
||||
'otherItems' => 'Outros items do mesmo produto',
|
||||
|
||||
/**
|
||||
* String from item.blade.php
|
||||
*/
|
||||
'back' => 'VOLTAR',
|
||||
];
|
19
resources/lang/pt-br/pagination.php
Normal file
19
resources/lang/pt-br/pagination.php
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Pagination Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used by the paginator library to build
|
||||
| the simple pagination links. You are free to change them to anything
|
||||
| you want to customize your views to better match your application.
|
||||
|
|
||||
*/
|
||||
|
||||
'previous' => '« Anterior',
|
||||
'next' => 'Próxima »',
|
||||
|
||||
];
|
22
resources/lang/pt-br/passwords.php
Normal file
22
resources/lang/pt-br/passwords.php
Normal file
@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reset Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are the default lines which match reasons
|
||||
| that are given by the password broker for a password update attempt
|
||||
| has failed, such as for an invalid token or invalid new password.
|
||||
|
|
||||
*/
|
||||
|
||||
'password' => 'As senhas precisam ter pelo menos 6 caracteres e serem iguais a confirmação.',
|
||||
'reset' => 'Sua senha foi redefinida!',
|
||||
'sent' => 'O link para redefinir sua senha foi enviado por e-mail!',
|
||||
'token' => 'O token de redefinição de senha é inválido.',
|
||||
'user' => "Não foi possível encontrar um usuário com o e-mail digitado.",
|
||||
|
||||
];
|
148
resources/lang/pt-br/validation.php
Normal file
148
resources/lang/pt-br/validation.php
Normal file
@ -0,0 +1,148 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines contain the default error messages used by
|
||||
| the validator class. Some of these rules have multiple versions such
|
||||
| as the size rules. Feel free to tweak each of these messages here.
|
||||
|
|
||||
*/
|
||||
|
||||
'accepted' => 'The :attribute must be accepted.',
|
||||
'active_url' => 'The :attribute is not a valid URL.',
|
||||
'after' => 'The :attribute must be a date after :date.',
|
||||
'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
|
||||
'alpha' => 'The :attribute may only contain letters.',
|
||||
'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
|
||||
'alpha_num' => 'The :attribute may only contain letters and numbers.',
|
||||
'array' => 'The :attribute must be an array.',
|
||||
'before' => 'The :attribute must be a date before :date.',
|
||||
'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
|
||||
'between' => [
|
||||
'numeric' => 'The :attribute must be between :min and :max.',
|
||||
'file' => 'The :attribute must be between :min and :max kilobytes.',
|
||||
'string' => 'The :attribute must be between :min and :max characters.',
|
||||
'array' => 'The :attribute must have between :min and :max items.',
|
||||
],
|
||||
'boolean' => 'The :attribute field must be true or false.',
|
||||
'confirmed' => 'Os campos :attribute e confirmar :attribute são diferentes.',
|
||||
'date' => 'The :attribute is not a valid date.',
|
||||
'date_format' => 'The :attribute does not match the format :format.',
|
||||
'different' => 'The :attribute and :other must be different.',
|
||||
'digits' => 'The :attribute must be :digits digits.',
|
||||
'digits_between' => 'The :attribute must be between :min and :max digits.',
|
||||
'dimensions' => 'The :attribute has invalid image dimensions.',
|
||||
'distinct' => 'The :attribute field has a duplicate value.',
|
||||
'email' => 'The :attribute must be a valid email address.',
|
||||
'exists' => 'The selected :attribute is invalid.',
|
||||
'file' => 'The :attribute must be a file.',
|
||||
'filled' => 'The :attribute field must have a value.',
|
||||
'gt' => [
|
||||
'numeric' => 'The :attribute must be greater than :value.',
|
||||
'file' => 'The :attribute must be greater than :value kilobytes.',
|
||||
'string' => 'The :attribute must be greater than :value characters.',
|
||||
'array' => 'The :attribute must have more than :value items.',
|
||||
],
|
||||
'gte' => [
|
||||
'numeric' => 'The :attribute must be greater than or equal :value.',
|
||||
'file' => 'The :attribute must be greater than or equal :value kilobytes.',
|
||||
'string' => 'The :attribute must be greater than or equal :value characters.',
|
||||
'array' => 'The :attribute must have :value items or more.',
|
||||
],
|
||||
'image' => 'The :attribute must be an image.',
|
||||
'in' => 'The selected :attribute is invalid.',
|
||||
'in_array' => 'The :attribute field does not exist in :other.',
|
||||
'integer' => 'The :attribute must be an integer.',
|
||||
'ip' => 'The :attribute must be a valid IP address.',
|
||||
'ipv4' => 'The :attribute must be a valid IPv4 address.',
|
||||
'ipv6' => 'The :attribute must be a valid IPv6 address.',
|
||||
'json' => 'The :attribute must be a valid JSON string.',
|
||||
'lt' => [
|
||||
'numeric' => 'The :attribute must be less than :value.',
|
||||
'file' => 'The :attribute must be less than :value kilobytes.',
|
||||
'string' => 'The :attribute must be less than :value characters.',
|
||||
'array' => 'The :attribute must have less than :value items.',
|
||||
],
|
||||
'lte' => [
|
||||
'numeric' => 'The :attribute must be less than or equal :value.',
|
||||
'file' => 'The :attribute must be less than or equal :value kilobytes.',
|
||||
'string' => 'The :attribute must be less than or equal :value characters.',
|
||||
'array' => 'The :attribute must not have more than :value items.',
|
||||
],
|
||||
'max' => [
|
||||
'numeric' => 'The :attribute may not be greater than :max.',
|
||||
'file' => 'The :attribute may not be greater than :max kilobytes.',
|
||||
'string' => 'The :attribute may not be greater than :max characters.',
|
||||
'array' => 'The :attribute may not have more than :max items.',
|
||||
],
|
||||
'mimes' => 'The :attribute must be a file of type: :values.',
|
||||
'mimetypes' => 'The :attribute must be a file of type: :values.',
|
||||
'min' => [
|
||||
'numeric' => 'O campo :attribute precisa ter pelo menos :min.',
|
||||
'file' => 'The :attribute must be at least :min kilobytes.',
|
||||
'string' => 'O campo :attribute precisa ter pelo menos :min caracteres.',
|
||||
'array' => 'The :attribute must have at least :min items.',
|
||||
],
|
||||
'not_in' => 'The selected :attribute is invalid.',
|
||||
'not_regex' => 'The :attribute format is invalid.',
|
||||
'numeric' => 'The :attribute must be a number.',
|
||||
'present' => 'The :attribute field must be present.',
|
||||
'regex' => 'The :attribute format is invalid.',
|
||||
'required' => 'The :attribute field is required.',
|
||||
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||
'required_with' => 'The :attribute field is required when :values is present.',
|
||||
'required_with_all' => 'The :attribute field is required when :values is present.',
|
||||
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||
'same' => 'The :attribute and :other must match.',
|
||||
'size' => [
|
||||
'numeric' => 'The :attribute must be :size.',
|
||||
'file' => 'The :attribute must be :size kilobytes.',
|
||||
'string' => 'The :attribute must be :size characters.',
|
||||
'array' => 'The :attribute must contain :size items.',
|
||||
],
|
||||
'string' => 'The :attribute must be a string.',
|
||||
'timezone' => 'The :attribute must be a valid zone.',
|
||||
'unique' => 'The :attribute has already been taken.',
|
||||
'uploaded' => 'The :attribute failed to upload.',
|
||||
'url' => 'The :attribute format is invalid.',
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Language Lines
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may specify custom validation messages for attributes using the
|
||||
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||
| specify a specific custom language line for a given attribute rule.
|
||||
|
|
||||
*/
|
||||
|
||||
'custom' => [
|
||||
'attribute-name' => [
|
||||
'rule-name' => 'custom-message',
|
||||
],
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Custom Validation Attributes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following language lines are used to swap attribute place-holders
|
||||
| with something more reader friendly such as E-Mail Address instead
|
||||
| of "email". This simply helps us make messages a little cleaner.
|
||||
|
|
||||
*/
|
||||
|
||||
'attributes' => [
|
||||
'password' => 'senha'
|
||||
],
|
||||
|
||||
];
|
10
resources/lang/pt-br/welcome.php
Normal file
10
resources/lang/pt-br/welcome.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
return [
|
||||
'Home' => 'Início',
|
||||
'Login' => 'Login',
|
||||
'Register' => 'Cadastrar',
|
||||
'Products' => 'Produtos',
|
||||
'Help' => 'Ajuda',
|
||||
'copyright' => '© 2018 Bruno Fontes Todos os direitos reservados',
|
||||
'byAuthor' => 'Por Bruno Fontes',
|
||||
];
|
@ -1,15 +1,18 @@
|
||||
@component('mail::message')
|
||||
Hi, {{$username}},
|
||||
<br>
|
||||
<br>
|
||||
#Good news: {{$item->name}} is available!
|
||||
<br>
|
||||
The item <em>{{$item->name}} ({{$item->product->name}})</em> is now available on **Share It**.
|
||||
<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 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
|
@ -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!
|
||||
|
@ -1,12 +1,17 @@
|
||||
@component('mail::message')
|
||||
# Welcome, {{$user->name}},
|
||||
# @lang('Welcome, :username,', ['username' => $user->name])
|
||||
|
||||
Thank's for registering at **Share 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
|
@ -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>
|
||||
|
@ -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">×</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>
|
||||
|
@ -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">×</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>
|
||||
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user