From f3782756732c81d5b8aa1a2f9b1e08b147dacb23 Mon Sep 17 00:00:00 2001 From: elforjani13 <39470382+elforjani13@users.noreply.github.com> Date: Wed, 27 Oct 2021 18:08:11 +0200 Subject: [PATCH] feat: add lang. --- src/common/cashflowOptions.js | 12 ++--- src/components/BankAccounts/index.js | 5 +- src/config/sidebarMenu.js | 2 +- .../AccountTransactionsDetailsBar.js | 8 ++-- .../CashFlowAccounts/CashflowAccountsGrid.js | 2 +- src/lang/ar/index.json | 47 ++++++++++++++++--- src/lang/en/index.json | 24 +++++----- 7 files changed, 68 insertions(+), 32 deletions(-) diff --git a/src/common/cashflowOptions.js b/src/common/cashflowOptions.js index dd14899ab..8857e2c5a 100644 --- a/src/common/cashflowOptions.js +++ b/src/common/cashflowOptions.js @@ -2,31 +2,31 @@ import intl from 'react-intl-universal'; export const addMoneyIn = [ { - name: intl.get('cash_flow.option_owner_contribution'), + name: intl.get('cash_flow.owner_contribution'), value: 'owner_contribution', }, { - name: intl.get('cash_flow.option_other_income'), + name: intl.get('cash_flow.other_income'), type: 'OTHER_INCOME', value: 'other_income', }, { - name: intl.get('cash_flow.option_transfer_form_account'), + name: intl.get('cash_flow.transfer_form_account'), value: 'transfer_from_account', }, ]; export const addMoneyOut = [ { - name: intl.get('cash_flow.option_owner_drawings'), + name: intl.get('cash_flow.owner_drawings'), value: 'onwers_drawing', }, { - name: intl.get('cash_flow.option_expenses'), + name: intl.get('cash_flow.expenses'), value: 'other_expense', }, { - name: intl.get('cash_flow.option_transfer_to_account'), + name: intl.get('cash_flow.transfer_to_account'), value: 'transfer_to_account', }, ]; diff --git a/src/components/BankAccounts/index.js b/src/components/BankAccounts/index.js index 068456b3b..16eef2968 100644 --- a/src/components/BankAccounts/index.js +++ b/src/components/BankAccounts/index.js @@ -1,4 +1,5 @@ import React from 'react'; +import intl from 'react-intl-universal'; import styled from 'styled-components'; import { Classes } from '@blueprintjs/core'; import clsx from 'classnames'; @@ -134,7 +135,7 @@ function BankAccountBalance({ amount, loading }) { > {amount} - Balance + {intl.get('balance')} ); } @@ -187,7 +188,7 @@ export function BankAccount({ diff --git a/src/config/sidebarMenu.js b/src/config/sidebarMenu.js index abfdd544f..5d3befa3a 100644 --- a/src/config/sidebarMenu.js +++ b/src/config/sidebarMenu.js @@ -190,7 +190,7 @@ export default [ ], }, { - text: , + text: , children: [ { text: , diff --git a/src/containers/CashFlow/AccountTransactions/AccountTransactionsDetailsBar.js b/src/containers/CashFlow/AccountTransactions/AccountTransactionsDetailsBar.js index d01be1a15..93f27f8b3 100644 --- a/src/containers/CashFlow/AccountTransactions/AccountTransactionsDetailsBar.js +++ b/src/containers/CashFlow/AccountTransactions/AccountTransactionsDetailsBar.js @@ -62,7 +62,7 @@ function AccountBalanceItem() { return ( - {intl.get('cash_flow_balance_in', { name: 'Bigcapital' })} + Balance in Bigcapital {''} {currentAccount.formatted_amount} @@ -119,12 +119,10 @@ function AccountSwitchMenuItem({ {name} - 25 Transactions + {intl.get('cash_flow_transaction.switch_item', { value: '25' })} - - Updated before 2 days - + } {...restProps} diff --git a/src/containers/CashFlow/CashFlowAccounts/CashflowAccountsGrid.js b/src/containers/CashFlow/CashFlowAccounts/CashflowAccountsGrid.js index 32898d54a..d2dfb92bd 100644 --- a/src/containers/CashFlow/CashFlowAccounts/CashflowAccountsGrid.js +++ b/src/containers/CashFlow/CashFlowAccounts/CashflowAccountsGrid.js @@ -151,7 +151,7 @@ const CashflowBankAccountEnhanced = compose( )(CashflowBankAccount); function getUpdatedBeforeText(createdAt) { - return 'Updated before 2 years.'; + return '' } /** diff --git a/src/lang/ar/index.json b/src/lang/ar/index.json index a11dcf597..ea069410a 100644 --- a/src/lang/ar/index.json +++ b/src/lang/ar/index.json @@ -1393,13 +1393,48 @@ "vendors.option_without_zero_balance": "Vendors without zero-balance", "vendors.option_without_zero_balance.hint":"Include vendors and exclude that ones have zero-balance.", "vendors.option_with_transactions": "Vendors with transactions", - "vendors.option_with_transactions.hint": "Include vendors that onces have transactions on the given date period only." - - + "vendors.option_with_transactions.hint": "Include vendors that onces have transactions on the given date period only.", + "siebar.cashflow":"التدفق النقدي", + "siebar.cashflow.label_cash_and_bank_accounts": "حسابات نقدية ومصرفية ", + "cash_flow.label_account_transcations": "حساب المعاملات", + "cash_flow.label.deposit": "الإيداع", + "cash_flow.label.withdrawal": "السحب", + "cash_flow.label.running_balance": "الرصيد التحليلي", + "cash_flow.label.add_cash_account": "اضافة حساب نقدي", + "cash_flow.label.add_bank_account": "اضافة حساب مصرفي", + "cash_flow.label.add_money_in": "إيداع إلي حساب", + "cash_flow.label.add_money_out": "سحب من حساب", + "cash_flow.owner_contribution": "زيادة رأس المال", + "cash_flow.other_income": "الإيرادات الأخرى", + "cash_flow.owner_drawings": "نقصان رأس المال", + "cash_flow.expenses": "المصاريف", + "cash_flow.transfer_form_account": "تحويل من الحساب ", + "cash_flow.transfer_to_account": "تحويل إلى الحساب ", + "cash_flow_transaction.label_equity_account": "حساب الملكية", + "cash_flow_transaction.label_expense_account": " حساب المصاريف", + "cash_flow_transaction_success_message": "تم إنشاء معاملة التدفق النقدي بنجاح.", + "cash_flow_transaction.money_in": "إيداع الي حساب {value}", + "cash_flow_transaction.money_out": "سحب من حساب {value}", + "cash_flow_transaction.other_income_account": " حساب الإيرادات الأخرى ", + "cash_flow_transaction.other_expense_account": "حساب مصاريف اخري", + "save_and_publish": "احفظ وانشر", + "cash_flow_transaction.label_transfer_from_account": "تحويل من الحساب ", + "cash_flow_transaction.label_transfer_to_account": "تحويل إلى الحساب ", + "cash_flow_transaction.label_current_account": "حساب الحالي", + "cash_flow_transaction.delete.alert_message": "تم حذف معاملة التدفق النقدي بنجاح", + "cash_flow_transaction_once_delete_this_transaction_you_will_able_to_restore_it": "بمجرد حذف هذه معاملة ، لن تتمكن من استعادتها لاحقًا. هل أنت متأكد أنك تريد حذف ؟", + "cash_flow.auto_increment.auto": "يتم تعيين أرقام المعاملات على وضع الزيادة التلقائي. هل أنت متأكد من تغيير هذا الإعداد؟", + "cash_flow.auto_increment.manually": "يتم تعيين أرقام معاملاتك يدوياً. هل أنت متأكد من تغيير هذه الإعدادات؟", + "cash_flow.setting_your_auto_generated_transaction_number": "تعيين رقم المعاملة الذي تم إنشاؤه تلقائيًا", + "cash_flow_drawer.label_transaction_type": " نوع المعاملة", + "cash_flow.drawer.label_transaction_no": " رقم المعاملة", + "cash_flow.drawer.label_transaction": "معاملة التدفق النقدي {number}", + "cash_flow_there_is_deposit_withdrawal_transactions_on_the_current_account": "لا توجد معاملات إيداع / سحب على الحساب الحالي. ", + "cash_flow_there_is_no_cashflow_accounts_with_current_filter_criteria:":"لا توجد حسابات تدفق نقدي بمعايير التصفية الحالية. ", + "cash_flow_money_in":"إيداع مال الي حساب", + "cash_flow_money_out":"سحب مال من حساب", + "cash_flow_transaction.switch_item":" {value} من معاملات " } - - - diff --git a/src/lang/en/index.json b/src/lang/en/index.json index 8f6308111..e4eff711c 100644 --- a/src/lang/en/index.json +++ b/src/lang/en/index.json @@ -1365,6 +1365,7 @@ "vendors.option_with_transactions": "Vendors with transactions", "vendors.option_with_transactions.hint": "Include vendors that onces have transactions on the given date period only.", "landed_cost.action.delete.success_message": "The landed cost has been deleted successfully.", + "siebar.cashflow":"Cash flow", "siebar.cashflow.label_cash_and_bank_accounts": "Cash & Bank Accounts", "cash_flow.label_account_transcations": "Account Transcations", "cash_flow.label.deposit": "Deposit", @@ -1374,16 +1375,15 @@ "cash_flow.label.add_bank_account": "Add Bank account", "cash_flow.label.add_money_in": "Add Money In", "cash_flow.label.add_money_out": "Add Money Out", - "cash_flow.option_owner_contribution": "Owner contribution", - "cash_flow.option_other_income": "Other income", - "cash_flow.option_owner_drawings": "Owner drawings", - "cash_flow.option_expenses": "Expenes", - "cash_flow.option_vendor_payment": "Vendor payment", - "cash_flow.option_transfer_form_account": "Transfer from account", - "cash_flow.option_transfer_to_account": "Transfer to account", + "cash_flow.owner_contribution": "Owner contribution", + "cash_flow.other_income": "Other income", + "cash_flow.owner_drawings": "Owner drawings", + "cash_flow.expenses": "Expenses", + "cash_flow.transfer_form_account": "Transfer from account", + "cash_flow.transfer_to_account": "Transfer to account", "cash_flow_transaction.label_equity_account": "Equity account", "cash_flow_transaction.label_expense_account": "Expense account", - "cash_flow_transaction_success_message": " The cashflow transaction has been created successfully.", + "cash_flow_transaction_success_message": "The cashflow transaction has been created successfully.", "cash_flow_transaction.money_in": "Money In {value}", "cash_flow_transaction.money_out": "Money Out {value}", "cash_flow_transaction.other_income_account": "Other income account", @@ -1400,10 +1400,12 @@ "cash_flow_drawer.label_transaction_type": "Transaction type", "cash_flow.drawer.label_transaction_no": "Transaction number", "cash_flow.drawer.label_transaction": "Cash flow Transaction {number}", - "cash_flow_there_is_deposit_withdrawal_transactions_on_the_current_account": "There is deposit/withdrawal transactions on the current account.", + "cash_flow_there_is_deposit_withdrawal_transactions_on_the_current_account": "There are no deposit/withdrawal transactions on the current account.", "cash_flow_balance_in":"Balance in {name}", - "cash_flow_there_is_no_cashflow_accounts_with_current_filter_criteria:":"There is no cashflow accounts with current filter criteria.", + "cash_flow_there_is_no_cashflow_accounts_with_current_filter_criteria:":"There are no cashflow accounts with current filter criteria.", "cash_flow_money_in":"Money In", - "cash_flow_money_out":"Money Out" + "cash_flow_money_out":"Money Out", + "cash_flow_transaction.switch_item":"Transactions {value}" + } \ No newline at end of file