diff --git a/app/config/packages/anahkiasen/former/config.php b/app/config/packages/anahkiasen/former/config.php index fe5eff734968..327019638f9d 100755 --- a/app/config/packages/anahkiasen/former/config.php +++ b/app/config/packages/anahkiasen/former/config.php @@ -48,7 +48,7 @@ //////////////////////////////////////////////////////////////////// // Where Former should look for translations - 'translate_from' => 'fields', + 'translate_from' => 'texts', // An array of attributes to automatically translate 'translatable' => array( diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index 68ef3b41ebad..d9a0fb28299c 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -516,7 +516,7 @@ class AccountController extends \BaseController { $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; // US Dollar - //$account->language_id = Input::get('language_id') ? Input::get('language_id') : 1; // English + $account->language_id = Input::get('language_id') ? Input::get('language_id') : 1; // English $account->save(); $user = Auth::user(); diff --git a/app/controllers/ClientController.php b/app/controllers/ClientController.php index 339a98e3e66c..0cfa7f649cc0 100755 --- a/app/controllers/ClientController.php +++ b/app/controllers/ClientController.php @@ -23,7 +23,7 @@ class ClientController extends \BaseController { return View::make('list', array( 'entityType'=>ENTITY_CLIENT, 'title' => '- Clients', - 'columns'=>['checkbox', 'Client', 'Contact', 'Email', 'Date Created', 'Last Login', 'Balance', 'Action'] + 'columns'=>Utils::trans(['checkbox', 'client', 'contact', 'email', 'date_created', 'last_login', 'balance', 'action']) )); } @@ -43,17 +43,17 @@ class ClientController extends \BaseController { { return ''; }) diff --git a/app/controllers/CreditController.php b/app/controllers/CreditController.php index e33d613b1cac..1b9ca45c1fa5 100755 --- a/app/controllers/CreditController.php +++ b/app/controllers/CreditController.php @@ -23,7 +23,7 @@ class CreditController extends \BaseController { return View::make('list', array( 'entityType'=>ENTITY_CREDIT, 'title' => '- Credits', - 'columns'=>['checkbox', 'Client', 'Credit Amount', 'Credit Balance', 'Credit Date', 'Private Notes', 'Action'] + 'columns'=>Utils::trans(['checkbox', 'client', 'credit_amount', 'credit_balance', 'credit_date', 'private_notes', 'action']) )); } @@ -47,11 +47,11 @@ class CreditController extends \BaseController { { return ''; }) diff --git a/app/controllers/HomeController.php b/app/controllers/HomeController.php index 174ae6721048..1a344c9245a2 100755 --- a/app/controllers/HomeController.php +++ b/app/controllers/HomeController.php @@ -46,7 +46,7 @@ class HomeController extends BaseController { 'text' => $message ]; - $this->mailer->sendTo(CONTACT_EMAIL, CONTACT_EMAIL, 'Invoice Ninja Feedback', 'contact', $data); + $this->mailer->sendTo(CONTACT_EMAIL, CONTACT_EMAIL, CONTACT_NAME, 'Invoice Ninja Feedback', 'contact', $data); Session::flash('message', 'Successfully sent message'); return Redirect::to('/contact'); diff --git a/app/controllers/InvoiceController.php b/app/controllers/InvoiceController.php index f805745c152c..37beae47b3b0 100755 --- a/app/controllers/InvoiceController.php +++ b/app/controllers/InvoiceController.php @@ -27,13 +27,13 @@ class InvoiceController extends \BaseController { $data = [ 'title' => '- Invoices', 'entityType'=>ENTITY_INVOICE, - 'columns'=>['checkbox', 'Invoice Number', 'Client', 'Invoice Date', 'Invoice Total', 'Balance Due', 'Due Date', 'Status', 'Action'] + 'columns'=>Utils::trans(['checkbox', 'invoice_number', 'client', 'invoice_date', 'invoice_total', 'balance_due', 'due_date', 'status', 'action']) ]; if (Invoice::scope()->where('is_recurring', '=', true)->count() > 0) { $data['secEntityType'] = ENTITY_RECURRING_INVOICE; - $data['secColumns'] = ['checkbox', 'Frequency', 'Client', 'Start Date', 'End Date', 'Invoice Total', 'Action']; + $data['secColumns'] = Utils::trans(['checkbox', 'frequency', 'client', 'start_date', 'end_date', 'invoice_total', 'action']); } return View::make('list', $data); @@ -63,14 +63,14 @@ class InvoiceController extends \BaseController { { return ''; }) @@ -99,13 +99,13 @@ class InvoiceController extends \BaseController { { return ''; }) diff --git a/app/controllers/PaymentController.php b/app/controllers/PaymentController.php index af2834da19bc..bdf6f4bfd332 100755 --- a/app/controllers/PaymentController.php +++ b/app/controllers/PaymentController.php @@ -18,7 +18,7 @@ class PaymentController extends \BaseController return View::make('list', array( 'entityType'=>ENTITY_PAYMENT, 'title' => '- Payments', - 'columns'=>['checkbox', 'Invoice', 'Client', 'Transaction Reference', 'Method', 'Payment Amount', 'Payment Date', 'Action'] + 'columns'=>Utils::trans(['checkbox', 'invoice', 'client', 'transaction_reference', 'method', 'payment_amount', 'payment_date', 'action']) )); } @@ -46,11 +46,11 @@ class PaymentController extends \BaseController { return ''; }) diff --git a/app/lang/de/texts.php b/app/lang/de/texts.php new file mode 100644 index 000000000000..b2b291ddaa6a --- /dev/null +++ b/app/lang/de/texts.php @@ -0,0 +1,54 @@ + 'Organisation', + 'name' => 'Name', + 'website' => 'Webseite', + 'work_phone' => 'Telefon', + 'address' => 'Adresse', + 'address1' => 'Straße', + 'address2' => 'Adresszusatz', + 'city' => 'Stadt', + 'state' => 'Bundesland', + 'postal_code' => 'Postleitzahl', + 'country_id' => 'Land', + 'contacts' => 'Kontakte', + 'first_name' => 'Vorname', + 'last_name' => 'Nachname', + 'phone' => 'Telefon', + 'email' => 'Email', + 'additional_info' => 'Zusätzliche Info', + 'payment_terms' => 'Payment Terms', + 'currency_id' => 'Währung', + 'size_id' => 'Größe', + 'industry_id' => 'Kategorie', + 'private_notes' => 'Notizen', + + // invoice + 'invoice' => 'Rechnung', + 'client' => 'Kunde', + 'invoice_date' => 'Rechnungsdatum', + 'due_date' => 'Fällig am', + 'invoice_number' => 'Rechungsnummer', + 'invoice_number_short' => 'Rechnung #', + 'po_number' => 'Bestell Nummer', + 'po_number_short' => 'BN #', + 'frequency_id' => 'Wie oft', + 'dicount' => 'Rabatt', + 'taxes' => 'Steuern', + 'tax' => 'Steuer', + 'item' => 'Artikel', + 'description' => 'Beschreibung', + 'unit_cost' => 'Kosten pro Einheit', + 'quantity' => 'Menge', + 'line_total' => 'Summe', + 'subtotal' => 'Zwischensumme', + 'paid_to_date' => 'Zahlungsdatum', + 'balance_due' => 'Rechnungsbetrag', + 'invoice_design_id' => 'Design', + 'terms' => 'Bedingungen', + 'your_invoice' => 'Ihre Rechnung', + +); diff --git a/app/lang/en/fields.php b/app/lang/en/fields.php deleted file mode 100644 index 6a0bcaa7b21b..000000000000 --- a/app/lang/en/fields.php +++ /dev/null @@ -1,54 +0,0 @@ - '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', - - // invoice - 'invoice' => 'Invoice', - 'client' => 'Client', - 'invoice_date' => 'Invoice Date', - 'due_date' => 'Due Date', - 'invoice_number' => 'Invoice Number', - 'invoice_number_short' => 'Invoice #', - 'po_number' => 'PO Number', - 'po_number_short' => 'PO #', - 'frequency_id' => 'How often', - 'discount' => 'Discount', - 'taxes' => 'Taxes', - 'tax' => 'Tax', - 'item' => 'Item', - 'description' => 'Description', - 'unit_cost' => 'Unit Cost', - 'quantity' => 'Quantity', - 'line_total' => 'Line Total', - 'subtotal' => 'Subtotal', - 'paid_to_date' => 'Paid to Date', - 'balance_due' => 'Balance Due', - 'invoice_design_id' => 'Design', - 'terms' => 'Terms', - 'your_invoice' => 'Your Invoice', - -); \ No newline at end of file diff --git a/app/lang/en/messages.php b/app/lang/en/messages.php deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/app/lang/en/texts.php b/app/lang/en/texts.php new file mode 100644 index 000000000000..a4551f1b1dcf --- /dev/null +++ b/app/lang/en/texts.php @@ -0,0 +1,154 @@ + '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', + + // invoice + 'invoice' => 'Invoice', + 'client' => 'Client', + 'invoice_date' => 'Invoice Date', + 'due_date' => 'Due Date', + 'invoice_number' => 'Invoice Number', + 'invoice_number_short' => 'Invoice #', + 'po_number' => 'PO Number', + 'po_number_short' => 'PO #', + 'frequency_id' => 'How often', + 'discount' => 'Discount', + 'taxes' => 'Taxes', + 'tax' => 'Tax', + 'item' => 'Item', + 'description' => 'Description', + 'unit_cost' => 'Unit Cost', + 'quantity' => 'Quantity', + 'line_total' => 'Line Total', + 'subtotal' => 'Subtotal', + 'paid_to_date' => 'Paid to Date', + 'balance_due' => 'Balance Due', + 'invoice_design_id' => 'Design', + 'terms' => 'Terms', + 'your_invoice' => 'Your Invoice', + + 'remove_contact' => 'Remove contact', + 'add_contact' => 'Add contact', + 'create_new_client' => 'Create new client', + 'edit_client_details' => 'Edit client details', + 'enable' => 'Enable', + 'learn_more' => 'Learn more', + 'manage_rates' => 'Manage rates', + 'note_to_client' => 'Note to client', + 'invoice_terms' => 'Invoice terms', + 'save_as_default_terms' => 'Save as default terms', + 'download_pdf' => 'Download PDF', + 'save_invoice' => 'Save Invoice', + 'clone_invoice' => 'Clone Invoice', + 'archive_invoice' => 'Archive Invoice', + 'delete_invoice' => 'Delete Invoice', + 'email_invoice' => 'Email Invoice', + 'enter_payment' => 'Enter Payment', + 'tax_rates' => 'Tax Rates', + 'rate' => 'Rate', + 'settings' => 'Settings', + 'enable_invoice_tax' => 'Enable specifying an invoice tax', + 'enable_line_item_tax' => 'Enable specifying line item taxes', + + // navigation + 'dashboard' => 'Dashboard', + 'clients' => 'Clients', + 'invoices' => 'Invoices', + 'payments' => 'Payments', + 'credits' => 'Credits', + 'history' => 'History', + 'search' => 'Search', + 'sign_up' => 'Sign Up', + 'guest' => 'Guest', + 'company_details' => 'Company Details', + 'online_payments' => 'Online Payments', + 'notifications' => 'Notifications', + 'import_export' => 'Import/Export', + 'done' => 'Done', + 'cancel' => 'Cancel', + 'provide_email' => 'Please provide a valid email address', + 'powered_by' => 'Powered by', + 'no_items' => 'No items', + + // recurring invoices + 'recurring_invoices' => 'Recurring Invoices', + 'recurring_help' => '

