From 1a023d75264170bfbf4dcf0fe5dff2f3644536b6 Mon Sep 17 00:00:00 2001 From: elforjani3 Date: Tue, 8 Jun 2021 14:34:35 +0200 Subject: [PATCH] feat(lang): contact & keyboardshortcuts options. --- client/src/common/contactsOptions.js | 7 ++- client/src/common/keyboardShortcutsOptions.js | 53 ++++++++++--------- client/src/lang/en/index.json | 27 +++++++++- 3 files changed, 59 insertions(+), 28 deletions(-) diff --git a/client/src/common/contactsOptions.js b/client/src/common/contactsOptions.js index 0cbe1a5ed..42e86361f 100644 --- a/client/src/common/contactsOptions.js +++ b/client/src/common/contactsOptions.js @@ -1,4 +1,7 @@ +import React from 'react'; +import { formatMessage } from 'services/intl'; + export default [ - { name: 'Customer', path: 'customers' }, - { name: 'Vendor', path: 'vendors' }, + { name: formatMessage({ id: 'customer' }), path: 'customers' }, + { name: formatMessage({ id: 'vendor' }), path: 'vendors' }, ]; diff --git a/client/src/common/keyboardShortcutsOptions.js b/client/src/common/keyboardShortcutsOptions.js index 8bd1efd33..aabf28d7c 100644 --- a/client/src/common/keyboardShortcutsOptions.js +++ b/client/src/common/keyboardShortcutsOptions.js @@ -1,102 +1,105 @@ +import React from 'react'; +import { formatMessage } from 'services/intl'; + export default [ { shortcut_key: 'Shift + I', - description: 'Jump to the invoices.', + description: formatMessage({ id: 'jump_to_the_invoices' }), }, { shortcut_key: 'Shift + E', - description: 'Jump to the estimates.', + description: formatMessage({ id: 'jump_to_the_estimates' }), }, { shortcut_key: 'Shift + R', - description: 'Jump to the receipts.', + description: formatMessage({ id: 'jump_to_the_receipts' }), }, { shortcut_key: 'Shift + X', - description: 'Jump to the expenses.', + description: formatMessage({ id: 'jump_to_the_expenses' }), }, { shortcut_key: 'Shift + C', - description: 'Jump to the customers.', + description: formatMessage({ id: 'jump_to_the_customers' }), }, { shortcut_key: 'Shift + V', - description: 'Jump to the vendors.', + description: formatMessage({ id: 'jump_to_the_vendors' }), }, { shortcut_key: 'Shift + A', - description: 'Jump to the Chart of Accounts.', + description: formatMessage({ id: 'jump_to_the_chart_of_accounts' }), }, { shortcut_key: 'Shift + B', - description: 'Jump to the bills.', + description: formatMessage({ id: 'jump_to_the_bills' }), }, { shortcut_key: 'Shift + M', - description: 'Jump to the Manual Journals.', + description: formatMessage({ id: 'jump_to_the_manual_journals' }), }, { shortcut_key: 'Shift + W', - description: 'Jump to the items.', + description: formatMessage({ id: 'jump_to_the_items' }), }, { shortcut_key: 'Shift + 1', - description: 'Jump to the Balance Sheet.', + description: formatMessage({ id: 'jump_to_the_balance_sheet' }), }, { shortcut_key: 'Shift + 2', - description: 'Jump to the Profit Loss Sheet.', + description: formatMessage({ id: 'jump_to_the_profit_loss_sheet' }), }, { shortcut_key: 'Shift + 3', - description: 'Jump to the Journal Sheet.', + description: formatMessage({ id: 'jump_to_the_journal_sheet' }), }, { shortcut_key: 'Shift + 4', - description: 'Jump to the General Ledger Sheet.', + description: formatMessage({ id: 'jump_to_the_general_ledger_sheet' }), }, { shortcut_key: 'Shift + 5', - description: 'Jump to the Trial Balance Sheet.', + description: formatMessage({ id: 'jump_to_the_trial_balance_sheet' }), }, { shortcut_key: 'Ctrl + Shift + I ', - description: 'Create a new invoice .', + description: formatMessage({ id: 'create_a_new_invoice' }), }, { shortcut_key: 'Ctrl + Shift + E ', - description: 'Create a new estimate .', + description: formatMessage({ id: 'create_a_new_estimate' }), }, { shortcut_key: 'Ctrl + Shift + R ', - description: 'Create a new receipt .', + description: formatMessage({ id: 'create_a_new_receipt' }), }, { shortcut_key: 'Ctrl + Shift + X ', - description: 'Create a new expense.', + description: formatMessage({ id: 'create_a_new_expense' }), }, { shortcut_key: 'Ctrl + Shift + C ', - description: 'Create a new customer.', + description: formatMessage({ id: 'create_a_new_customer' }), }, { shortcut_key: 'Ctrl + Shift + V ', - description: 'Create a new vendor.', + description: formatMessage({ id: 'create_a_new_vendor' }), }, { shortcut_key: 'Ctrl + Shift + B ', - description: 'Create a new bill.', + description: formatMessage({ id: 'create_a_new_bill' }), }, { shortcut_key: 'Ctrl + Shift + M ', - description: 'Create a new Make Journal.', + description: formatMessage({ id: 'create_a_new_make_journal' }), }, { shortcut_key: 'Ctrl + Shift + W ', - description: 'Create a new item.', + description: formatMessage({ id: 'create_a_new_item' }), }, { shortcut_key: 'Ctrl + / ', - description: 'Close and open sidebar .', + description: formatMessage({ id: 'close_and_open_sidebar' }), }, ]; diff --git a/client/src/lang/en/index.json b/client/src/lang/en/index.json index 8180afcdb..cf99bf452 100644 --- a/client/src/lang/en/index.json +++ b/client/src/lang/en/index.json @@ -1005,5 +1005,30 @@ "sale_invoice": "Sale invoice", "purchase_invoice": "Purchase invoice", "expense": "Expense", - "vendor": "Vendor" + "vendor": "Vendor", + "jump_to_the_invoices": "Jump to the invoices.", + "jump_to_the_estimates": "Jump to the estimates.", + "jump_to_the_receipts": "Jump to the receipts.", + "jump_to_the_expenses": "Jump to the expenses.", + "jump_to_the_customers": "Jump to the customers", + "jump_to_the_vendors": "Jump to the vendors.", + "jump_to_the_chart_of_accounts": "Jump to the Chart of Accounts.", + "jump_to_the_bills": "Jump to the bills.", + "jump_to_the_manual_journals": "Jump to the Manual Journals.", + "jump_to_the_items": "Jump to the items.", + "jump_to_the_balance_sheet": "Jump to the Balance Sheet.", + "jump_to_the_profit_loss_sheet": "Jump to the Profit Loss Sheet.", + "jump_to_the_journal_sheet": "Jump to the Journal Sheet.", + "jump_to_the_general_ledger_sheet": "Jump to the General Ledger Sheet.", + "jump_to_the_trial_balance_sheet": "Jump to the Trial Balance Sheet.", + "create_a_new_invoice": "Create a new invoice.", + "create_a_new_estimate": "Create a new estimate.", + "create_a_new_receipt": "Create a new receipt.", + "create_a_new_expense": "Create a new expense.", + "create_a_new_customer": "create_a_new_customer", + "create_a_new_vendor": "Create a new vendor.", + "create_a_new_bill": "Create a new bill.", + "create_a_new_make_journal": "Create a new Make Journal.", + "create_a_new_item": "Create a new item.", + "close_and_open_sidebar": "Close and open sidebar." } \ No newline at end of file