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 }} @@ -122,7 +122,11 @@ const route = useRoute() const { t } = useI18n() let isSaving = ref(false) -const types = reactive(['Invoice', 'Estimate', 'Payment']) +const types = reactive([ + {label: t('settings.customization.notes.types.invoice'), value: 'Invoice'}, + {label: t('settings.customization.notes.types.estimate'), value: 'Estimate'}, + {label: t('settings.customization.notes.types.payment'), value: 'Payment'} +]) let fields = ref(['customer', 'customerCustom']) const modalActive = computed(() => { @@ -164,7 +168,7 @@ watch( onMounted(() => { if (route.name === 'estimates.create') { noteStore.currentNote.type = 'Estimate' - } else if (route.name === 'invoices.create') { + } else if (route.name === 'invoices.create' || route.name === 'recurring-invoices.create') { noteStore.currentNote.type = 'Invoice' } else { noteStore.currentNote.type = 'Payment' diff --git a/resources/scripts/admin/components/modal-components/SendEstimateModal.vue b/resources/scripts/admin/components/modal-components/SendEstimateModal.vue index 795cdfeb..bbdecd82 100644 --- a/resources/scripts/admin/components/modal-components/SendEstimateModal.vue +++ b/resources/scripts/admin/components/modal-components/SendEstimateModal.vue @@ -96,7 +96,7 @@ @click="cancelPreview" > - Edit + {{ $t('general.edit') }} Yes - No + {{ $t('general.yes') }} + {{ $t('general.no') }}

{{ 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 }" > - + diff --git a/resources/scripts/admin/views/estimates/Index.vue b/resources/scripts/admin/views/estimates/Index.vue index 90c729aa..7ab9ca83 100644 --- a/resources/scripts/admin/views/estimates/Index.vue +++ b/resources/scripts/admin/views/estimates/Index.vue @@ -216,7 +216,7 @@ @@ -249,6 +249,7 @@ import abilities from '@/scripts/admin/stub/abilities' import ObservatoryIcon from '@/scripts/components/icons/empty/ObservatoryIcon.vue' import EstimateDropDown from '@/scripts/admin/components/dropdowns/EstimateIndexDropdown.vue' import SendEstimateModal from '@/scripts/admin/components/modal-components/SendEstimateModal.vue' +import BaseEstimateStatusLabel from "@/scripts/components/base/BaseEstimateStatusLabel.vue"; const estimateStore = useEstimateStore() const dialogStore = useDialogStore() @@ -258,12 +259,12 @@ const tableComponent = ref(null) const { t } = useI18n() const showFilters = ref(false) const status = ref([ - 'DRAFT', - 'SENT', - 'VIEWED', - 'EXPIRED', - 'ACCEPTED', - 'REJECTED', + {label: t('estimates.draft'), value: 'DRAFT'}, + {label: t('estimates.sent'), value: 'SENT'}, + {label: t('estimates.viewed'), value: 'VIEWED'}, + {label: t('estimates.expired'), value: 'EXPIRED'}, + {label: t('estimates.accepted'), value: 'ACCEPTED'}, + {label: t('estimates.rejected'), value: 'REJECTED'}, ]) const isRequestOngoing = ref(true) diff --git a/resources/scripts/admin/views/estimates/View.vue b/resources/scripts/admin/views/estimates/View.vue index a4d0f799..74def49d 100644 --- a/resources/scripts/admin/views/estimates/View.vue +++ b/resources/scripts/admin/views/estimates/View.vue @@ -212,7 +212,7 @@ :status="estimate.status" class="px-1 text-xs" > - {{ estimate.status }} + diff --git a/resources/scripts/admin/views/expenses/Index.vue b/resources/scripts/admin/views/expenses/Index.vue index 364844de..8bd61972 100644 --- a/resources/scripts/admin/views/expenses/Index.vue +++ b/resources/scripts/admin/views/expenses/Index.vue @@ -278,19 +278,19 @@ const expenseColumns = computed(() => { }, { key: 'expense_date', - label: 'Date', + label: t('expenses.date'), thClass: 'extra', tdClass: 'font-medium text-gray-900', }, { key: 'name', - label: 'Category', + label: t('expenses.category'), thClass: 'extra', tdClass: 'cursor-pointer font-medium text-primary-500', }, - { key: 'user_name', label: 'Customer' }, - { key: 'notes', label: 'Note' }, - { key: 'amount', label: 'Amount' }, + { key: 'user_name', label: t('expenses.customer') }, + { key: 'notes', label: t('expenses.note') }, + { key: 'amount', label: t('expenses.amount') }, { key: 'actions', sortable: false, diff --git a/resources/scripts/admin/views/installation/Installation.vue b/resources/scripts/admin/views/installation/Installation.vue index 7a776bfb..af539165 100644 --- a/resources/scripts/admin/views/installation/Installation.vue +++ b/resources/scripts/admin/views/installation/Installation.vue @@ -9,7 +9,7 @@ /> @@ -20,6 +20,7 @@ + + diff --git a/resources/scripts/admin/views/installation/Step3DatabaseConfig.vue b/resources/scripts/admin/views/installation/Step3DatabaseConfig.vue index e4b938b6..b2a86821 100644 --- a/resources/scripts/admin/views/installation/Step3DatabaseConfig.vue +++ b/resources/scripts/admin/views/installation/Step3DatabaseConfig.vue @@ -36,11 +36,13 @@ export default { const database_connection = ref('mysql') const isSaving = ref(false) const { t } = useI18n() + const { global } = window.i18n const notificationStore = useNotificationStore() const installationStore = useInstallationStore() const databaseData = computed(() => { + installationStore.currentDataBaseData.app_locale = global.locale.value return installationStore.currentDataBaseData }) @@ -75,6 +77,12 @@ export default { emit('next', 3) + let language = { + profile_language: global.locale.value, + } + await installationStore.addInstallationLanguage(language) + + notificationStore.showNotification({ type: 'success', message: t('wizard.success.' + res.data.success), diff --git a/resources/scripts/admin/views/installation/Step4VerifyDomain.vue b/resources/scripts/admin/views/installation/Step4VerifyDomain.vue index fd7084da..ec48d085 100644 --- a/resources/scripts/admin/views/installation/Step4VerifyDomain.vue +++ b/resources/scripts/admin/views/installation/Step4VerifyDomain.vue @@ -18,17 +18,15 @@ -

Notes:

+

{{ $t('wizard.verify_domain.notes.notes') }}

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 @@ { + return globalStore.fiscalYears.map((item) => { + return Object.assign({}, item, { + key: t(item.key), + }) + }) +}) + const options = reactive([ { title: tm('settings.customization.invoices.allow'), diff --git a/resources/scripts/admin/views/invoices/Index.vue b/resources/scripts/admin/views/invoices/Index.vue index 5a5e28f9..dfa8d9de 100644 --- a/resources/scripts/admin/views/invoices/Index.vue +++ b/resources/scripts/admin/views/invoices/Index.vue @@ -225,7 +225,7 @@ @@ -249,7 +249,7 @@ :status="row.data.paid_status" class="px-1 py-0.5 ml-2" > - {{ row.data.paid_status }} + @@ -277,6 +277,7 @@ import { debouncedWatch } from '@vueuse/core' import MoonwalkerIcon from '@/scripts/components/icons/empty/MoonwalkerIcon.vue' import InvoiceDropdown from '@/scripts/admin/components/dropdowns/InvoiceIndexDropdown.vue' import SendInvoiceModal from '@/scripts/admin/components/modal-components/SendInvoiceModal.vue' +import BaseInvoiceStatusLabel from "@/scripts/components/base/BaseInvoiceStatusLabel.vue"; // Stores const invoiceStore = useInvoiceStore() const dialogStore = useDialogStore() @@ -291,12 +292,21 @@ const showFilters = ref(false) const status = ref([ { - label: 'Status', - options: ['DRAFT', 'DUE', 'SENT', 'VIEWED', 'COMPLETED'], + label: t('invoices.status'), + options: [ + {label: t('general.draft'), value: 'DRAFT'}, + {label: t('general.due'), value: 'DUE'}, + {label: t('general.sent'), value: 'SENT'}, + {label: t('invoices.viewed'), value: 'VIEWED'}, + {label: t('invoices.completed'), value: 'COMPLETED'} + ], }, { - label: 'Paid Status', - options: ['UNPAID', 'PAID', 'PARTIALLY_PAID'], + label: t('invoices.paid_status'), + options: [ + {label: t('invoices.unpaid'), value: 'UNPAID'}, + {label: t('invoices.paid'), value: 'PAID'}, + {label: t('invoices.partially_paid'), value: 'PARTIALLY_PAID'}], }, , ]) diff --git a/resources/scripts/admin/views/invoices/View.vue b/resources/scripts/admin/views/invoices/View.vue index 6e282934..891e3d6f 100644 --- a/resources/scripts/admin/views/invoices/View.vue +++ b/resources/scripts/admin/views/invoices/View.vue @@ -454,7 +454,7 @@ onSearched = debounce(onSearched, 500) :status="invoice.status" class="px-1 text-xs" > - {{ invoice.status }} + diff --git a/resources/scripts/admin/views/modules/Index.vue b/resources/scripts/admin/views/modules/Index.vue index 1b587686..b7552913 100644 --- a/resources/scripts/admin/views/modules/Index.vue +++ b/resources/scripts/admin/views/modules/Index.vue @@ -101,7 +101,7 @@ target="_blank" > - Sign up & Get Token + {{ $t('modules.sign_up_and_get_token') }} diff --git a/resources/scripts/admin/views/payments/Create.vue b/resources/scripts/admin/views/payments/Create.vue index 27ab0422..5716203e 100644 --- a/resources/scripts/admin/views/payments/Create.vue +++ b/resources/scripts/admin/views/payments/Create.vue @@ -99,7 +99,7 @@ :label="$t('payments.invoice')" :help-text=" selectedInvoice - ? `Due Amount: ${ + ? `${t('payments.amount_due')}: ${ paymentStore.currentPayment.maxPayableAmount / 100 }` : '' diff --git a/resources/scripts/admin/views/payments/Index.vue b/resources/scripts/admin/views/payments/Index.vue index d7ea568e..9c62f2ce 100644 --- a/resources/scripts/admin/views/payments/Index.vue +++ b/resources/scripts/admin/views/payments/Index.vue @@ -251,7 +251,7 @@ const paymentColumns = computed(() => { { key: 'payment_number', label: t('payments.payment_number') }, { key: 'name', label: t('payments.customer') }, { key: 'payment_mode', label: t('payments.payment_mode') }, - { key: 'invoice_number', label: t('invoices.invoice_number') }, + { key: 'invoice_number', label: t('payments.invoice') }, { key: 'amount', label: t('payments.amount') }, { key: 'actions', diff --git a/resources/scripts/admin/views/recurring-invoices/Index.vue b/resources/scripts/admin/views/recurring-invoices/Index.vue index 322bd0b4..0e8420f9 100644 --- a/resources/scripts/admin/views/recurring-invoices/Index.vue +++ b/resources/scripts/admin/views/recurring-invoices/Index.vue @@ -230,7 +230,7 @@ :status="row.data.status" class="px-3 py-1" > - {{ row.data.status }} + @@ -276,7 +276,11 @@ const userStore = useUserStore() const table = ref(null) const { t } = useI18n() const showFilters = ref(false) -const statusList = ref(['ACTIVE', 'ON_HOLD', 'ALL']) +const statusList = ref([ + {label: t('recurring_invoices.active'), value: 'ACTIVE'}, + {label: t('recurring_invoices.on_hold'), value: 'ON_HOLD'}, + {label: t('recurring_invoices.all'), value: 'ALL'} +]) const isRequestOngoing = ref(true) const activeTab = ref('recurring-invoices.all') const router = useRouter() diff --git a/resources/scripts/admin/views/recurring-invoices/create/RecurringInvoiceCreateBasicFields.vue b/resources/scripts/admin/views/recurring-invoices/create/RecurringInvoiceCreateBasicFields.vue index d0eb6a81..d21c556d 100644 --- a/resources/scripts/admin/views/recurring-invoices/create/RecurringInvoiceCreateBasicFields.vue +++ b/resources/scripts/admin/views/recurring-invoices/create/RecurringInvoiceCreateBasicFields.vue @@ -129,7 +129,7 @@ :invalid="v.status.$error" :placeholder="$t('recurring_invoices.select_a_status')" value-prop="value" - label="value" + label="key" /> @@ -186,6 +186,7 @@ import { useDebounceFn } from '@vueuse/core' import { useRecurringInvoiceStore } from '@/scripts/admin/stores/recurring-invoice' import { computed, onMounted, reactive, ref, watch } from 'vue' import { useRoute } from 'vue-router' +import { useI18n } from 'vue-i18n' import ExchangeRateConverter from '@/scripts/admin/components/estimate-invoice-common/ExchangeRateConverter.vue' @@ -207,13 +208,14 @@ const props = defineProps({ const route = useRoute() const recurringInvoiceStore = useRecurringInvoiceStore() const globalStore = useGlobalStore() +const { t } = useI18n() const isLoadingNextDate = ref(false) const limits = reactive([ - { label: 'None', value: 'NONE' }, - { label: 'Date', value: 'DATE' }, - { label: 'Count', value: 'COUNT' }, + { label: t('recurring_invoices.limit.none'), value: 'NONE' }, + { label: t('recurring_invoices.limit.date'), value: 'DATE' }, + { label: t('recurring_invoices.limit.count'), value: 'COUNT' }, ]) const isCustomFrequency = computed(() => { @@ -226,9 +228,17 @@ const isCustomFrequency = computed(() => { const getStatusOptions = computed(() => { if (props.isEdit) { - return globalStore.config.recurring_invoice_status.update_status + return globalStore.config.recurring_invoice_status.update_status.map((item) => { + return Object.assign({}, item, { + key: t(item.key), + }) + }) } - return globalStore.config.recurring_invoice_status.create_status + return globalStore.config.recurring_invoice_status.create_status.map((item) => { + return Object.assign({}, item, { + key: t(item.key), + }) + }) }) watch( diff --git a/resources/scripts/admin/views/recurring-invoices/partials/Invoices.vue b/resources/scripts/admin/views/recurring-invoices/partials/Invoices.vue index fb2b7bdc..fa997aa3 100644 --- a/resources/scripts/admin/views/recurring-invoices/partials/Invoices.vue +++ b/resources/scripts/admin/views/recurring-invoices/partials/Invoices.vue @@ -27,10 +27,15 @@ /> + + + diff --git a/resources/scripts/admin/views/recurring-invoices/partials/RecurringInvoiceViewSidebar.vue b/resources/scripts/admin/views/recurring-invoices/partials/RecurringInvoiceViewSidebar.vue index 42445324..8e37b5f1 100644 --- a/resources/scripts/admin/views/recurring-invoices/partials/RecurringInvoiceViewSidebar.vue +++ b/resources/scripts/admin/views/recurring-invoices/partials/RecurringInvoiceViewSidebar.vue @@ -293,7 +293,7 @@ onSearched = debounce(onSearched, 500) :status="invoice.status" class="px-1 text-xs" > - {{ invoice.status }} + diff --git a/resources/scripts/admin/views/reports/SalesReports.vue b/resources/scripts/admin/views/reports/SalesReports.vue index d73c78a4..4fed5772 100644 --- a/resources/scripts/admin/views/reports/SalesReports.vue +++ b/resources/scripts/admin/views/reports/SalesReports.vue @@ -156,7 +156,16 @@ const dateRange = reactive([ ]) const selectedRange = ref(dateRange[2]) -const reportTypes = ref(['By Customer', 'By Item']) +const reportTypes = ref([ + { + label: t('reports.sales.sort.by_customer'), + value: 'By Customer' + }, + { + label: t('reports.sales.sort.by_item'), + value: 'By Item' + } +]) const selectedType = ref('By Customer') let range = ref(new Date()) let url = ref(null) diff --git a/resources/scripts/admin/views/settings/CustomFieldsSetting.vue b/resources/scripts/admin/views/settings/CustomFieldsSetting.vue index 1cad62b0..016d37f9 100644 --- a/resources/scripts/admin/views/settings/CustomFieldsSetting.vue +++ b/resources/scripts/admin/views/settings/CustomFieldsSetting.vue @@ -30,6 +30,10 @@ ({{ row.data.slug }}) + + diff --git a/resources/scripts/admin/views/settings/NotesSetting.vue b/resources/scripts/admin/views/settings/NotesSetting.vue index c6026cdc..320e3d5b 100644 --- a/resources/scripts/admin/views/settings/NotesSetting.vue +++ b/resources/scripts/admin/views/settings/NotesSetting.vue @@ -31,6 +31,9 @@ :load-data="refreshTable" /> + @@ -113,4 +116,17 @@ async function openNoteSelectModal() { async function refreshTable() { table.value && table.value.refresh() } + +function getLabelNote(type) { + switch (type) { + case 'Estimate': + return t('settings.customization.notes.types.estimate') + case 'Invoice': + return t('settings.customization.notes.types.invoice') + case 'Payment': + return t('settings.customization.notes.types.payment') + default: + return type + } +} diff --git a/resources/scripts/admin/views/settings/PreferencesSetting.vue b/resources/scripts/admin/views/settings/PreferencesSetting.vue index 3c7c9ebb..717d81cc 100644 --- a/resources/scripts/admin/views/settings/PreferencesSetting.vue +++ b/resources/scripts/admin/views/settings/PreferencesSetting.vue @@ -95,7 +95,7 @@ { }) }) +const fiscalYearsList = computed(() => { + return globalStore.config.fiscal_years.map((item) => { + return Object.assign({}, item, { + key: t(item.key), + }) + }) +}) + watch( () => settingsForm.carbon_date_format, (val) => { diff --git a/resources/scripts/admin/views/settings/customization/NumberCustomizer.vue b/resources/scripts/admin/views/settings/customization/NumberCustomizer.vue index 7cab418a..5d74f306 100644 --- a/resources/scripts/admin/views/settings/customization/NumberCustomizer.vue +++ b/resources/scripts/admin/views/settings/customization/NumberCustomizer.vue @@ -43,7 +43,7 @@ border-t border-b border-gray-200 border-solid " > - Component + {{ $t('settings.customization.component') }} - Parameter + {{ $t('settings.customization.Parameter') }} - Remove + {{ $t('general.remove') }} @@ -160,7 +160,13 @@ const route = useRoute() const table = ref(null) let isFetchingInitialData = ref(true) let showFilters = ref(false) -const status = ref(['DRAFT', 'DUE', 'SENT', 'VIEWED', 'COMPLETED']) +const status = ref([ + {label: t('general.draft'), value: 'DRAFT'}, + {label: t('general.due'), value: 'DUE'}, + {label: t('general.sent'), value: 'SENT'}, + {label: t('invoices.viewed'), value: 'VIEWED'}, + {label: t('invoices.completed'), value: 'COMPLETED'} +]) const filters = reactive({ status: '', from_date: '', @@ -247,7 +253,7 @@ function toggleFilter() { async function fetchData({ page, sort }) { let data = { - status: filters.status, + status: filters.status.value, invoice_number: filters.invoice_number, from_date: filters.from_date, to_date: filters.to_date, diff --git a/resources/scripts/customer/views/invoices/View.vue b/resources/scripts/customer/views/invoices/View.vue index 28442aea..f8161127 100644 --- a/resources/scripts/customer/views/invoices/View.vue +++ b/resources/scripts/customer/views/invoices/View.vue @@ -175,7 +175,7 @@ {{ invoice.invoice_number }} - {{ invoice.status }} + diff --git a/resources/views/emails/send/estimate.blade.php b/resources/views/emails/send/estimate.blade.php index 8e82bdc3..d066a250 100644 --- a/resources/views/emails/send/estimate.blade.php +++ b/resources/views/emails/send/estimate.blade.php @@ -19,7 +19,7 @@ {!! $data['body'] !!} @if(!$data['attach']['data']) @component('mail::button', ['url' => $data['url']]) - View Estimate + @lang('mail_view_estimate') @endcomponent @endif @endcomponent diff --git a/resources/views/emails/send/invoice.blade.php b/resources/views/emails/send/invoice.blade.php index 53e2dce2..c1a3a7e5 100644 --- a/resources/views/emails/send/invoice.blade.php +++ b/resources/views/emails/send/invoice.blade.php @@ -19,7 +19,7 @@ {!! $data['body'] !!} @if(!$data['attach']['data']) @component('mail::button', ['url' => $data['url']]) - View Invoice + @lang('mail_view_invoice') @endcomponent @endif @endcomponent diff --git a/resources/views/emails/send/payment.blade.php b/resources/views/emails/send/payment.blade.php index 4670542d..1e411a17 100644 --- a/resources/views/emails/send/payment.blade.php +++ b/resources/views/emails/send/payment.blade.php @@ -19,7 +19,7 @@ {!! $data['body'] !!} @if(!$data['attach']['data']) @component('mail::button', ['url' => $data['url']]) - View Payment + @lang('mail_view_payment') @endcomponent @endif @endcomponent diff --git a/resources/views/emails/viewed/estimate.blade.php b/resources/views/emails/viewed/estimate.blade.php index 5bfd6588..787872a3 100644 --- a/resources/views/emails/viewed/estimate.blade.php +++ b/resources/views/emails/viewed/estimate.blade.php @@ -1,10 +1,9 @@ @component('mail::message') -{{ $data['user']['name'] }} viewed this Estimate. +@lang('mail_viewed_estimate', ['name' => $data['user']['name']]) -@component('mail::button', ['url' => url('/admin/estimates/'.$data['estimate']['id'].'/view')]) -View Estimate +@component('mail::button', ['url' => url('/admin/estimates/'.$data['estimate']['id'].'/view')])@lang('mail_view_estimate') @endcomponent -Thanks,
+@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']);