diff --git a/app/Http/Controllers/V1/Admin/Customer/CustomerStatsController.php b/app/Http/Controllers/V1/Admin/Customer/CustomerStatsController.php index 5fd034c5..f82aa001 100644 --- a/app/Http/Controllers/V1/Admin/Customer/CustomerStatsController.php +++ b/app/Http/Controllers/V1/Admin/Customer/CustomerStatsController.php @@ -88,7 +88,7 @@ class CustomerStatsController extends Controller ($receiptTotals[$i] - $expenseTotals[$i]) ); $i++; - array_push($months, $start->format('M')); + array_push($months, $start->translatedFormat('M')); $monthCounter++; $end->startOfMonth(); $start->addMonth()->startOfMonth(); diff --git a/app/Http/Controllers/V1/Admin/Dashboard/DashboardController.php b/app/Http/Controllers/V1/Admin/Dashboard/DashboardController.php index 23a47362..a0779312 100644 --- a/app/Http/Controllers/V1/Admin/Dashboard/DashboardController.php +++ b/app/Http/Controllers/V1/Admin/Dashboard/DashboardController.php @@ -91,7 +91,7 @@ class DashboardController extends Controller ($receipt_totals[$i] - $expense_totals[$i]) ); $i++; - array_push($months, $start->format('M')); + array_push($months, $start->translatedFormat('M')); $monthCounter++; $end->startOfMonth(); $start->addMonth()->startOfMonth(); diff --git a/app/Http/Controllers/V1/Admin/Report/CustomerSalesReportController.php b/app/Http/Controllers/V1/Admin/Report/CustomerSalesReportController.php index 94fd0596..a80ebf57 100644 --- a/app/Http/Controllers/V1/Admin/Report/CustomerSalesReportController.php +++ b/app/Http/Controllers/V1/Admin/Report/CustomerSalesReportController.php @@ -54,8 +54,8 @@ class CustomerSalesReportController extends Controller } $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id); - $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat); - $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat); + $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->translatedFormat($dateFormat); + $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->translatedFormat($dateFormat); $currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id)); $colors = [ diff --git a/app/Http/Controllers/V1/Admin/Report/ExpensesReportController.php b/app/Http/Controllers/V1/Admin/Report/ExpensesReportController.php index 2ca998c1..fc1ad264 100644 --- a/app/Http/Controllers/V1/Admin/Report/ExpensesReportController.php +++ b/app/Http/Controllers/V1/Admin/Report/ExpensesReportController.php @@ -41,8 +41,8 @@ class ExpensesReportController extends Controller } $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id); - $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat); - $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat); + $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->translatedFormat($dateFormat); + $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->translatedFormat($dateFormat); $currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id)); $colors = [ diff --git a/app/Http/Controllers/V1/Admin/Report/ItemSalesReportController.php b/app/Http/Controllers/V1/Admin/Report/ItemSalesReportController.php index 53c61014..684abe84 100644 --- a/app/Http/Controllers/V1/Admin/Report/ItemSalesReportController.php +++ b/app/Http/Controllers/V1/Admin/Report/ItemSalesReportController.php @@ -41,8 +41,8 @@ class ItemSalesReportController extends Controller } $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id); - $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat); - $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat); + $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->translatedFormat($dateFormat); + $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->translatedFormat($dateFormat); $currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id)); $colors = [ diff --git a/app/Http/Controllers/V1/Admin/Report/ProfitLossReportController.php b/app/Http/Controllers/V1/Admin/Report/ProfitLossReportController.php index 16925e3f..a866b61c 100644 --- a/app/Http/Controllers/V1/Admin/Report/ProfitLossReportController.php +++ b/app/Http/Controllers/V1/Admin/Report/ProfitLossReportController.php @@ -47,8 +47,8 @@ class ProfitLossReportController extends Controller } $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id); - $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat); - $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat); + $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->translatedFormat($dateFormat); + $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->translatedFormat($dateFormat); $currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id)); $colors = [ diff --git a/app/Http/Controllers/V1/Admin/Report/TaxSummaryReportController.php b/app/Http/Controllers/V1/Admin/Report/TaxSummaryReportController.php index a0c4c4a0..0e3a762d 100644 --- a/app/Http/Controllers/V1/Admin/Report/TaxSummaryReportController.php +++ b/app/Http/Controllers/V1/Admin/Report/TaxSummaryReportController.php @@ -42,8 +42,8 @@ class TaxSummaryReportController extends Controller } $dateFormat = CompanySetting::getSetting('carbon_date_format', $company->id); - $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->format($dateFormat); - $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->format($dateFormat); + $from_date = Carbon::createFromFormat('Y-m-d', $request->from_date)->translatedFormat($dateFormat); + $to_date = Carbon::createFromFormat('Y-m-d', $request->to_date)->translatedFormat($dateFormat); $currency = Currency::findOrFail(CompanySetting::getSetting('currency', $company->id)); $colors = [ diff --git a/app/Http/Controllers/V1/Customer/General/BootstrapController.php b/app/Http/Controllers/V1/Customer/General/BootstrapController.php index bfed72e7..f34f08ba 100644 --- a/app/Http/Controllers/V1/Customer/General/BootstrapController.php +++ b/app/Http/Controllers/V1/Customer/General/BootstrapController.php @@ -34,6 +34,7 @@ class BootstrapController extends Controller 'menu' => $menu, 'current_customer_currency' => Currency::find($customer->currency_id), 'modules' => Module::where('enabled', true)->pluck('name'), + 'current_company_language' => CompanySetting::getSetting('language', $customer->company_id), ]]); } } diff --git a/app/Http/Controllers/V1/Installation/LanguagesController.php b/app/Http/Controllers/V1/Installation/LanguagesController.php new file mode 100755 index 00000000..f6451616 --- /dev/null +++ b/app/Http/Controllers/V1/Installation/LanguagesController.php @@ -0,0 +1,21 @@ +json([ + 'languages' => config('invoiceshelf.languages'), + ]); + } +} diff --git a/app/Http/Controllers/V1/Installation/OnboardingWizardController.php b/app/Http/Controllers/V1/Installation/OnboardingWizardController.php index 20e278ec..9224fa8b 100644 --- a/app/Http/Controllers/V1/Installation/OnboardingWizardController.php +++ b/app/Http/Controllers/V1/Installation/OnboardingWizardController.php @@ -19,11 +19,13 @@ class OnboardingWizardController extends Controller if (! InstallUtils::dbMarkerExists()) { return response()->json([ 'profile_complete' => 0, + 'profile_language' => 'en', ]); } return response()->json([ 'profile_complete' => Setting::getSetting('profile_complete'), + 'profile_language' => Setting::getSetting('profile_language'), ]); } @@ -43,4 +45,13 @@ class OnboardingWizardController extends Controller 'profile_complete' => Setting::getSetting('profile_complete'), ]); } + + public function saveLanguage(Request $request) + { + Setting::setSetting('profile_language', $request->profile_language); + + return response()->json([ + 'profile_language' => Setting::getSetting('profile_language'), + ]); + } } diff --git a/app/Http/Resources/RoleResource.php b/app/Http/Resources/RoleResource.php index 9450a485..9aa0954c 100644 --- a/app/Http/Resources/RoleResource.php +++ b/app/Http/Resources/RoleResource.php @@ -29,6 +29,6 @@ class RoleResource extends JsonResource { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->scope); - return Carbon::parse($this->created_at)->format($dateFormat); + return Carbon::parse($this->created_at)->translatedFormat($dateFormat); } } diff --git a/app/Mail/EstimateViewedMail.php b/app/Mail/EstimateViewedMail.php index af816cde..b9e1bfe9 100644 --- a/app/Mail/EstimateViewedMail.php +++ b/app/Mail/EstimateViewedMail.php @@ -31,6 +31,7 @@ class EstimateViewedMail extends Mailable public function build() { return $this->from(config('mail.from.address'), config('mail.from.name')) + ->subject(__('notification_view_estimate')) ->markdown('emails.viewed.estimate', ['data', $this->data]); } } diff --git a/app/Mail/InvoiceViewedMail.php b/app/Mail/InvoiceViewedMail.php index 40ee0eef..a43b8662 100644 --- a/app/Mail/InvoiceViewedMail.php +++ b/app/Mail/InvoiceViewedMail.php @@ -31,6 +31,7 @@ class InvoiceViewedMail extends Mailable public function build() { return $this->from(config('mail.from.address'), config('mail.from.name')) + ->subject(__('notification_view_invoice')) ->markdown('emails.viewed.invoice', ['data', $this->data]); } } diff --git a/app/Models/Customer.php b/app/Models/Customer.php index 101efdd8..47eb2d65 100644 --- a/app/Models/Customer.php +++ b/app/Models/Customer.php @@ -54,7 +54,7 @@ class Customer extends Authenticatable implements HasMedia { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->created_at)->format($dateFormat); + return Carbon::parse($this->created_at)->translatedFormat($dateFormat); } public function setPasswordAttribute($value) diff --git a/app/Models/Estimate.php b/app/Models/Estimate.php index 43d8684e..395fee5b 100644 --- a/app/Models/Estimate.php +++ b/app/Models/Estimate.php @@ -112,14 +112,14 @@ class Estimate extends Model implements HasMedia { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->expiry_date)->format($dateFormat); + return Carbon::parse($this->expiry_date)->translatedFormat($dateFormat); } public function getFormattedEstimateDateAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->estimate_date)->format($dateFormat); + return Carbon::parse($this->estimate_date)->translatedFormat($dateFormat); } public function scopeEstimatesBetween($query, $start, $end) diff --git a/app/Models/Expense.php b/app/Models/Expense.php index c7d297bc..ef46b514 100644 --- a/app/Models/Expense.php +++ b/app/Models/Expense.php @@ -72,14 +72,14 @@ class Expense extends Model implements HasMedia { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->expense_date)->format($dateFormat); + return Carbon::parse($this->expense_date)->translatedFormat($dateFormat); } public function getFormattedCreatedAtAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->created_at)->format($dateFormat); + return Carbon::parse($this->created_at)->translatedFormat($dateFormat); } public function getReceiptUrlAttribute($value) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 84e0361a..7bcc754f 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -189,14 +189,14 @@ class Invoice extends Model implements HasMedia { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->due_date)->format($dateFormat); + return Carbon::parse($this->due_date)->translatedFormat($dateFormat); } public function getFormattedInvoiceDateAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->invoice_date)->format($dateFormat); + return Carbon::parse($this->invoice_date)->translatedFormat($dateFormat); } public function scopeWhereStatus($query, $status) diff --git a/app/Models/Item.php b/app/Models/Item.php index 9be3b144..a73b62b4 100644 --- a/app/Models/Item.php +++ b/app/Models/Item.php @@ -111,7 +111,7 @@ class Item extends Model { $dateFormat = CompanySetting::getSetting('carbon_date_format', request()->header('company')); - return Carbon::parse($this->created_at)->format($dateFormat); + return Carbon::parse($this->created_at)->translatedFormat($dateFormat); } public function taxes(): HasMany diff --git a/app/Models/Payment.php b/app/Models/Payment.php index 423f6964..be7cb407 100644 --- a/app/Models/Payment.php +++ b/app/Models/Payment.php @@ -74,14 +74,14 @@ class Payment extends Model implements HasMedia { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->created_at)->format($dateFormat); + return Carbon::parse($this->created_at)->translatedFormat($dateFormat); } public function getFormattedPaymentDateAttribute($value) { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->payment_date)->format($dateFormat); + return Carbon::parse($this->payment_date)->translatedFormat($dateFormat); } public function getPaymentPdfUrlAttribute() diff --git a/app/Models/RecurringInvoice.php b/app/Models/RecurringInvoice.php index 8afbeed9..6e71f619 100644 --- a/app/Models/RecurringInvoice.php +++ b/app/Models/RecurringInvoice.php @@ -57,14 +57,14 @@ class RecurringInvoice extends Model { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->starts_at)->format($dateFormat); + return Carbon::parse($this->starts_at)->translatedFormat($dateFormat); } public function getFormattedNextInvoiceAtAttribute() { $dateFormat = CompanySetting::getSetting('carbon_date_format', $this->company_id); - return Carbon::parse($this->next_invoice_at)->format($dateFormat); + return Carbon::parse($this->next_invoice_at)->translatedFormat($dateFormat); } public function getFormattedLimitDateAttribute() diff --git a/app/Space/DateFormatter.php b/app/Space/DateFormatter.php index b3b58ecd..7510b83d 100644 --- a/app/Space/DateFormatter.php +++ b/app/Space/DateFormatter.php @@ -47,7 +47,7 @@ class DateFormatter foreach (static::$formats as $format) { $new[] = [ - 'display_date' => Carbon::now()->format($format['carbon_format']), + 'display_date' => Carbon::now()->translatedFormat($format['carbon_format']), 'carbon_format_value' => $format['carbon_format'], 'moment_format_value' => $format['moment_format'], ]; diff --git a/app/Space/EnvironmentManager.php b/app/Space/EnvironmentManager.php index df87732b..571251ca 100755 --- a/app/Space/EnvironmentManager.php +++ b/app/Space/EnvironmentManager.php @@ -103,9 +103,9 @@ class EnvironmentManager */ public function saveDatabaseVariables(DatabaseEnvironmentRequest $request) { - $dbEnv = [ 'APP_URL' => $request->get('app_url'), + 'APP_LOCALE' => $request->get('app_locale'), 'DB_CONNECTION' => $request->get('database_connection'), 'SANCTUM_STATEFUL_DOMAINS' => $request->get('app_domain'), 'SESSION_DOMAIN' => explode(':', $request->get('app_domain'))[0], diff --git a/config/app.php b/config/app.php index efd5f969..b17b818c 100644 --- a/config/app.php +++ b/config/app.php @@ -11,4 +11,4 @@ return [ 'Redis' => Illuminate\Support\Facades\Redis::class, ])->toArray(), -]; +]; \ No newline at end of file diff --git a/config/invoiceshelf.php b/config/invoiceshelf.php index 75b29e94..e3305d38 100644 --- a/config/invoiceshelf.php +++ b/config/invoiceshelf.php @@ -78,18 +78,18 @@ return [ * List of Fiscal Years */ 'fiscal_years' => [ - ['key' => 'january-december', 'value' => '1-12'], - ['key' => 'february-january', 'value' => '2-1'], - ['key' => 'march-february', 'value' => '3-2'], - ['key' => 'april-march', 'value' => '4-3'], - ['key' => 'may-april', 'value' => '5-4'], - ['key' => 'june-may', 'value' => '6-5'], - ['key' => 'july-june', 'value' => '7-6'], - ['key' => 'august-july', 'value' => '8-7'], - ['key' => 'september-august', 'value' => '9-8'], - ['key' => 'october-september', 'value' => '10-9'], - ['key' => 'november-october', 'value' => '11-10'], - ['key' => 'december-november', 'value' => '12-11'], + ['key' => 'settings.preferences.fiscal_years.january_december', 'value' => '1-12'], + ['key' => 'settings.preferences.fiscal_years.february_january', 'value' => '2-1'], + ['key' => 'settings.preferences.fiscal_years.march_february', 'value' => '3-2'], + ['key' => 'settings.preferences.fiscal_years.april_march', 'value' => '4-3'], + ['key' => 'settings.preferences.fiscal_years.may_april', 'value' => '5-4'], + ['key' => 'settings.preferences.fiscal_years.june_may', 'value' => '6-5'], + ['key' => 'settings.preferences.fiscal_years.july_june', 'value' => '7-6'], + ['key' => 'settings.preferences.fiscal_years.august_july', 'value' => '8-7'], + ['key' => 'settings.preferences.fiscal_years.september_august', 'value' => '9-8'], + ['key' => 'settings.preferences.fiscal_years.october_september', 'value' => '10-9'], + ['key' => 'settings.preferences.fiscal_years.november_october', 'value' => '11-10'], + ['key' => 'settings.preferences.fiscal_years.december_november', 'value' => '12-11'], ], /* @@ -408,7 +408,7 @@ return [ */ 'customer_menu' => [ [ - 'title' => 'Dashboard', + 'title' => 'navigation.dashboard', 'link' => '/customer/dashboard', 'icon' => '', 'name' => '', @@ -418,7 +418,7 @@ return [ 'model' => '', ], [ - 'title' => 'Invoices', + 'title' => 'navigation.invoices', 'link' => '/customer/invoices', 'icon' => '', 'name' => '', @@ -428,7 +428,7 @@ return [ 'model' => '', ], [ - 'title' => 'Estimates', + 'title' => 'navigation.estimates', 'link' => '/customer/estimates', 'icon' => '', 'name' => '', @@ -438,7 +438,7 @@ return [ 'model' => '', ], [ - 'title' => 'Payments', + 'title' => 'navigation.payments', 'link' => '/customer/payments', 'icon' => '', 'name' => '', @@ -448,7 +448,7 @@ return [ 'model' => '', ], [ - 'title' => 'Settings', + 'title' => 'navigation.settings', 'link' => '/customer/settings', 'icon' => '', 'name' => '', diff --git a/lang/en.json b/lang/en.json index 9e042c29..3162e19e 100644 --- a/lang/en.json +++ b/lang/en.json @@ -100,16 +100,35 @@ "pay_invoice": "Pay Invoice", "login_successfully": "Logged in successfully!", "logged_out_successfully": "Logged out successfully", - "mark_as_default": "Mark as default" + "mark_as_default": "Mark as default", + "no_data_found": "No data found", + "pagination": { + "previous": "Previous", + "next": "Next", + "showing": "Showing", + "to": "to", + "of": "of", + "results": "results" + }, + "file_upload": { + "drag_a_file": "Drag a file here or", + "browse": "browse", + "to_choose": "to choose a file" + }, + "multiselect": { + "the_list_is_empty": "The list is empty", + "no_results_found": "No results found" + }, + "copy_to_clipboard": "Copy to Clipboard" }, "dashboard": { "select_year": "Select year", "cards": { "due_amount": "Amount Due", - "customers": "Customers", - "invoices": "Invoices", - "estimates": "Estimates", - "payments": "Payments" + "customers": "Customer | Customers", + "invoices": "Invoice | Invoices", + "estimates": "Estimate | Estimates", + "payments": "Payment | Payments" }, "chart_info": { "total_sales": "Sales", @@ -548,7 +567,18 @@ "hour": "Hour", "day_month": "Day of month", "month": "Month", - "day_week": "Day of week" + "day_week": "Day of week", + "every_minute": "Every Minute", + "every_30_minute": "Every 30 Minute", + "every_hour": "Every Hour", + "every_2_hour": "Every 2 Hour", + "every_day_at_midnight": "Every day at midnight", + "every_week": "Every Week", + "every_15_days_at_midnight": "Every 15 days at midnight", + "on_the_first_day_of_every_month_at_midnight": "On the first day of every month at 00:00", + "every_6_month": "Every 6 Month", + "every_year_on_the_first_day_of_january_at_midnight": "Every year on the first day of january at 00:00", + "custom": "Custom" }, "confirm_delete": "You will not be able to recover this Invoice | You will not be able to recover these Invoices", "created_message": "Recurring Invoice created successfully", @@ -557,7 +587,12 @@ "marked_as_sent_message": "Recurring Invoice marked as sent successfully", "user_email_does_not_exist": "User email does not exist", "something_went_wrong": "something went wrong", - "invalid_due_amount_message": "Total Recurring Invoice amount cannot be less than total paid amount for this Recurring Invoice. Please update the invoice or delete the associated payments to continue." + "invalid_due_amount_message": "Total Recurring Invoice amount cannot be less than total paid amount for this Recurring Invoice. Please update the invoice or delete the associated payments to continue.", + "limit": { + "none": "None", + "date": "Date", + "count": "Count" + } }, "payments": { "title": "Payments", @@ -595,7 +630,8 @@ "created_message": "Payment created successfully", "updated_message": "Payment updated successfully", "deleted_message": "Payment deleted successfully | Payments deleted successfully", - "invalid_amount_message": "Payment amount is invalid" + "invalid_amount_message": "Payment amount is invalid", + "amount_due": "Due Amount" }, "expenses": { "title": "Expenses", @@ -700,7 +736,8 @@ "installed": "Installed", "no_modules_installed": "No Modules Installed Yet!", "disable_warning": "All the settings for this particular will be reverted.", - "what_you_get": "What you get" + "what_you_get": "What you get", + "sign_up_and_get_token": "Sign up & Get Token" }, "users": { "title": "Users", @@ -752,7 +789,11 @@ "date_range": "Select Date Range", "to_date": "To Date", "from_date": "From Date", - "report_type": "Report Type" + "report_type": "Report Type", + "sort": { + "by_customer": "By Customer", + "by_item": "By Item" + } }, "taxes": { "taxes": "Taxes", @@ -920,7 +961,14 @@ "added_message": "Custom Field added successfully", "press_enter_to_add": "Press enter to add new option", "model_in_use": "Cannot update model for fields which are already in use.", - "type_in_use": "Cannot update type for fields which are already in use." + "type_in_use": "Cannot update type for fields which are already in use.", + "model_type": { + "customer": "Customer", + "invoice": "Invoice", + "estimate": "Estimate", + "expense": "Expense", + "payment": "Payment" + } }, "customization": { "customization": "customization", @@ -1041,7 +1089,12 @@ "note_updated": "Note Updated successfully", "note_confirm_delete": "You will not be able to recover this Note", "already_in_use": "Note is already in use", - "deleted_message": "Note deleted successfully" + "deleted_message": "Note deleted successfully", + "types": { + "estimate": "Estimate", + "invoice": "Invoice", + "payment": "Payment" + } } }, "account_settings": { @@ -1196,7 +1249,21 @@ "on_hold": "On Hold", "update_status": "Update Status", "completed": "Completed", - "company_currency_unchangeable": "Company currency cannot be changed" + "company_currency_unchangeable": "Company currency cannot be changed", + "fiscal_years": { + "january_december": "January - December", + "february_january": "February - January", + "march_february": "March - February", + "april_march": "April - March", + "may_april": "May - April", + "june_may": "June - May", + "july_june": "July - June", + "august_july": "August - July", + "september_august": "September - August", + "october_september": "October - September", + "november_october": "November - October", + "december_november": "December - November" + } }, "update_app": { "title": "Update App", @@ -1355,6 +1422,10 @@ "next": "Next", "continue": "Continue", "skip": "Skip", + "install_language": { + "title": "Choose your language", + "description": "Select language wizard to install InvoiceShelf" + }, "database": { "database": "Site URL & Database", "connection": "Database Connection", @@ -1381,7 +1452,14 @@ "verify_now": "Verify Now", "success": "Domain Verify Successfully.", "failed": "Domain verification failed. Please enter valid domain name.", - "verify_and_continue": "Verify And Continue" + "verify_and_continue": "Verify And Continue", + "notes": { + "notes" : "Notes:", + "not_contain" : "App domain should not contain", + "or" : "or", + "in_front": "in front of the domain.", + "if_you": "If you're accessing the website on a different port, please mention the port. For example:" + } }, "mail": { "host": "Mail Host", @@ -1532,5 +1610,14 @@ "pdf_received_from": "Received from:", "pdf_tax_label": "Tax", "pdf_tax_id": "Tax-ID", - "pdf_vat_id": "VAT-ID" + "pdf_vat_id": "VAT-ID", + "mail_thanks": "Thanks", + "mail_view_estimate":"View Estimate", + "mail_viewed_estimate": ":name viewed this Estimate.", + "mail_view_invoice": "View Invoice", + "mail_viewed_invoice": ":name viewed this Invoice.", + "mail_view_payment": "View Payment", + "notification_view_estimate": "[Notification] Estimate viewed", + "notification_view_invoice": "[Notification] Invoice viewed", + "You have received a new invoice from {COMPANY_NAME}. Please download using the button below:": "You have received a new invoice from {COMPANY_NAME}. Please download using the button below:" } diff --git a/lang/fr.json b/lang/fr.json index 28410ad1..d0bf8983 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -100,16 +100,35 @@ "pay_invoice": "Payer facture", "login_successfully": "Identifié avec succès!", "logged_out_successfully": "Déconnecté avec succès", - "mark_as_default": "Marquer par défaut" + "mark_as_default": "Marquer par défaut", + "no_data_found": "Aucune donnée pour le moment", + "pagination": { + "previous": "Précédent", + "next": "Suivant", + "showing": "Affichage de", + "to": "à", + "of": "sur", + "results": "résultats" + }, + "file_upload": { + "drag_a_file": "Déposez un fichier ici ou", + "browse": "parcourez", + "to_choose": "pour choisir un fichier" + }, + "multiselect": { + "the_list_is_empty": "La liste est vide", + "no_results_found": "Aucun résultat" + }, + "copy_to_clipboard": "Copier dans le presse-papier" }, "dashboard": { "select_year": "Sélectionnez l'année", "cards": { "due_amount": "Encours clients", - "customers": "Clients", - "invoices": "Factures", - "estimates": "Devis", - "payments": "Paiements" + "customers": "Client | Clients", + "invoices": "Facture | Factures", + "estimates": "Devis | Devis", + "payments": "Paiement | Paiements" }, "chart_info": { "total_sales": "Ventes", @@ -548,7 +567,18 @@ "hour": "Heure", "day_month": "Jour du mois", "month": "Mois", - "day_week": "Jour de la semaine" + "day_week": "Jour de la semaine", + "every_minute": "Toutes les minutes", + "every_30_minute": "Toutes les 30 minutes", + "every_hour": "Toutes les heures", + "every_2_hour": "Toutes les 2 heures", + "every_day_at_midnight": "Tous les jours à minuit", + "every_week": "Toutes les semaines", + "every_15_days_at_midnight": "Tous les 15 jours à minuit", + "on_the_first_day_of_every_month_at_midnight": "Au premier jour du mois à minuit", + "every_6_month": "Tous les 6 mois", + "every_year_on_the_first_day_of_january_at_midnight": "Tous les ans, au premier janvier à minuit", + "custom": "Personnalisée" }, "confirm_delete": "Vous ne pourrez pas récupérer cette facture | Vous ne pourrez pas récupérer ces factures", "created_message": "Facture récurrente créée", @@ -557,7 +587,12 @@ "marked_as_sent_message": "Facture récurrente envoyée", "user_email_does_not_exist": "L'email de l'utilisateur n'existe pas", "something_went_wrong": "une erreur s’est produite", - "invalid_due_amount_message": "Le montant total de la facture récurrente ne peut pas être inférieur au montant total payé pour cette facture récurrente. Veuillez mettre à jour la facture ou supprimer les paiements associés pour continuer." + "invalid_due_amount_message": "Le montant total de la facture récurrente ne peut pas être inférieur au montant total payé pour cette facture récurrente. Veuillez mettre à jour la facture ou supprimer les paiements associés pour continuer.", + "limit": { + "none": "Aucun", + "date": "Date", + "count": "Nombre" + } }, "payments": { "title": "Paiements", @@ -595,7 +630,8 @@ "created_message": "Paiement créé", "updated_message": "Paiement mis à jour", "deleted_message": "Paiement supprimé | Paiements supprimés", - "invalid_amount_message": "Le montant du paiement est invalide" + "invalid_amount_message": "Le montant du paiement est invalide", + "amount_due": "Montant dû" }, "expenses": { "title": "Dépenses", @@ -700,7 +736,8 @@ "installed": "Installé", "no_modules_installed": "Aucun module installé !", "disable_warning": "Tous les paramètres de ce module seront réinitialisés.", - "what_you_get": "Ce que vous obtenez" + "what_you_get": "Ce que vous obtenez", + "sign_up_and_get_token": "Inscrivez-vous et obtenez votre Jeton" }, "users": { "title": "Utilisateurs", @@ -752,7 +789,11 @@ "date_range": "Période", "to_date": "Au", "from_date": "Du", - "report_type": "Trier" + "report_type": "Trier", + "sort": { + "by_customer": "Par Client", + "by_item": "Par Article" + } }, "taxes": { "taxes": "Taxes", @@ -863,6 +904,8 @@ "company_info": { "company_info": "Coordonnées de la société", "company_name": "Nom", + "tax_id": "Numéro d'identification fiscale", + "vat_id": "Numéro d'identification TVA", "company_logo": "Logo", "section_description": "Saisissez ici les coordonnées de votre entreprise qui s'afficheront sur tous vos documents.", "phone": "Téléphone", @@ -918,7 +961,14 @@ "added_message": "Champ personnalisé ajouté", "press_enter_to_add": "Appuyez sur Entrée pour ajouter une nouvelle option", "model_in_use": "Impossible de mettre à jour le modèle pour les champs qui sont déjà utilisés.", - "type_in_use": "Impossible de mettre à jour le type des champs déjà utilisés." + "type_in_use": "Impossible de mettre à jour le type des champs déjà utilisés.", + "model_type": { + "customer": "Client", + "invoice": "Facture", + "estimate": "Devis", + "expense": "Dépense", + "payment": "Paiement" + } }, "customization": { "customization": "Personnalisation", @@ -1039,7 +1089,12 @@ "note_updated": "Note de bas de page mise à jour", "note_confirm_delete": "Vous ne pourrez pas récupérer cette note de bas de page", "already_in_use": "La note de bas de page est déjà utilisée", - "deleted_message": "Note de bas de page supprimée" + "deleted_message": "Note de bas de page supprimée", + "types": { + "estimate": "Devis", + "invoice": "Facture", + "payment": "Paiement" + } } }, "account_settings": { @@ -1194,7 +1249,21 @@ "on_hold": "En attente", "update_status": "Mettre à jour le statut", "completed": "Terminé", - "company_currency_unchangeable": "La devise de la société ne peut pas être modifiée" + "company_currency_unchangeable": "La devise de la société ne peut pas être modifiée", + "fiscal_years": { + "january_december": "Janvier - Décembre", + "february_january": "Février - Janvier", + "march_february": "Mars - Février", + "april_march": "Avril - Mars", + "may_april": "Mai - Avril", + "june_may": "Juin - Mai", + "july_june": "Juillet - Juin", + "august_july": "Aout - Juillet", + "september_august": "Septembre - Aout", + "october_september": "Octobre - Septembre", + "november_october": "Novembre - Octobre", + "december_november": "Décembre - Novembre" + } }, "update_app": { "title": "Mise à jour", @@ -1267,6 +1336,12 @@ "aws_region": "Région AWS", "aws_bucket": "Bucket", "aws_root": "Répertoire", + "s3_endpoint": "S3 Endpoint", + "s3_key": "S3 Key", + "s3_secret": "S3 Secret", + "s3_region": "S3 Region", + "s3_bucket": "S3 Bucket", + "s3_root": "S3 Root", "do_spaces_type": "Type", "do_spaces_key": "Key", "do_spaces_secret": "Secret", @@ -1347,6 +1422,10 @@ "next": "Suivant", "continue": "Poursuivre", "skip": "Ignorer", + "install_language": { + "title": "Choix de la langue", + "description": "Sélectionner la langue de l'assistant pour installer InvoiceShelf" + }, "database": { "database": "URL du site et base de données", "connection": "Connexion à la base de données", @@ -1373,7 +1452,14 @@ "verify_now": "Vérifier maintenant", "success": "Vérification du domaine réussie.", "failed": "La vérification du domaine a échoué. Veuillez entrer un nom de domaine valide.", - "verify_and_continue": "Vérifier et continuer" + "verify_and_continue": "Vérifier et continuer", + "notes": { + "notes" : "Notes :", + "not_contain" : "Le domaine de l'application ne doit pas contenir", + "or" : "ou", + "in_front": "devant le domaine.", + "if_you": "Si vous accédez au site Web sur un autre port, veuillez mentionner le port. Par exemple :" + } }, "mail": { "host": "Serveur email", @@ -1522,5 +1608,16 @@ "pdf_bill_to": "Facturer à", "pdf_ship_to": "Expédier à", "pdf_received_from": "Reçu de :", - "pdf_tax_label": "Taxe" + "pdf_tax_label": "Taxe", + "pdf_tax_id": "Tax-ID", + "pdf_vat_id": "VAT-ID", + "mail_thanks": "Merci", + "mail_view_estimate":"Voir le Devis", + "mail_viewed_estimate": ":name a consulté ce Devis.", + "mail_view_invoice": "Voir la Facture", + "mail_viewed_invoice": ":name a consulté cette Facture.", + "mail_view_payment": "Voir le Paiement", + "notification_view_estimate": "[Notification] Un Devis a été consulté", + "notification_view_invoice": "[Notification] Une Facture a été consultée", + "You have received a new invoice from {COMPANY_NAME}. Please download using the button below:": "Vous avez reçu une nouvelle facture de {COMPANY_NAME}. Vous pouvez la télécharger en cliquant sur le bouton :" } diff --git a/resources/scripts/admin/components/CopyInputField.vue b/resources/scripts/admin/components/CopyInputField.vue index 851a0bc4..a4995820 100644 --- a/resources/scripts/admin/components/CopyInputField.vue +++ b/resources/scripts/admin/components/CopyInputField.vue @@ -26,7 +26,7 @@ {{ token }}
{{ field.default_answer }}
diff --git a/resources/scripts/admin/views/dashboard/DashboardChart.vue b/resources/scripts/admin/views/dashboard/DashboardChart.vue
index cb7e0c07..c2302e9f 100644
--- a/resources/scripts/admin/views/dashboard/DashboardChart.vue
+++ b/resources/scripts/admin/views/dashboard/DashboardChart.vue
@@ -156,13 +156,16 @@ import LineChart from '@/scripts/admin/components/charts/LineChart.vue'
import ChartPlaceholder from './DashboardChartPlaceholder.vue'
import abilities from '@/scripts/admin/stub/abilities'
import { useUserStore } from '@/scripts/admin/stores/user'
+import { useI18n } from 'vue-i18n'
const dashboardStore = useDashboardStore()
const companyStore = useCompanyStore()
+const { t } = useI18n()
const utils = inject('utils')
const userStore = useUserStore()
-const years = ref(['This year', 'Previous year'])
+const years = ref( [{label: t('dateRange.this_year'), value: 'This year'}, {label: t( 'dateRange.previous_year'), value:
+ 'Previous year'}])
const selectedYear = ref('This year')
watch(
diff --git a/resources/scripts/admin/views/dashboard/DashboardStats.vue b/resources/scripts/admin/views/dashboard/DashboardStats.vue
index e54b3af6..6c392c35 100644
--- a/resources/scripts/admin/views/dashboard/DashboardStats.vue
+++ b/resources/scripts/admin/views/dashboard/DashboardStats.vue
@@ -21,7 +21,7 @@
:icon-component="CustomerIcon"
:loading="!dashboardStore.isDashboardDataLoaded"
route="/admin/customers"
- :label="$t('dashboard.cards.customers')"
+ :label="(dashboardStore.stats.totalCustomerCount <= 1 ? $t('dashboard.cards.customers', 1) : $t('dashboard.cards.customers', 2))"
>
{{ dashboardStore.stats.totalCustomerCount }}
@@ -32,7 +32,7 @@
:icon-component="InvoiceIcon"
:loading="!dashboardStore.isDashboardDataLoaded"
route="/admin/invoices"
- :label="$t('dashboard.cards.invoices')"
+ :label="(dashboardStore.stats.totalInvoiceCount <= 1 ? $t('dashboard.cards.invoices', 1) : $t('dashboard.cards.invoices', 2))"
>
{{ dashboardStore.stats.totalInvoiceCount }}
@@ -43,7 +43,7 @@
:icon-component="EstimateIcon"
:loading="!dashboardStore.isDashboardDataLoaded"
route="/admin/estimates"
- :label="$t('dashboard.cards.estimates')"
+ :label="(dashboardStore.stats.totalEstimateCount <= 1 ? $t( 'dashboard.cards.estimates', 1) : $t('dashboard.cards.estimates', 2))"
>
{{ dashboardStore.stats.totalEstimateCount }}
diff --git a/resources/scripts/admin/views/dashboard/DashboardTable.vue b/resources/scripts/admin/views/dashboard/DashboardTable.vue
index 0decb6a5..136526a7 100644
--- a/resources/scripts/admin/views/dashboard/DashboardTable.vue
+++ b/resources/scripts/admin/views/dashboard/DashboardTable.vue
@@ -95,7 +95,7 @@
v-if="hasAtleastOneEstimateAbility()"
#cell-actions="{ row }"
>
- Notes: {{ $t('wizard.verify_domain.notes.notes') }}
- Drag a file here or
+ {{ $t('general.file_upload.drag_a_file') }}
- browse
+ {{ $t('general.file_upload.browse') }}
- to choose a file
+ {{ $t('general.file_upload.to_choose') }}
{{ recommendedText }}
diff --git a/resources/scripts/components/base/BaseInvoiceStatusLabel.vue b/resources/scripts/components/base/BaseInvoiceStatusLabel.vue
new file mode 100644
index 00000000..aa711e8d
--- /dev/null
+++ b/resources/scripts/components/base/BaseInvoiceStatusLabel.vue
@@ -0,0 +1,43 @@
+
+ {{ labelStatus }}
+
+
+
diff --git a/resources/scripts/components/base/BaseRecurringInvoiceStatusLabel.vue b/resources/scripts/components/base/BaseRecurringInvoiceStatusLabel.vue
new file mode 100644
index 00000000..f461f227
--- /dev/null
+++ b/resources/scripts/components/base/BaseRecurringInvoiceStatusLabel.vue
@@ -0,0 +1,31 @@
+
+ {{ labelStatus }}
+
+
+
diff --git a/resources/scripts/components/base/base-table/BaseTable.vue b/resources/scripts/components/base/base-table/BaseTable.vue
index 67320d12..4dd2a1da 100644
--- a/resources/scripts/components/base/base-table/BaseTable.vue
+++ b/resources/scripts/components/base/base-table/BaseTable.vue
@@ -128,7 +128,7 @@
class="w-6 h-6 text-gray-400"
/>
- {{ noResultsMessage }}
+ {{ $t('general.no_data_found') }}
- Showing
+ {{ $t('general.pagination.showing') }}
{{ ' ' }}
{{ ' ' }}
- to
+ {{ $t('general.pagination.to') }}
{{ ' ' }}
{{ ' ' }}
- of
+ {{ $t('general.pagination.of') }}
{{ ' ' }}
{{ pagination.totalCount }}
{{ ' ' }}
- results
+ {{ $t('general.pagination.results') }}
diff --git a/resources/scripts/admin/views/installation/Step8CompanyPreferences.vue b/resources/scripts/admin/views/installation/Step8CompanyPreferences.vue
index d372e367..0066bc19 100644
--- a/resources/scripts/admin/views/installation/Step8CompanyPreferences.vue
+++ b/resources/scripts/admin/views/installation/Step8CompanyPreferences.vue
@@ -115,7 +115,7 @@
- Parameter
+ {{ $t('settings.customization.Parameter') }}
- Remove
+ {{ $t('general.remove') }}
+@lang('mail_thanks'),
{{ config('app.name') }}
@endcomponent
diff --git a/resources/views/emails/viewed/invoice.blade.php b/resources/views/emails/viewed/invoice.blade.php
index 9a28139b..02554fc3 100644
--- a/resources/views/emails/viewed/invoice.blade.php
+++ b/resources/views/emails/viewed/invoice.blade.php
@@ -1,10 +1,9 @@
@component('mail::message')
-{{ $data['user']['name'] }} viewed this Invoice.
+@lang('mail_viewed_invoice', ['name' => $data['user']['name']])
-@component('mail::button', ['url' => url('/admin/invoices/'.$data['invoice']['id'].'/view')])
-View Invoice
+@component('mail::button', ['url' => url('/admin/invoices/'.$data['invoice']['id'].'/view')])@lang('mail_view_invoice')
@endcomponent
-Thanks,
+@lang('mail_thanks'),
{{ config('app.name') }}
@endcomponent
diff --git a/routes/api.php b/routes/api.php
index 13d5caa3..19c9b4a8 100644
--- a/routes/api.php
+++ b/routes/api.php
@@ -164,6 +164,10 @@ Route::prefix('/v1')->group(function () {
Route::post('/wizard-step', [OnboardingWizardController::class, 'updateStep']);
+ Route::post('/wizard-language', [OnboardingWizardController::class, 'saveLanguage']);
+
+ Route::get('/languages', [LanguagesController::class, 'languages']);
+
Route::get('/requirements', [RequirementsController::class, 'requirements']);
Route::get('/permissions', [FilePermissionsController::class, 'permissions']);