diff --git a/.gitignore b/.gitignore index dc691e6fbef4..8091b7cec6bf 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /app/config/ubuntu /app/config/packages/anahkiasen/rocketeer/ /app/storage +/public/logo /public/build /public/vendor /bootstrap/compiled.php diff --git a/app/controllers/AccountController.php b/app/controllers/AccountController.php index fb5a3731f806..64c2c729cab9 100755 --- a/app/controllers/AccountController.php +++ b/app/controllers/AccountController.php @@ -39,18 +39,8 @@ class AccountController extends \BaseController { if (!$user) { - $account = new Account; - $account->ip = Request::getClientIp(); - $account->account_key = str_random(RANDOM_KEY_LENGTH); - $account->save(); - - $random = str_random(RANDOM_KEY_LENGTH); - - $user = new User; - $user->password = $random; - $user->password_confirmation = $random; - $user->username = $random; - $account->users()->save($user); + $account = $this->accountRepo->create(); + $user = $account->users()->first(); Session::forget(RECENTLY_VIEWED); } @@ -73,8 +63,8 @@ class AccountController extends \BaseController { $ninjaAccount = $this->getNinjaAccount(); $ninjaClient = $this->getNinjaClient($ninjaAccount); - - + //$invoice = new Invoice(); + //$ninjaClient->invoices()->save($invoice); } private function getNinjaAccount() @@ -651,7 +641,7 @@ class AccountController extends \BaseController { { $path = Input::file('logo')->getRealPath(); File::delete('logo/' . $account->account_key . '.jpg'); - Image::make($path)->resize(null, 120, true, false)->save('logo/' . $account->account_key . '.jpg'); + Image::make($path)->resize(200, 120, true, false)->save('logo/' . $account->account_key . '.jpg'); } Event::fire('user.refresh'); diff --git a/app/controllers/InvoiceController.php b/app/controllers/InvoiceController.php index 1494c077147e..ec66c426a568 100755 --- a/app/controllers/InvoiceController.php +++ b/app/controllers/InvoiceController.php @@ -356,6 +356,8 @@ class InvoiceController extends \BaseController { */ public function show($publicId) { + Session::reflash(); + return Redirect::to('invoices/'.$publicId.'/edit'); } diff --git a/app/database/migrations/2014_03_19_201454_add_language_support.php b/app/database/migrations/2014_03_19_201454_add_language_support.php index b48683073e2f..6acc56e2d478 100644 --- a/app/database/migrations/2014_03_19_201454_add_language_support.php +++ b/app/database/migrations/2014_03_19_201454_add_language_support.php @@ -24,6 +24,8 @@ class AddLanguageSupport extends Migration { DB::table('languages')->insert(['name' => 'German', 'locale' => 'de']); DB::table('languages')->insert(['name' => 'French', 'locale' => 'fr']); DB::table('languages')->insert(['name' => 'Brazilian Portuguese', 'locale' => 'pt_BR']); + DB::table('languages')->insert(['name' => 'Dutch', 'locale' => 'nl']); + DB::table('languages')->insert(['name' => 'Spanish', 'locale' => 'es']); Schema::table('accounts', function($table) { diff --git a/app/filters.php b/app/filters.php index 18ed154ca049..8ad7d5ae42fd 100755 --- a/app/filters.php +++ b/app/filters.php @@ -23,7 +23,9 @@ App::before(function($request) if (Input::has('lang')) { - App::setLocale(Input::get('lang')); + $locale = Input::get('lang'); + Session::set(SESSION_LOCALE, $locale); + App::setLocale($locale); } else if (Auth::check()) { diff --git a/app/lang/de/texts.php b/app/lang/de/texts.php index 230c93a9118a..fb3de4111d57 100644 --- a/app/lang/de/texts.php +++ b/app/lang/de/texts.php @@ -252,9 +252,8 @@ return array( 'confirmation_subject' => 'Invoice Ninja Konto Bestätigung', 'confirmation_header' => 'Konto Bestätigung', 'confirmation_message' => 'Bitte klicke auf den folgenden Link um dein Konto zu bestätigen.', - 'invoice_subject' => 'Neue Rechnung :invoice', 'invoice_message' => 'Um Ihre Rechnung über :amount einzusehen, klicken Sie bitte auf den folgenden Link.', - 'payment_subject' => 'Zahlungseingang :invoice', + 'payment_subject' => 'Zahlungseingang', 'payment_message' => 'Vielen Dank für Ihre Zahlung von :amount.', 'email_salutation' => 'Sehr geehrte/r :name,', 'email_signature' => 'Freundliche Grüße,', @@ -293,5 +292,18 @@ return array( 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan', 'remove_logo_link' => 'Click here', ], - + + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already regiestered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', + 'invoice_subject' => 'New invoice from :account', + 'close' => 'Close', + ); diff --git a/app/lang/en/texts.php b/app/lang/en/texts.php index f8614863490e..b9e214172944 100644 --- a/app/lang/en/texts.php +++ b/app/lang/en/texts.php @@ -96,6 +96,7 @@ return array( 'import' => 'Import', 'download' => 'Download', 'cancel' => 'Cancel', + 'close' => 'Close', 'provide_email' => 'Please provide a valid email address', 'powered_by' => 'Powered by', 'no_items' => 'No items', @@ -230,10 +231,10 @@ return array( 'cloned_invoice' => 'Successfully cloned invoice', 'emailed_invoice' => 'Successfully emailed invoice', 'and_created_client' => 'and created client', - 'archived_invoice' => 'Successfully archived credit', - 'archived_invoices' => 'Successfully archived :count credits', - 'deleted_invoice' => 'Successfully deleted credit', - 'deleted_invoices' => 'Successfully deleted :count credits', + 'archived_invoice' => 'Successfully archived invoice', + 'archived_invoices' => 'Successfully archived :count invoices', + 'deleted_invoice' => 'Successfully deleted invoice', + 'deleted_invoices' => 'Successfully deleted :count invoices', 'created_payment' => 'Successfully created payment', 'archived_payment' => 'Successfully archived payment', @@ -252,9 +253,9 @@ return array( 'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_header' => 'Account Confirmation', 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice :invoice', + 'invoice_subject' => 'New invoice from :account', 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received :invoice', + 'payment_subject' => 'Payment Received', 'payment_message' => 'Thank you for your payment of :amount.', 'email_salutation' => 'Dear :name,', 'email_signature' => 'Regards,', @@ -294,4 +295,16 @@ return array( 'remove_logo_link' => 'Click here', ], -); \ No newline at end of file + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already registered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', + + +); diff --git a/app/lang/es/texts.php b/app/lang/es/texts.php index 728286f3bd3c..04c987563820 100644 --- a/app/lang/es/texts.php +++ b/app/lang/es/texts.php @@ -95,6 +95,7 @@ return array( 'import' => 'Import', 'download' => 'Download', 'cancel' => 'Cancel', + 'close' => 'Close', 'provide_email' => 'Please provide a valid email address', 'powered_by' => 'Powered by', 'no_items' => 'No items', @@ -229,10 +230,10 @@ return array( 'cloned_invoice' => 'Successfully cloned invoice', 'emailed_invoice' => 'Successfully emailed invoice', 'and_created_client' => 'and created client', - 'archived_invoice' => 'Successfully archived credit', - 'archived_invoices' => 'Successfully archived :count credits', - 'deleted_invoice' => 'Successfully deleted credit', - 'deleted_invoices' => 'Successfully deleted :count credits', + 'archived_invoice' => 'Successfully archived invoice', + 'archived_invoices' => 'Successfully archived :count invoices', + 'deleted_invoice' => 'Successfully deleted invoice', + 'deleted_invoices' => 'Successfully deleted :count invoices', 'created_payment' => 'Successfully created payment', 'archived_payment' => 'Successfully archived payment', @@ -251,9 +252,9 @@ return array( 'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_header' => 'Account Confirmation', 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice :invoice', + 'invoice_subject' => 'New invoice from :account', 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received :invoice', + 'payment_subject' => 'Payment Received', 'payment_message' => 'Thank you for your payment of :amount.', 'email_salutation' => 'Dear :name,', 'email_signature' => 'Regards,', @@ -292,6 +293,17 @@ return array( 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan', 'remove_logo_link' => 'Click here', ], - + + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already regiestered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', + ); diff --git a/app/lang/fr/texts.php b/app/lang/fr/texts.php index 0c0d220181d6..a9fe84daa529 100644 --- a/app/lang/fr/texts.php +++ b/app/lang/fr/texts.php @@ -96,6 +96,7 @@ return array( 'import' => 'Import', 'download' => 'Download', 'cancel' => 'Cancel', + 'close' => 'Close', 'provide_email' => 'Please provide a valid email address', 'powered_by' => 'Powered by', 'no_items' => 'No items', @@ -230,10 +231,10 @@ return array( 'cloned_invoice' => 'Successfully cloned invoice', 'emailed_invoice' => 'Successfully emailed invoice', 'and_created_client' => 'and created client', - 'archived_invoice' => 'Successfully archived credit', - 'archived_invoices' => 'Successfully archived :count credits', - 'deleted_invoice' => 'Successfully deleted credit', - 'deleted_invoices' => 'Successfully deleted :count credits', + 'archived_invoice' => 'Successfully archived invoice', + 'archived_invoices' => 'Successfully archived :count invoices', + 'deleted_invoice' => 'Successfully deleted invoice', + 'deleted_invoices' => 'Successfully deleted :count invoices', 'created_payment' => 'Successfully created payment', 'archived_payment' => 'Successfully archived payment', @@ -252,9 +253,9 @@ return array( 'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_header' => 'Account Confirmation', 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice :invoice', + 'invoice_subject' => 'New invoice from :account', 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received :invoice', + 'payment_subject' => 'Payment Received', 'payment_message' => 'Thank you for your payment of :amount.', 'email_salutation' => 'Dear :name,', 'email_signature' => 'Regards,', @@ -293,6 +294,17 @@ return array( 'remove_logo' => ':link to remove the Invoice Ninja logo by joining the pro plan', 'remove_logo_link' => 'Click here', ], + + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already regiestered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', ); diff --git a/app/lang/it/texts.php b/app/lang/it/texts.php index e8ed6ee7c3e8..3eac655a4d92 100644 --- a/app/lang/it/texts.php +++ b/app/lang/it/texts.php @@ -96,6 +96,7 @@ return array( 'import' => 'Import', 'download' => 'Download', 'cancel' => 'Cancel', + 'close' => 'Close', 'provide_email' => 'Please provide a valid email address', 'powered_by' => 'Powered by', 'no_items' => 'No items', @@ -230,10 +231,10 @@ return array( 'cloned_invoice' => 'Successfully cloned invoice', 'emailed_invoice' => 'Successfully emailed invoice', 'and_created_client' => 'and created client', - 'archived_invoice' => 'Successfully archived credit', - 'archived_invoices' => 'Successfully archived :count credits', - 'deleted_invoice' => 'Successfully deleted credit', - 'deleted_invoices' => 'Successfully deleted :count credits', + 'archived_invoice' => 'Successfully archived invoice', + 'archived_invoices' => 'Successfully archived :count invoices', + 'deleted_invoice' => 'Successfully deleted invoice', + 'deleted_invoices' => 'Successfully deleted :count invoices', 'created_payment' => 'Successfully created payment', 'archived_payment' => 'Successfully archived payment', @@ -252,9 +253,9 @@ return array( 'confirmation_subject' => 'Invoice Ninja Account Confirmation', 'confirmation_header' => 'Account Confirmation', 'confirmation_message' => 'Please access the link below to confirm your account.', - 'invoice_subject' => 'New invoice :invoice', + 'invoice_subject' => 'New invoice from :account', 'invoice_message' => 'To view your invoice for :amount, click the link below.', - 'payment_subject' => 'Payment Received :invoice', + 'payment_subject' => 'Payment Received', 'payment_message' => 'Thank you for your payment of :amount.', 'email_salutation' => 'Dear :name,', 'email_signature' => 'Regards,', @@ -294,6 +295,17 @@ return array( 'remove_logo_link' => 'Click here', ], + 'logout' => 'Log Out', + 'sign_up_to_save' => 'Sign up to save your work', + 'agree_to_terms' =>'I agree to the Invoice Ninja :terms', + 'terms_of_service' => 'Terms of Service', + 'email_taken' => 'The email address is already regiestered', + 'working' => 'Working', + 'success' => 'Success', + 'success_message' => 'You have succesfully registered. Please visit the link in the account confirmation email to verify your email address.', + 'erase_data' => 'This will permanently erase your data.', + 'password' => 'Password', + ); \ No newline at end of file diff --git a/app/lang/nl/pagination.php b/app/lang/nl/pagination.php new file mode 100644 index 000000000000..583b463a6375 --- /dev/null +++ b/app/lang/nl/pagination.php @@ -0,0 +1,20 @@ + '« Vorige', + + 'next' => 'Volgende »', + +); \ No newline at end of file diff --git a/app/lang/nl/reminders.php b/app/lang/nl/reminders.php new file mode 100644 index 000000000000..1a517a658edd --- /dev/null +++ b/app/lang/nl/reminders.php @@ -0,0 +1,24 @@ + "Wachtwoord moet minimaal zes tekens lang zijn en de wachtwoorden moeten overeenkomen.", + + "user" => "Geen gebruiker bekend met dat e-mailadres.", + + "token" => "Dit wachtwoord reset token is niet geldig.", + + "sent" => "Wachtwoord herinnering verzonden!", + +); diff --git a/app/lang/nl/texts.php b/app/lang/nl/texts.php new file mode 100644 index 000000000000..00dfd8c3faf5 --- /dev/null +++ b/app/lang/nl/texts.php @@ -0,0 +1,309 @@ + 'Organisatie', + 'name' => 'Naam', + 'website' => 'Website', + 'work_phone' => 'Telefoon', + 'address' => 'Adres', + 'address1' => 'Straat', + 'address2' => 'Bus/Suite', + 'city' => 'Gemeente', + 'state' => 'Staat/Provincie', + 'postal_code' => 'Postcode', + 'country_id' => 'Land', + 'contacts' => 'Contacten', + 'first_name' => 'Voornaam', + 'last_name' => 'Achternaam', + 'phone' => 'Telefoon', + 'email' => 'E-mail', + 'additional_info' => 'Extra Informatie', + 'payment_terms' => 'Betalingsvoorwaarden', + 'currency_id' => 'Munteenheid', + 'size_id' => 'Grootte', + 'industry_id' => 'Industrie', + 'private_notes' => 'Privé Bericht', + + // invoice + 'invoice' => 'Factuur', + 'client' => 'Klant', + 'invoice_date' => 'Factuurdatum', + 'due_date' => 'Vervaldatum', + 'invoice_number' => 'Factuur nummer', + 'invoice_number_short' => 'Factuur #', + 'po_number' => 'Bestelnummer', + 'po_number_short' => 'Bestel #', + 'frequency_id' => 'Hoe vaak', + 'discount' => 'Korting', + 'taxes' => 'Belastingen', + 'tax' => 'Belasting', + 'item' => 'Naam', + 'description' => 'Beschrijving', + 'unit_cost' => 'Eenheidsprijs', + 'quantity' => 'Aantal', + 'line_total' => 'Totaal lijn', + 'subtotal' => 'Subtotaal', + 'paid_to_date' => 'Betaal Datum', + 'balance_due' => 'Openstaand saldo', + 'invoice_design_id' => 'Ontwerp', + 'terms' => 'Voorwaarden', + 'your_invoice' => 'Jouw factuur', + + 'remove_contact' => 'Verwijder contact', + 'add_contact' => 'Voeg contact toe', + 'create_new_client' => 'Maak nieuwe klant', + 'edit_client_details' => 'Pas klantdetails aan', + 'enable' => 'Activeer', + 'learn_more' => 'Meer te weten komen', + 'manage_rates' => 'Beheer prijzen', + 'note_to_client' => 'Bericht aan klant', + 'invoice_terms' => 'Factuur voorwaarden', + 'save_as_default_terms' => 'Opslaan als standaard voorwaarden', + 'download_pdf' => 'Download PDF', + 'pay_now' => 'Betaal nu', + 'save_invoice' => 'Sla Factuur op', + 'clone_invoice' => 'Kopieer Factuur', + 'archive_invoice' => 'Archiveer Factuur', + 'delete_invoice' => 'Verwijder Factuur', + 'email_invoice' => 'E-mail Factuur', + 'enter_payment' => 'Betaling ingeven', + 'tax_rates' => 'BTW tarief', + 'rate' => 'Tarief', + 'settings' => 'Instellingen', + 'enable_invoice_tax' => 'Activeer instelling van BTW op volledige factuur', + 'enable_line_item_tax' => 'Activeer instelling van BTW per lijn', + + // navigation + 'dashboard' => 'Dashboard', + 'clients' => 'Klanten', + 'invoices' => 'Facturen', + 'payments' => 'Betalingen', + 'credits' => 'Kredietnota\'s', + 'history' => 'Geschiedenis', + 'search' => 'Zoeken', + 'sign_up' => 'Aanmelden', + 'guest' => 'Gast', + 'company_details' => 'Bedrijfsdetails', + 'online_payments' => 'Online betalingen', + 'notifications' => 'Meldingen', + 'import_export' => 'Importeer/Exporteer', + 'done' => 'Klaar', + 'save' => 'Opslaan', + 'create' => 'Aanmaken', + 'upload' => 'Uploaden', + 'import' => 'Importeer', + 'download' => 'Downloaden', + 'cancel' => 'Annuleren', + 'provide_email' => 'Geef een geldig e-mailadres aub.', + 'powered_by' => 'Factuur gemaakt via', + 'no_items' => 'Geen artikelen', + + // recurring invoices + 'recurring_invoices' => 'Terugkerende facturen', + 'recurring_help' => '
Zend klanten automatisch wekelijks, twee keer per maand, maandelijks, per kwartaal of jaarlijks dezelfde facturen.
+Gebruik :MONTH, :QUARTER of :YEAR voor dynamische datums. Eenvoudige wiskunde werkt ook, bijvoorbeeld :MONTH-1.
+Voorbeelden van dynamische factuur variabelen:
+