mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01:00
Working on multi-language support
This commit is contained in:
parent
6876edc510
commit
ee95cca182
@ -65,4 +65,5 @@ Configure config/database.php and then initialize the database
|
||||
* [mozilla/pdf.js](https://github.com/mozilla/pdf.js) - PDF Reader in JavaScript
|
||||
* [nnnick/Chart.js](https://github.com/nnnick/Chart.js) - Simple HTML5 Charts using the <canvas> tag
|
||||
* [josscrowcroft/accounting.js](https://github.com/josscrowcroft/accounting.js) - A lightweight JavaScript library for number, money and currency formatting
|
||||
* [jashkenas/underscore](https://github.com/jashkenas/underscore) - JavaScript's utility _ belt
|
||||
* [jashkenas/underscore](https://github.com/jashkenas/underscore) - JavaScript's utility _ belt
|
||||
* [caouecs/Laravel4-long](https://github.com/caouecs/Laravel4-lang) - List of languages for Laravel4
|
@ -48,7 +48,7 @@
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Where Former should look for translations
|
||||
'translate_from' => 'validation.attributes',
|
||||
'translate_from' => 'texts',
|
||||
|
||||
// An array of attributes to automatically translate
|
||||
'translatable' => array(
|
||||
|
@ -86,7 +86,8 @@ class AccountController extends \BaseController {
|
||||
'timezones' => Timezone::remember(DEFAULT_QUERY_CACHE)->orderBy('location')->get(),
|
||||
'dateFormats' => DateFormat::remember(DEFAULT_QUERY_CACHE)->get(),
|
||||
'datetimeFormats' => DatetimeFormat::remember(DEFAULT_QUERY_CACHE)->get(),
|
||||
'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(),
|
||||
'currencies' => Currency::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(),
|
||||
'languages' => Language::remember(DEFAULT_QUERY_CACHE)->orderBy('name')->get(),
|
||||
];
|
||||
|
||||
return View::make('accounts.details', $data);
|
||||
@ -514,7 +515,8 @@ class AccountController extends \BaseController {
|
||||
$account->timezone_id = Input::get('timezone_id') ? Input::get('timezone_id') : null;
|
||||
$account->date_format_id = Input::get('date_format_id') ? Input::get('date_format_id') : null;
|
||||
$account->datetime_format_id = Input::get('datetime_format_id') ? Input::get('datetime_format_id') : null;
|
||||
$account->currency_id = Input::get('currency_id') ? Input::get('currency_id') : 1;
|
||||
$account->currency_id = Input::get('currency_id') ? Input::get('currency_id') : 1; // US Dollar
|
||||
$account->language_id = Input::get('language_id') ? Input::get('language_id') : 1; // English
|
||||
$account->save();
|
||||
|
||||
$user = Auth::user();
|
||||
|
@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AddLanguageSupport extends Migration {
|
||||
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('languages', function($table)
|
||||
{
|
||||
$table->increments('id');
|
||||
$table->string('name');
|
||||
$table->string('locale');
|
||||
});
|
||||
|
||||
DB::table('languages')->insert(['name' => 'English', 'locale' => 'en']);
|
||||
DB::table('languages')->insert(['name' => 'Italian', 'locale' => 'it']);
|
||||
DB::table('languages')->insert(['name' => 'German', 'locale' => 'de']);
|
||||
DB::table('languages')->insert(['name' => 'French', 'locale' => 'fr']);
|
||||
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->unsignedInteger('language_id')->default(1);
|
||||
});
|
||||
|
||||
DB::table('accounts')->update(['language_id' => 1]);
|
||||
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->foreign('language_id')->references('id')->on('languages');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('accounts', function($table)
|
||||
{
|
||||
$table->dropForeign('accounts_language_id_foreign');
|
||||
$table->dropColumn('language_id');
|
||||
});
|
||||
|
||||
Schema::drop('languages');
|
||||
}
|
||||
|
||||
}
|
@ -20,6 +20,11 @@ App::before(function($request)
|
||||
return Redirect::secure(Request::getRequestUri());
|
||||
}
|
||||
}
|
||||
|
||||
if (Auth::check())
|
||||
{
|
||||
App::setLocale(Auth::user()->getLocale());
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
20
app/lang/de/pagination.php
Normal file
20
app/lang/de/pagination.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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' => '« zurück',
|
||||
|
||||
'next' => 'weiter »',
|
||||
|
||||
);
|
24
app/lang/de/reminders.php
Normal file
24
app/lang/de/reminders.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reminder 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" => "Passwörter müssen 6 Zeichen lang sein und korrekt bestätigt werden.",
|
||||
|
||||
"user" => "Wir konnten leider keinen Nutzer mit dieser E-Mail Adresse finden.",
|
||||
|
||||
"token" => "Der Passwort-Wiederherstellungs-Schlüssel ist ungültig.",
|
||||
|
||||
"sent" => "Passworterinnerung wurde gesendet!",
|
||||
|
||||
);
|
104
app/lang/de/validation.php
Normal file
104
app/lang/de/validation.php
Normal file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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
|
||||
| such as the size rules. Feel free to tweak each of these messages.
|
||||
|
|
||||
*/
|
||||
|
||||
"accepted" => ":attribute muss akzeptiert werden.",
|
||||
"active_url" => ":attribute ist keine gültige Internet-Adresse.",
|
||||
"after" => ":attribute muss ein Datum nach dem :date sein.",
|
||||
"alpha" => ":attribute darf nur aus Buchstaben bestehen.",
|
||||
"alpha_dash" => ":attribute darf nur aus Buchstaben, Zahlen, Binde- und Unterstrichen bestehen. Umlaute (ä, ö, ü) und Eszett (ß) sind nicht erlaubt.",
|
||||
"alpha_num" => ":attribute darf nur aus Buchstaben und Zahlen bestehen.",
|
||||
"array" => ":attribute muss ein Array sein.",
|
||||
"before" => ":attribute muss ein Datum vor dem :date sein.",
|
||||
"between" => array(
|
||||
"numeric" => ":attribute muss zwischen :min & :max liegen.",
|
||||
"file" => ":attribute muss zwischen :min & :max Kilobytes groß sein.",
|
||||
"string" => ":attribute muss zwischen :min & :max Zeichen lang sein.",
|
||||
"array" => ":attribute muss zwischen :min & :max Elemente haben."
|
||||
),
|
||||
"confirmed" => ":attribute stimmt nicht mit der Bestätigung überein.",
|
||||
"date" => ":attribute muss ein gültiges Datum sein.",
|
||||
"date_format" => ":attribute entspricht nicht dem gültigen Format für :format.",
|
||||
"different" => ":attribute und :other müssen sich unterscheiden.",
|
||||
"digits" => ":attribute muss :digits Stellen haben.",
|
||||
"digits_between" => ":attribute muss zwischen :min und :max Stellen haben.",
|
||||
"email" => ":attribute Format ist ungültig.",
|
||||
"exists" => "Der gewählte Wert für :attribute ist ungültig.",
|
||||
"image" => ":attribute muss ein Bild sein.",
|
||||
"in" => "Der gewählte Wert für :attribute ist ungültig.",
|
||||
"integer" => ":attribute muss eine ganze Zahl sein.",
|
||||
"ip" => ":attribute muss eine gültige IP-Adresse sein.",
|
||||
"max" => array(
|
||||
"numeric" => ":attribute darf maximal :max sein.",
|
||||
"file" => ":attribute darf maximal :max Kilobytes groß sein.",
|
||||
"string" => ":attribute darf maximal :max Zeichen haben.",
|
||||
"array" => ":attribute darf nicht mehr als :max Elemente haben."
|
||||
),
|
||||
"mimes" => ":attribute muss den Dateityp :values haben.",
|
||||
"min" => array(
|
||||
"numeric" => ":attribute muss mindestens :min sein.",
|
||||
"file" => ":attribute muss mindestens :min Kilobytes groß sein.",
|
||||
"string" => ":attribute muss mindestens :min Zeichen lang sein.",
|
||||
"array" => ":attribute muss mindestens :min Elemente haben."
|
||||
),
|
||||
"not_in" => "Der gewählte Wert für :attribute ist ungültig.",
|
||||
"numeric" => ":attribute muss eine Zahl sein.",
|
||||
"regex" => ":attribute Format ist ungültig.",
|
||||
"required" => ":attribute muss ausgefüllt sein.",
|
||||
"required_if" => ":attribute muss ausgefüllt sein wenn :other :value ist.",
|
||||
"required_with" => ":attribute muss angegeben werden wenn :values ausgefüllt wurde.",
|
||||
"required_with_all" => "The :attribute field is required when :values is present.",
|
||||
"required_without" => ":attribute muss angegeben werden wenn :values nicht ausgefüllt wurde.",
|
||||
"required_without_all" => ":attribute muss angegeben werden wenn keines der Felder :values ausgefüllt wurde.",
|
||||
"same" => ":attribute und :other müssen übereinstimmen.",
|
||||
"size" => array(
|
||||
"numeric" => ":attribute muss gleich :size sein.",
|
||||
"file" => ":attribute muss :size Kilobyte groß sein.",
|
||||
"string" => ":attribute muss :size Zeichen lang sein.",
|
||||
"array" => ":attribute muss genau :size Elemente haben."
|
||||
),
|
||||
"unique" => ":attribute ist schon vergeben.",
|
||||
"url" => "Das Format von :attribute ist ungültig.",
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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' => array(
|
||||
'attribute-name' => array(
|
||||
'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' => array(),
|
||||
|
||||
);
|
28
app/lang/en/texts.php
Normal file
28
app/lang/en/texts.php
Normal file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
'organization' => 'Organization',
|
||||
'name' => 'Name',
|
||||
'website' => 'Website',
|
||||
'work_phone' => 'Phone',
|
||||
'address' => 'Address',
|
||||
'address1' => 'Street',
|
||||
'address2' => 'Apt/Suite',
|
||||
'city' => 'City',
|
||||
'state' => 'State/Province',
|
||||
'postal_code' => 'Postal Code',
|
||||
'country_id' => 'Country',
|
||||
'contacts' => 'Contacts',
|
||||
'first_name' => 'First Name',
|
||||
'last_name' => 'Last Name',
|
||||
'phone' => 'Phone',
|
||||
'email' => 'Email',
|
||||
'additional_info' => 'Additional Info',
|
||||
'payment_terms' => 'Payment Terms',
|
||||
'currency_id' => 'Currency',
|
||||
'size_id' => 'Size',
|
||||
'industry_id' => 'Industry',
|
||||
'private_notes' => 'Private Notes',
|
||||
|
||||
);
|
20
app/lang/fr/pagination.php
Normal file
20
app/lang/fr/pagination.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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' => '« Précédent',
|
||||
|
||||
'next' => 'Suivant »',
|
||||
|
||||
);
|
24
app/lang/fr/reminders.php
Normal file
24
app/lang/fr/reminders.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reminder 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" => "Les mots de passe doivent avoir au moins six caractères et doivent être identiques.",
|
||||
|
||||
"user" => "Nous ne pouvons trouver cet utilisateur avec cette adresse e-mail.",
|
||||
|
||||
"token" => "Ce jeton de réinitialisation du mot de passe n'est pas valide.",
|
||||
|
||||
"sent" => "Rappel du mot de passe envoyé !",
|
||||
|
||||
);
|
134
app/lang/fr/validation.php
Normal file
134
app/lang/fr/validation.php
Normal file
@ -0,0 +1,134 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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
|
||||
| such as the size rules. Feel free to tweak each of these messages.
|
||||
|
|
||||
*/
|
||||
|
||||
"accepted" => "Le champ :attribute doit être accepté.",
|
||||
"active_url" => "Le champ :attribute n'est pas une URL valide.",
|
||||
"after" => "Le champ :attribute doit être une date postérieure au :date.",
|
||||
"alpha" => "Le champ :attribute doit seulement contenir des lettres.",
|
||||
"alpha_dash" => "Le champ :attribute doit seulement contenir des lettres, des chiffres et des tirets.",
|
||||
"alpha_num" => "Le champ :attribute doit seulement contenir des chiffres et des lettres.",
|
||||
"array" => "Le champ :attribute doit être un tableau.",
|
||||
"before" => "Le champ :attribute doit être une date antérieure au :date.",
|
||||
"between" => array(
|
||||
"numeric" => "La valeur de :attribute doit être comprise entre :min et :max.",
|
||||
"file" => "Le fichier :attribute doit avoir une taille entre :min et :max kilobytes.",
|
||||
"string" => "Le texte :attribute doit avoir entre :min et :max caractères.",
|
||||
"array" => "Le champ :attribute doit avoir entre :min et :max éléments."
|
||||
),
|
||||
"confirmed" => "Le champ de confirmation :attribute ne correspond pas.",
|
||||
"date" => "Le champ :attribute n'est pas une date valide.",
|
||||
"date_format" => "Le champ :attribute ne correspond pas au format :format.",
|
||||
"different" => "Les champs :attribute et :other doivent être différents.",
|
||||
"digits" => "Le champ :attribute doit avoir :digits chiffres.",
|
||||
"digits_between" => "Le champ :attribute doit avoir entre :min and :max chiffres.",
|
||||
"email" => "Le champ :attribute doit être une adresse email valide.",
|
||||
"exists" => "Le champ :attribute sélectionné est invalide.",
|
||||
"image" => "Le champ :attribute doit être une image.",
|
||||
"in" => "Le champ :attribute est invalide.",
|
||||
"integer" => "Le champ :attribute doit être un entier.",
|
||||
"ip" => "Le champ :attribute doit être une adresse IP valide.",
|
||||
"max" => array(
|
||||
"numeric" => "La valeur de :attribute ne peut être supérieure à :max.",
|
||||
"file" => "Le fichier :attribute ne peut être plus gros que :max kilobytes.",
|
||||
"string" => "Le texte de :attribute ne peut contenir plus de :max caractères.",
|
||||
"array" => "Le champ :attribute ne peut avoir plus de :max éléments.",
|
||||
),
|
||||
"mimes" => "Le champ :attribute doit être un fichier de type : :values.",
|
||||
"min" => array(
|
||||
"numeric" => "La valeur de :attribute doit être supérieure à :min.",
|
||||
"file" => "Le fichier :attribute doit être plus que gros que :min kilobytes.",
|
||||
"string" => "Le texte :attribute doit contenir au moins :min caractères.",
|
||||
"array" => "Le champ :attribute doit avoir au moins :min éléments."
|
||||
),
|
||||
"not_in" => "Le champ :attribute sélectionné n'est pas valide.",
|
||||
"numeric" => "Le champ :attribute doit contenir un nombre.",
|
||||
"regex" => "Le format du champ :attribute est invalide.",
|
||||
"required" => "Le champ :attribute est obligatoire.",
|
||||
"required_if" => "Le champ :attribute est obligatoire quand la valeur de :other est :value.",
|
||||
"required_with" => "Le champ :attribute est obligatoire quand :values est présent.",
|
||||
"required_with_all" => "Le champ :attribute est obligatoire quand :values est présent.",
|
||||
"required_without" => "Le champ :attribute est obligatoire quand :values n'est pas présent.",
|
||||
"required_without_all" => "Le champ :attribute est requis quand aucun de :values n'est présent.",
|
||||
"same" => "Les champs :attribute et :other doivent être identiques.",
|
||||
"size" => array(
|
||||
"numeric" => "La valeur de :attribute doit être :size.",
|
||||
"file" => "La taille du fichier de :attribute doit être de :size kilobytes.",
|
||||
"string" => "Le texte de :attribute doit contenir :size caractères.",
|
||||
"array" => "Le champ :attribute doit contenir :size éléments."
|
||||
),
|
||||
"unique" => "La valeur du champ :attribute est déjà utilisée.",
|
||||
"url" => "Le format de l'URL de :attribute n'est pas valide.",
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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' => array(
|
||||
'attribute-name' => array(
|
||||
'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' => array(
|
||||
"name" => "Nom",
|
||||
"username" => "Pseudo",
|
||||
"email" => "E-mail",
|
||||
"first_name" => "Prénom",
|
||||
"last_name" => "Nom",
|
||||
"password" => "Mot de passe",
|
||||
"password_confirmation" => "Confirmation du mot de passe",
|
||||
"city" => "Ville",
|
||||
"country" => "Pays",
|
||||
"address" => "Adresse",
|
||||
"phone" => "Téléphone",
|
||||
"mobile" => "Portable",
|
||||
"age" => "Age",
|
||||
"sex" => "Sexe",
|
||||
"gender" => "Genre",
|
||||
"day" => "Jour",
|
||||
"month" => "Mois",
|
||||
"year" => "Année",
|
||||
"hour" => "Heure",
|
||||
"minute" => "Minute",
|
||||
"second" => "Seconde",
|
||||
"title" => "Titre",
|
||||
"content" => "Contenu",
|
||||
"description" => "Description",
|
||||
"excerpt" => "Extrait",
|
||||
"date" => "Date",
|
||||
"time" => "Heure",
|
||||
"available" => "Disponible",
|
||||
"size" => "Taille"
|
||||
),
|
||||
|
||||
);
|
20
app/lang/it/pagination.php
Normal file
20
app/lang/it/pagination.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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' => '« Precedente',
|
||||
|
||||
'next' => 'Successivo »',
|
||||
|
||||
);
|
24
app/lang/it/reminders.php
Normal file
24
app/lang/it/reminders.php
Normal file
@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Password Reminder 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" => "Le password devono essere di almeno 6 caratteri e devono coincidere.",
|
||||
|
||||
"user" => "Non esiste un utente associato a questo indirizzo e-mail.",
|
||||
|
||||
"token" => "Questo token per la reimpostazione della password non è valido.",
|
||||
|
||||
"sent" => "Promemoria della password inviato!",
|
||||
|
||||
);
|
103
app/lang/it/validation.php
Normal file
103
app/lang/it/validation.php
Normal file
@ -0,0 +1,103 @@
|
||||
<?php
|
||||
|
||||
return array(
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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
|
||||
| such as the size rules. Feel free to tweak each of these messages.
|
||||
|
|
||||
*/
|
||||
"accepted" => ":attribute deve essere accettato.",
|
||||
"active_url" => ":attribute non è un URL valido.",
|
||||
"after" => ":attribute deve essere una data successiva al :date.",
|
||||
"alpha" => ":attribute può contenere solo lettere.",
|
||||
"alpha_dash" => ":attribute può contenere solo lettere, numeri e trattini.",
|
||||
"alpha_num" => ":attribute può contenere solo lettere e numeri.",
|
||||
"array" => ":attribute deve essere un array.",
|
||||
"before" => ":attribute deve essere una data precedente al :date.",
|
||||
"between" => array(
|
||||
"numeric" => ":attribute deve trovarsi tra :min - :max.",
|
||||
"file" => ":attribute deve trovarsi tra :min - :max kilobytes.",
|
||||
"string" => ":attribute deve trovarsi tra :min - :max caratteri.",
|
||||
"array" => ":attribute deve avere tra :min - :max elementi."
|
||||
),
|
||||
"confirmed" => "Il campo di conferma per :attribute non coincide.",
|
||||
"date" => ":attribute non è una data valida.",
|
||||
"date_format" => ":attribute non coincide con il formato :format.",
|
||||
"different" => ":attribute e :other devono essere differenti.",
|
||||
"digits" => ":attribute deve essere di :digits cifre.",
|
||||
"digits_between" => ":attribute deve essere tra :min e :max cifre.",
|
||||
"email" => ":attribute non è valido.",
|
||||
"exists" => ":attribute selezionato/a non è valido.",
|
||||
"image" => ":attribute deve essere un'immagine.",
|
||||
"in" => ":attribute selezionato non è valido.",
|
||||
"integer" => ":attribute deve essere intero.",
|
||||
"ip" => ":attribute deve essere un indirizzo IP valido.",
|
||||
"max" => array(
|
||||
"numeric" => ":attribute deve essere minore di :max.",
|
||||
"file" => ":attribute non deve essere più grande di :max kilobytes.",
|
||||
"string" => ":attribute non può contenere più di :max caratteri.",
|
||||
"array" => ":attribute non può avere più di :max elementi."
|
||||
),
|
||||
"mimes" => ":attribute deve essere del tipo: :values.",
|
||||
"min" => array(
|
||||
"numeric" => ":attribute deve valere almeno :min.",
|
||||
"file" => ":attribute deve essere più grande di :min kilobytes.",
|
||||
"string" => ":attribute deve contenere almeno :min caratteri.",
|
||||
"array" => ":attribute deve avere almeno :min elementi."
|
||||
),
|
||||
"not_in" => "Il valore selezionato per :attribute non è valido.",
|
||||
"numeric" => ":attribute deve essere un numero.",
|
||||
"regex" => "Il formato del campo :attribute non è valido.",
|
||||
"required" => ":attribute è richiesto.",
|
||||
"required_if" => "Il campo :attribute è richiesto quando :other è :value.",
|
||||
"required_with" => "Il campo :attribute è richiesto quando :values è presente.",
|
||||
"required_with_all" => "The :attribute field is required when :values is present.",
|
||||
"required_without" => "Il campo :attribute è richiesto quando :values non è presente.",
|
||||
"required_without_all" => "The :attribute field is required when none of :values are present.",
|
||||
"same" => ":attribute e :other devono coincidere.",
|
||||
"size" => array(
|
||||
"numeric" => ":attribute deve valere :size.",
|
||||
"file" => ":attribute deve essere grande :size kilobytes.",
|
||||
"string" => ":attribute deve contenere :size caratteri.",
|
||||
"array" => ":attribute deve contenere :size elementi."
|
||||
),
|
||||
"unique" => ":attribute è stato già utilizzato.",
|
||||
"url" => ":attribute deve essere un URL.",
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| 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' => array(
|
||||
'attribute-name' => array(
|
||||
'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' => array(),
|
||||
|
||||
);
|
7
app/models/Language.php
Executable file
7
app/models/Language.php
Executable file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
|
||||
class Language extends Eloquent
|
||||
{
|
||||
public $timestamps = false;
|
||||
protected $softDelete = false;
|
||||
}
|
@ -104,6 +104,12 @@ class User extends ConfideUser implements UserInterface, RemindableInterface
|
||||
}
|
||||
}
|
||||
|
||||
public function getLocale()
|
||||
{
|
||||
$language = Language::remember(DEFAULT_QUERY_CACHE)->where('id', '=', $this->account->language_id)->first();
|
||||
return $language->locale;
|
||||
}
|
||||
|
||||
public function showGreyBackground()
|
||||
{
|
||||
return !$this->theme_id || in_array($this->theme_id, [2, 3, 5, 6, 7, 8, 10, 11, 12]);
|
||||
|
@ -169,7 +169,9 @@ HTML::macro('breadcrumbs', function() {
|
||||
return $str . '</ol>';
|
||||
});
|
||||
|
||||
|
||||
define('CONTACT_EMAIL', 'contact@invoiceninja.com');
|
||||
define('ANALYTICS_KEY', 'UA-46031341-1');
|
||||
|
||||
define('ENV_DEVELOPMENT', 'local');
|
||||
define('ENV_STAGING', 'staging');
|
||||
|
@ -62,8 +62,9 @@
|
||||
{{ Former::text('email') }}
|
||||
{{ Former::text('phone') }}
|
||||
|
||||
|
||||
{{ Former::legend('Localization') }}
|
||||
{{ Former::select('language_id')->addOption('','')->label('Language')
|
||||
->fromQuery($languages, 'name', 'id') }}
|
||||
{{ Former::select('currency_id')->addOption('','')->label('Currency')
|
||||
->fromQuery($currencies, 'name', 'id') }}
|
||||
{{ Former::select('timezone_id')->addOption('','')->label('Timezone')
|
||||
|
@ -21,26 +21,26 @@
|
||||
<div class="col-md-6">
|
||||
|
||||
|
||||
{{ Former::legend('Organization') }}
|
||||
{{ Former::legend('organization') }}
|
||||
{{ Former::text('name')->data_bind("attr { placeholder: placeholderName }") }}
|
||||
{{ Former::text('website') }}
|
||||
{{ Former::text('work_phone')->label('Phone') }}
|
||||
{{ Former::text('work_phone') }}
|
||||
|
||||
|
||||
{{ Former::legend('Address') }}
|
||||
{{ Former::text('address1')->label('Street') }}
|
||||
{{ Former::text('address2')->label('Apt/Suite') }}
|
||||
{{ Former::legend('address') }}
|
||||
{{ Former::text('address1') }}
|
||||
{{ Former::text('address2') }}
|
||||
{{ Former::text('city') }}
|
||||
{{ Former::text('state')->label('State/Province') }}
|
||||
{{ Former::text('state') }}
|
||||
{{ Former::text('postal_code') }}
|
||||
{{ Former::select('country_id')->addOption('','')->label('Country')
|
||||
{{ Former::select('country_id')->addOption('','')
|
||||
->fromQuery($countries, 'name', 'id') }}
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
{{ Former::legend('Contacts') }}
|
||||
{{ Former::legend('contacts') }}
|
||||
<div data-bind='template: { foreach: contacts,
|
||||
beforeRemove: hideContact,
|
||||
afterAdd: showContact }'>
|
||||
@ -62,14 +62,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ Former::legend('Additional Info') }}
|
||||
{{ Former::legend('additional_info') }}
|
||||
{{ Former::select('payment_terms')->addOption('','')
|
||||
->fromQuery($paymentTerms, 'name', 'num_days') }}
|
||||
{{ Former::select('currency_id')->addOption('','')->label('Currency')
|
||||
{{ Former::select('currency_id')->addOption('','')
|
||||
->fromQuery($currencies, 'name', 'id') }}
|
||||
{{ Former::select('size_id')->addOption('','')->label('Size')
|
||||
{{ Former::select('size_id')->addOption('','')
|
||||
->fromQuery($sizes, 'name', 'id') }}
|
||||
{{ Former::select('industry_id')->addOption('','')->label('Industry')
|
||||
{{ Former::select('industry_id')->addOption('','')
|
||||
->fromQuery($industries, 'name', 'id') }}
|
||||
{{ Former::textarea('private_notes') }}
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
'client' => 'required',
|
||||
'email' => 'required',
|
||||
'product_key' => 'max:20',
|
||||
)); }}
|
||||
)) }}
|
||||
|
||||
<input type="submit" style="display:none" name="submitButton" id="submitButton">
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
ga('create', 'UA-46031341-1');
|
||||
ga('create', ANALYTICS_KEY);
|
||||
ga('send', 'pageview');
|
||||
</script>
|
||||
@endif
|
||||
|
Loading…
Reference in New Issue
Block a user