Automatically send clients the same invoices weekly, bi-monthly, monthly, quarterly or annually.

+

Use :MONTH, :QUARTER or :YEAR for dynamic dates. Basic math works as well, for example :MONTH-1.

+

Examples of dynamic invoice variables:

+ ', + + // dashboard + 'in_total_revenue' => 'in total revenue', + 'billed_client' => 'billed client', + 'billed_clients' => 'billed clients', + 'active_client' => 'active client', + 'active_clients' => 'active clients', + 'invoices_past_due' => 'Invoices Past Due', + 'upcoming_invoices' => 'Upcoming invoices', + 'average_invoice' => 'Average invoice', + + // list pages + 'archive' => 'Archive', + 'delete' => 'Delete', + 'archive_client' => 'Archive client', + 'delete_client' => 'Delete client', + 'archive_payment' => 'Archive payment', + 'delete_payment' => 'Delete payment', + 'archive_credit' => 'Archive credit', + 'delete_credit' => 'Delete credit', + 'show_archived_deleted' => 'Show archived/deleted', + 'filter' => 'Filter', + 'new_client' => 'New Client', + 'new_invoice' => 'New Invoice', + 'new_payment' => 'New Payment', + 'new_credit' => 'New Credit', + 'contact' => 'Contact', + 'date_created' => 'Date Created', + 'last_login' => 'Last Login', + 'balance' => 'Balance', + 'action' => 'Action', + 'status' => 'Status', + 'invoice_total' => 'Invoice Total', + 'frequency' => 'Frequency', + 'start_date' => 'Start Date', + 'end_date' => 'End Date', + 'transaction_reference' => 'Transaction Reference', + 'method' => 'Method', + 'payment_amount' => 'Payment Amount', + 'payment_date' => 'Payment Date', + 'credit_amount' => 'Credit Amount', + 'credit_balance' => 'Credit Balance', + 'credit_date' => 'Credit Date', + 'empty_table' => 'No data available in table', + 'select' => 'Select', + 'edit_client' => 'Edit Client', + 'edit_invoice' => 'Edit Invoice', +); \ No newline at end of file diff --git a/app/lang/fr/fields.php b/app/lang/fr/texts.php similarity index 100% rename from app/lang/fr/fields.php rename to app/lang/fr/texts.php diff --git a/app/lang/it/fields.php b/app/lang/it/texts.php similarity index 100% rename from app/lang/it/fields.php rename to app/lang/it/texts.php diff --git a/app/lang/pt_BR/fields.php b/app/lang/pt_BR/texts.php similarity index 100% rename from app/lang/pt_BR/fields.php rename to app/lang/pt_BR/texts.php diff --git a/app/libraries/utils.php b/app/libraries/utils.php index 086762c31a95..fa4cf0319c19 100755 --- a/app/libraries/utils.php +++ b/app/libraries/utils.php @@ -11,6 +11,25 @@ class Utils { return substr($_SERVER['SCRIPT_NAME'], 0, strrpos($_SERVER['SCRIPT_NAME'], '/') + 1); } + + public static function trans($input) + { + $data = []; + + foreach ($input as $field) + { + if ($field == "checkbox") + { + $data[] = $field; + } + else + { + $data[] = trans("texts.$field"); + } + } + + return $data; + } public static function fatalError($message = false, $exception = false) { @@ -104,7 +123,8 @@ class Utils public static function pluralize($string, $count) { $string = str_replace('?', $count, $string); - return $count == 1 ? $string : $string . 's'; + $field = $count == 1 ? $string : $string . 's'; + return trans("texts.$field"); } public static function toArray($data) diff --git a/app/models/Account.php b/app/models/Account.php index f821fb009e86..c69e78137659 100755 --- a/app/models/Account.php +++ b/app/models/Account.php @@ -195,7 +195,7 @@ class Account extends Eloquent foreach ($fields as $field) { - $data[$field] = trans("fields.$field"); + $data[$field] = trans("texts.$field"); } return $data; diff --git a/app/ninja/mailers/ContactMailer.php b/app/ninja/mailers/ContactMailer.php index d1c1fed440fb..d25dc657a46b 100755 --- a/app/ninja/mailers/ContactMailer.php +++ b/app/ninja/mailers/ContactMailer.php @@ -37,7 +37,10 @@ class ContactMailer extends Mailer { 'emailFooter' => $invoice->account->email_footer ]; - $this->sendTo($invitation->contact->email, $invitation->user->email, $subject, $view, $data); + $fromEmail = $invitation->user->email; + $fromName = $invitation->user->getDisplayName(); + + $this->sendTo($invitation->contact->email, $fromEmail, $fromName, $subject, $view, $data); Activity::emailInvoice($invitation); } @@ -63,6 +66,7 @@ class ContactMailer extends Mailer { 'paymentAmount' => Utils::formatMoney($payment->amount, $payment->client->currency_id) ]; - $this->sendTo($payment->contact->email, $payment->invitation->user->email, $subject, $view, $data); + $user = $payment->invitation->user; + $this->sendTo($payment->contact->email, $user->email, $user->getDisplayName(), $subject, $view, $data); } } \ No newline at end of file diff --git a/app/ninja/mailers/Mailer.php b/app/ninja/mailers/Mailer.php index f54e450b3e5f..cbc2e7e43998 100755 --- a/app/ninja/mailers/Mailer.php +++ b/app/ninja/mailers/Mailer.php @@ -4,7 +4,7 @@ use Mail; class Mailer { - public function sendTo($toEmail, $fromEmail, $subject, $view, $data = []) + public function sendTo($toEmail, $fromEmail, $fromName, $subject, $view, $data = []) { $views = [ 'emails.'.$view.'_html', @@ -13,9 +13,10 @@ class Mailer { //$view = 'emails.' . $view; - Mail::queue($views, $data, function($message) use ($toEmail, $fromEmail, $subject) + Mail::queue($views, $data, function($message) use ($toEmail, $fromEmail, $fromName, $subject) { - $message->to($toEmail)->replyTo($fromEmail)->subject($subject); + $message->to($toEmail)->from($fromEmail, $fromName)->sender($fromEmail, $fromName) + ->replyTo($fromEmail, $fromName)->returnPath($fromEmail)->subject($subject); }); } } \ No newline at end of file diff --git a/app/ninja/mailers/UserMailer.php b/app/ninja/mailers/UserMailer.php index 2ed34b9bb6d1..4cc7ac65f4bf 100755 --- a/app/ninja/mailers/UserMailer.php +++ b/app/ninja/mailers/UserMailer.php @@ -22,7 +22,7 @@ class UserMailer extends Mailer { 'user' => $user ]; - $this->sendTo($user->email, CONTACT_EMAIL, $subject, $view, $data); + $this->sendTo($user->email, CONTACT_EMAIL, CONTACT_NAME, $subject, $view, $data); } public function sendNotification(User $user, Invoice $invoice, $type, Payment $payment = null) @@ -63,6 +63,6 @@ class UserMailer extends Mailer { $subject = "Invoice {$invoice->invoice_number} was $action {$invoice->client->getDisplayName()}"; - $this->sendTo($user->email, CONTACT_EMAIL, $subject, $view, $data); + $this->sendTo($user->email, CONTACT_EMAIL, CONTACT_NAME, $subject, $view, $data); } } \ No newline at end of file diff --git a/app/routes.php b/app/routes.php index 4db3a8cfc8f4..0109ed9bf9fb 100755 --- a/app/routes.php +++ b/app/routes.php @@ -98,7 +98,7 @@ Route::group(array('before' => 'auth'), function() HTML::macro('nav_link', function($url, $text, $url2 = '', $extra = '') { $class = ( Request::is($url) || Request::is($url.'/*') || Request::is($url2) ) ? ' class="active"' : ''; - return ''.$text.''; + return ''.trans("texts.$text").''; }); HTML::macro('tab_link', function($url, $text, $active = false) { @@ -174,7 +174,8 @@ HTML::macro('breadcrumbs', function() { define('CONTACT_EMAIL', 'contact@invoiceninja.com'); -//define('ANALYTICS_KEY', 'UA-46031341-1'); +define('CONTACT_NAME', 'Invoice Ninja'); + define('ENV_DEVELOPMENT', 'local'); define('ENV_STAGING', 'staging'); diff --git a/app/views/accounts/details.blade.php b/app/views/accounts/details.blade.php index 692d0b33e769..bf8df2a95763 100755 --- a/app/views/accounts/details.blade.php +++ b/app/views/accounts/details.blade.php @@ -63,8 +63,8 @@ {{ Former::text('phone') }} {{ Former::legend('Localization') }} - {{-- Former::select('language_id')->addOption('','')->label('Language') - ->fromQuery($languages, 'name', 'id') --}} + {{ 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') diff --git a/app/views/accounts/nav.blade.php b/app/views/accounts/nav.blade.php index d12f614d0fee..25acc844ad29 100755 --- a/app/views/accounts/nav.blade.php +++ b/app/views/accounts/nav.blade.php @@ -3,10 +3,10 @@ @section('content')

 

diff --git a/app/views/dashboard.blade.php b/app/views/dashboard.blade.php index eaa27672e9a1..817732c138f2 100644 --- a/app/views/dashboard.blade.php +++ b/app/views/dashboard.blade.php @@ -11,7 +11,7 @@ {{ $totalIncome }}
- in total revenue + {{ trans('texts.in_total_revenue') }}
@@ -24,7 +24,7 @@ {{ $billedClients }}
- {{ Utils::pluralize('billed client', $billedClients) }} + {{ Utils::pluralize('billed_client', $billedClients) }}
@@ -52,7 +52,7 @@

- Notifications + {{ trans('texts.notifications') }}

    @@ -69,16 +69,16 @@

    - Invoices Past Due + {{ trans('texts.invoices_past_due') }}

    - - - - + + + + @foreach ($pastDue as $invoice) @@ -101,16 +101,16 @@

    - Upcoming invoices + {{ trans('texts.upcoming_invoices') }}

    Invoice #ClientDue dateBalance due{{ trans('texts.invoice_number_short') }}{{ trans('texts.client') }}{{ trans('texts.due_date') }}{{ trans('texts.balance_due') }}
    - - - - + + + + @foreach ($upcoming as $invoice) @@ -129,12 +129,12 @@
    {{ $activeClients }}
    -
    {{ Utils::pluralize('active client', $activeClients) }}
    +
    {{ Utils::pluralize('active_client', $activeClients) }}
    -
    Average invoice
    +
    {{ trans('texts.average_invoice') }}
    {{ $invoiceAvg }}
    diff --git a/app/views/header.blade.php b/app/views/header.blade.php index 4813ee4d6538..4772d57de54f 100755 --- a/app/views/header.blade.php +++ b/app/views/header.blade.php @@ -60,6 +60,19 @@ var currency = currencyMap[currency_id]; return accounting.formatMoney(value, hide_symbol ? '' : currency.symbol, currency.precision, currency.thousand_separator, currency.decimal_separator); } + + /* Set the defaults for DataTables initialisation */ + $.extend( true, $.fn.dataTable.defaults, { + "sDom": "t<'row-fluid'<'span6'i><'span6'p>>", + "sPaginationType": "bootstrap", + "bInfo": true, + "oLanguage": { + 'sEmptyTable': "{{ trans('texts.empty_table') }}", + 'sLengthMenu': '_MENU_', + 'sSearch': '' + } + } ); + @stop @@ -84,7 +97,7 @@ @else
    - {{ Former::checkbox('recurring')->text('Enable    Learn more')->data_bind("checked: is_recurring") + {{ Former::checkbox('recurring')->text(trans('texts.enable').'    '.trans('texts.learn_more').'')->data_bind("checked: is_recurring") ->inlineHelp($invoice && $invoice->last_sent_date ? 'Last invoice sent ' . Utils::dateToString($invoice->last_sent_date) : '') }}
    @endif @@ -90,15 +90,15 @@
    - {{ Former::text('invoice_number')->label(trans('fields.invoice_number_short'))->data_bind("value: invoice_number, valueUpdate: 'afterkeydown'") }} - {{ Former::text('po_number')->label(trans('fields.po_number_short'))->data_bind("value: po_number, valueUpdate: 'afterkeydown'") }} + {{ Former::text('invoice_number')->label(trans('texts.invoice_number_short'))->data_bind("value: invoice_number, valueUpdate: 'afterkeydown'") }} + {{ Former::text('po_number')->label(trans('texts.po_number_short'))->data_bind("value: po_number, valueUpdate: 'afterkeydown'") }} {{ Former::text('discount')->data_bind("value: discount, valueUpdate: 'afterkeydown'")->append('%') }} {{-- Former::select('currency_id')->addOption('', '')->fromQuery($currencies, 'name', 'id')->data_bind("value: currency_id") --}}
    - +
    @@ -113,12 +113,12 @@
    - - - - - - + + + + + + @@ -157,41 +157,41 @@ + + + + + @@ -214,26 +214,25 @@ ->fromQuery($invoiceDesigns, 'name', 'id')->data_bind("value: invoice_design_id") }} - {{ Button::primary('Download PDF', array('onclick' => 'onDownloadClick()'))->append_with_icon('download-alt'); }} + {{ Button::primary(trans('texts.download_pdf'), array('onclick' => 'onDownloadClick()'))->append_with_icon('download-alt'); }} @if (!$invoice || (!$invoice->trashed() && !$invoice->client->trashed())) @if ($invoice) - {{-- DropdownButton::normal('Download PDF', Navigation::links( array( @@ -257,13 +256,13 @@ ) , array('id'=>'primaryActions', 'style'=>'text-align:left', 'data-bind'=>'css: $root.enable.save'))->split(); --}} @else - {{ Button::success('Save Invoice', array('id' => 'saveButton', 'onclick' => 'onSaveClick()')) }} + {{ Button::success(trans('texts.save_invoice'), array('id' => 'saveButton', 'onclick' => 'onSaveClick()')) }} @endif - {{ Button::normal('Email Invoice', array('id' => 'email_button', 'onclick' => 'onEmailClick()'))->append_with_icon('send'); }} + {{ Button::normal(trans('texts.email_invoice'), array('id' => 'email_button', 'onclick' => 'onEmailClick()'))->append_with_icon('send'); }} @if ($invoice) - {{ Button::primary('Enter Payment', array('onclick' => 'onPaymentClick()'))->append_with_icon('usd'); }} + {{ Button::primary(trans('texts.enter_payment'), array('onclick' => 'onPaymentClick()'))->append_with_icon('usd'); }} @endif @endif @@ -281,20 +280,20 @@ - - + + @@ -390,9 +389,9 @@
    Invoice #ClientDue dateBalance due{{ trans('texts.invoice_number_short') }}{{ trans('texts.client') }}{{ trans('texts.due_date') }}{{ trans('texts.balance_due') }}
    ItemDescriptionUnit CostQuantityTaxLine Total{{ trans('texts.item') }}{{ trans('texts.description') }}{{ trans('texts.unit_cost') }}{{ trans('texts.quantity') }}{{ trans('texts.tax') }}{{ trans('texts.line_total') }}

    {{ Former::textarea('public_notes')->data_bind("value: wrapped_notes, valueUpdate: 'afterkeydown'") - ->label(false)->placeholder('Note to client')->style('width: 520px; resize: none') }} + ->label(false)->placeholder(trans('texts.note_to_client'))->style('width: 520px; resize: none') }} {{ Former::textarea('terms')->data_bind("value: wrapped_terms, valueUpdate: 'afterkeydown'") - ->label(false)->placeholder('Invoice terms')->style('width: 520px; resize: none') + ->label(false)->placeholder(trans('texts.invoice_terms'))->style('width: 520px; resize: none') ->addGroupClass('less-space-bottom') }}
    - Subtotal{{ trans('texts.subtotal') }}
    Discount{{ trans('texts.discount') }}
    Tax{{ trans('texts.tax') }}
    Paid to Date{{ trans('texts.paid_to_date') }}
    Balance Due{{ trans('texts.balance_due') }}
    NameRate{{ trans('texts.name') }}{{ trans('texts.rate') }}
      - {{ Former::checkbox('invoice_taxes')->text('Enable specifying an invoice tax') - ->label('Settings')->data_bind('checked: $root.invoice_taxes, enable: $root.tax_rates().length > 1') }} - {{ Former::checkbox('invoice_item_taxes')->text('Enable specifying line item taxes') + {{ Former::checkbox('invoice_taxes')->text(trans('texts.enable_invoice_tax')) + ->label(trans('texts.settings'))->data_bind('checked: $root.invoice_taxes, enable: $root.tax_rates().length > 1') }} + {{ Former::checkbox('invoice_item_taxes')->text(trans('texts.enable_line_item_tax')) ->label(' ')->data_bind('checked: $root.invoice_item_taxes, enable: $root.tax_rates().length > 1') }}
    @@ -401,7 +400,7 @@
    @@ -413,22 +412,11 @@