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:
+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 }}
Invoice # | -Client | -Due date | -Balance due | +{{ trans('texts.invoice_number_short') }} | +{{ trans('texts.client') }} | +{{ trans('texts.due_date') }} | +{{ trans('texts.balance_due') }} | @foreach ($pastDue as $invoice) @@ -101,16 +101,16 @@
---|
Invoice # | -Client | -Due date | -Balance 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 @@||
---|---|---|---|---|---|---|---|---|---|
Item | -Description | -Unit Cost | -Quantity | - -Line Total | +{{ trans('texts.item') }} | +{{ trans('texts.description') }} | +{{ trans('texts.unit_cost') }} | +{{ trans('texts.quantity') }} | + +{{ 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') }} |
Paid to Date | +{{ trans('texts.paid_to_date') }} | ||||||||
Balance Due | +{{ trans('texts.balance_due') }} |