mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
Merge remote-tracking branch 'origin/feature/breadcrumb/fix_localize'
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
export default {
|
||||
hello_world: 'Hello World',
|
||||
email_or_phone_number: 'Email or phone number',
|
||||
'email_or_phone_number': 'Email or phone number',
|
||||
password: 'Password',
|
||||
login: 'Login',
|
||||
invalid_email_or_phone_numner: 'Invalid email or phone number.',
|
||||
required: 'Required',
|
||||
invalid_email_or_phone_number: 'Invalid email or phone number.',
|
||||
'required': 'Required',
|
||||
reset_password: 'Reset Password',
|
||||
the_user_has_been_suspended_from_admin: 'The user has been suspended from the administrator.',
|
||||
email_and_password_entered_did_not_match:
|
||||
@@ -67,6 +67,7 @@ export default {
|
||||
edit_account: 'Edit Account',
|
||||
new_account: 'New Account',
|
||||
edit_currency: 'Edit Currency',
|
||||
delete_currency: 'Delete Currency',
|
||||
new_currency: 'New Currency',
|
||||
currency_name: 'Currency Name',
|
||||
currency_code: 'Currency Code',
|
||||
@@ -74,7 +75,6 @@ export default {
|
||||
new_exchange_rate: 'New Exchange Rate',
|
||||
delete_exchange_rate: 'Delete Exchange Rate',
|
||||
exchange_rate: 'Exchange Rate',
|
||||
currency_code: 'Currency Code',
|
||||
edit_invite: 'Edit invite',
|
||||
edit_category: 'Edit Category',
|
||||
delete_category: 'Delete Category',
|
||||
@@ -118,7 +118,7 @@ export default {
|
||||
cancel: 'Cancel',
|
||||
move_to_trash: 'Move to Trash',
|
||||
save_new: 'Save & New',
|
||||
journal_number: 'Journal number',
|
||||
journal_number: 'Journal Number',
|
||||
credit_currency: 'Credit ({currency})',
|
||||
debit_currency: 'Debit ({currency})',
|
||||
note: 'Note',
|
||||
@@ -137,6 +137,7 @@ export default {
|
||||
inactivate: 'Inactivate',
|
||||
activate: 'Activate',
|
||||
inactivate_account: 'Inactivate Account',
|
||||
activate_account:'Activate Account',
|
||||
delete_account: 'Delete Account',
|
||||
code: 'Code',
|
||||
type: 'Type',
|
||||
@@ -167,51 +168,162 @@ export default {
|
||||
new_custom_view: 'New Custom View',
|
||||
view_name: 'View Name',
|
||||
new_conditional: 'New Conditional',
|
||||
'item': 'Item',
|
||||
'account': 'Account',
|
||||
'service_has_been_successful_created': '{service} {name} has been successfully created.',
|
||||
'service_has_been_successful_edited': '{service} {name} has been successfully edited.',
|
||||
'you_are_about_permanently_delete_this_journal': `You're about to permanently delete this journal and all its transactions on accounts and attachments, and all of its data. <br /><br />If you're not sure, you can archive this journal instead.`,
|
||||
'once_delete_these_accounts_you_will_not_able_restore_them': 'Once you delete these accounts, you won\'t be able to retrieve them later. Are you sure you want to delete them?',
|
||||
'once_delete_these_service_you_will_not_able_restore_it': 'Once you delete these {service}, you won\'t be able to retrieve them later. Are you sure you want to delete this {service}?',
|
||||
'you_could_not_delete_predefined_accounts': 'You could\'t delete predefined accounts.',
|
||||
'cannot_delete_account_has_associated_transactions': 'you could\'t not delete account that has associated transactions.',
|
||||
'the_account_has_been_successfully_inactivated': 'The account has been successfully inactivated.',
|
||||
'the_account_has_been_successfully_activated': 'The account has been successfully activated.',
|
||||
'the_account_has_been_successfully_deleted': 'The account has been successfully deleted.',
|
||||
'the_accounts_has_been_successfully_deleted': 'The accounts have been successfully deleted.',
|
||||
'are_sure_to_inactive_this_account': 'Are you sure you want to inactive this account? You will be able to activate it later',
|
||||
'are_sure_to_activate_this_account': 'Are you sure you want to activate this account? You will be able to inactivate it later',
|
||||
'once_delete_this_account_you_will_able_to_restore_it': `Once you delete this account, you won\'t be able to restore it later. Are you sure you want to delete this account?<br /><br />If you're not sure, you can inactivate this account instead.`,
|
||||
'the_journal_has_been_successfully_created': 'The journal #{number} has been successfully created.',
|
||||
'the_journal_has_been_successfully_edited': 'The journal #{number} has been successfully edited.',
|
||||
'the_journal_has_been_successfully_deleted': 'The journal #{number} has been successfully deleted.',
|
||||
'the_journals_has_been_successfully_deleted': 'The journals {count} have been successfully deleted.',
|
||||
'credit': 'Credit',
|
||||
'debit': 'Debit',
|
||||
'once_delete_this_item_you_will_able_to_restore_it': `Once you delete this item, you won\'t be able to restore the item later. Are you sure you want to delete ?<br /><br />If you're not sure, you can inactivate it instead.`,
|
||||
'the_item_has_been_successfully_deleted': 'The item has been successfully deleted.',
|
||||
'the_item_category_has_been_successfully_created': 'The item category has been successfully created.',
|
||||
'the_item_category_has_been_successfully_edited': 'The item category has been successfully edited.',
|
||||
'once_delete_these_views_you_will_not_able_restore_them': 'Once you delete the custom view, you won\'t be able to restore it later. Are you sure you want to delete this view?',
|
||||
'the_custom_view_has_been_successfully_deleted': 'The custom view has been successfully deleted.',
|
||||
'teammate_invited_to_organization_account': 'Your teammate has been invited to the organization account.',
|
||||
'select_account_type': 'Select account type',
|
||||
'the_item_category_has_been_successfully_deleted': 'The item category has been successfully deleted.',
|
||||
'once_delete_this_item_category_you_will_able_to_restore_it': 'Once you delete this item category, you won\'t be able to restore the item later. Are you sure you want to delete?',
|
||||
'once_delete_this_journal_category_you_will_able_to_restore_it': 'Once you delete this journal, you won\'t be able to restore the item later. Are you sure you want to delete?',
|
||||
'all': 'All',
|
||||
'once_delete_these_journalss_you_will_not_able_restore_them': 'Once you delete these journals, you won\'t be able to retrieve them later. Are you sure you want to delete them?',
|
||||
'journal_number_is_already_used': 'Journal number is already used.',
|
||||
|
||||
the_item_categories_has_been_successfully_deleted:'The item categories has been successfully deleted',
|
||||
once_delete_these_item_categories_you_will_not_able_restore_them:'Once you delete these item categories, you won\'t be able to retrieve them later. Are you sure you want to delete them?',
|
||||
once_delete_this_exchange_rate_you_will_able_to_restore_it: `Once you delete this exchange rate, you won\'t be able to restore it later. Are you sure you want to delete?`,
|
||||
once_delete_these_exchange_rates_you_will_not_able_restore_them:'Once you delete these item categories, you won\'t be able to retrieve them later. Are you sure you want to delete them?',
|
||||
the_accounts_has_been_successfully_activated:'The Accounts has been Successfully activated',
|
||||
are_sure_to_activate_this_accounts: 'Are you sure you want to activate this accounts? You will be able to inactivate it later',
|
||||
are_sure_to_inactive_this_accounts: 'Are you sure you want to inactive this accounts? You will be able to activate it later',
|
||||
the_accounts_has_been_successfully_inactivated: 'The accounts has been successfully inactivated.',
|
||||
|
||||
item: 'Item',
|
||||
service_has_been_successful_created: '{service} {name} has been successfully created.',
|
||||
service_has_been_successful_edited: '{service} {name} has been successfully edited.',
|
||||
you_are_about_permanently_delete_this_journal: `You're about to permanently delete this journal and all its transactions on accounts and attachments, and all of its data. <br /><br />If you're not sure, you can archive this journal instead.`,
|
||||
once_delete_these_accounts_you_will_not_able_restore_them: 'Once you delete these accounts, you won\'t be able to retrieve them later. Are you sure you want to delete them?',
|
||||
once_delete_these_service_you_will_not_able_restore_it: 'Once you delete these {service}, you won\'t be able to retrieve them later. Are you sure you want to delete this {service}?',
|
||||
you_could_not_delete_predefined_accounts: 'You could\'t delete predefined accounts.',
|
||||
cannot_delete_account_has_associated_transactions: 'you could\'t not delete account that has associated transactions.',
|
||||
the_account_has_been_successfully_inactivated: 'The account has been successfully inactivated.',
|
||||
the_account_has_been_successfully_activated: 'The account has been successfully activated.',
|
||||
the_account_has_been_successfully_deleted: 'The account has been successfully deleted.',
|
||||
the_accounts_has_been_successfully_deleted: 'The accounts have been successfully deleted.',
|
||||
are_sure_to_inactive_this_account: 'Are you sure you want to inactive this account? You will be able to activate it later',
|
||||
are_sure_to_activate_this_account: 'Are you sure you want to activate this account? You will be able to inactivate it later',
|
||||
once_delete_this_account_you_will_able_to_restore_it: `Once you delete this account, you won\'t be able to restore it later. Are you sure you want to delete this account?<br /><br />If you're not sure, you can inactivate this account instead.`,
|
||||
the_journal_has_been_successfully_created: 'The journal #{number} has been successfully created.',
|
||||
the_journal_has_been_successfully_edited: 'The journal #{number} has been successfully edited.',
|
||||
credit: 'Credit',
|
||||
debit: 'Debit',
|
||||
once_delete_this_item_you_will_able_to_restore_it: `Once you delete this item, you won\'t be able to restore the item later. Are you sure you want to delete ?<br /><br />If you're not sure, you can inactivate it instead.`,
|
||||
the_item_has_been_successfully_deleted: 'The item has been successfully deleted.',
|
||||
the_item_category_has_been_successfully_created: 'The item category has been successfully created.',
|
||||
the_item_category_has_been_successfully_edited: 'The item category has been successfully edited.',
|
||||
once_delete_these_views_you_will_not_able_restore_them: 'Once you delete the custom view, you won\'t be able to restore it later. Are you sure you want to delete this view?',
|
||||
the_custom_view_has_been_successfully_deleted: 'The custom view has been successfully deleted.',
|
||||
teammate_invited_to_organization_account: 'Your teammate has been invited to the organization account.',
|
||||
select_account_type: 'Select account type',
|
||||
menu:'Menu',
|
||||
graph:'Graph',
|
||||
map:'Map',
|
||||
table:'Table',
|
||||
nucleus:'Nucleus',
|
||||
logout:'Logout',
|
||||
the_expense_has_been_successfully_created: 'The expense has been successfully created.',
|
||||
select_payment_account:'Select Payment Account',
|
||||
select_expense_account:'Select Expense Account',
|
||||
and:'And',
|
||||
or:'OR',
|
||||
select_a_comparator:'Select a comparator',
|
||||
equals:'Equals',
|
||||
not_equal:'Not Equal',
|
||||
contain:'Contain',
|
||||
not_contain:'Not Contain',
|
||||
cash:'Cash',
|
||||
accrual:'Accrual',
|
||||
from:'From',
|
||||
to:'To',
|
||||
accounting_basis:'Accounting Basis:',
|
||||
general:'General',
|
||||
users:'Users',
|
||||
currencies:'Currencies',
|
||||
accountant:'Accountant',
|
||||
accounts:'Accounts',
|
||||
homepage:'Homepage',
|
||||
items_list:'Items List',
|
||||
new_item:'New Item',
|
||||
items:'Items',
|
||||
category_list:'Category List',
|
||||
financial:'Financial',
|
||||
accounts_chart:'Accounts Chart',
|
||||
manual_journal:'Manual Journal',
|
||||
make_journal:'Make Journal',
|
||||
exchange_rate:'Exchange Rate',
|
||||
banking:'Banking',
|
||||
sales:'Sales',
|
||||
purchases:'Purchases',
|
||||
financial_reports:'Financial Reports',
|
||||
balance_sheet:'Balance Sheet',
|
||||
trial_balance_sheet:'Trial Balance Sheet',
|
||||
journal:'Journal',
|
||||
general_ledger:'General Ledger',
|
||||
profit_loss_sheet:'Profit Loss Sheet',
|
||||
expenses:'Expenses',
|
||||
expenses_list:'Expenses List',
|
||||
new_expenses:'New Expenses',
|
||||
preferences:'Preferences',
|
||||
auditing_system:'Auditing System',
|
||||
all:'All',
|
||||
organization:'Organization.',
|
||||
check_your_email_for_a_link_to_reset: 'Check your email for a link to reset your password.If it doesn’t appear within a few minutes, check your spam folder.',
|
||||
we_couldn_t_find_your_account_with_that_email:'We couldn\'t find your account with that email.',
|
||||
select_parent_account:'Select Parent Account',
|
||||
the_exchange_rate_has_been_successfully_edited:'The exchange rate has been successfully edited',
|
||||
the_exchange_rate_has_been_successfully_created:'The exchange rate has been successfully created',
|
||||
the_exchange_rate_has_been_successfully_deleted: 'The exchange rate has been successfully deleted.',
|
||||
the_user_details_has_been_updated:'The user details has been updated',
|
||||
the_category_has_been_successfully_created: 'The category has been successfully created.',
|
||||
filters_applied:'filters applied',
|
||||
the_expense_has_been_successfully_deleted: 'The expense has been successfully deleted.',
|
||||
select_item_type:'Select Item Type',
|
||||
service:'Service',
|
||||
inventory:'Inventory',
|
||||
non_inventory:'Non-Inventory',
|
||||
select_category:'Select category',
|
||||
select_account:'Select Account',
|
||||
custom_fields:'Custom Fields',
|
||||
the_currency_has_been_successfully_deleted:'The currency has been successfully deleted',
|
||||
organization_industry:'Organization Industry',
|
||||
business_location:'Business Location',
|
||||
base_currency:'Base Currency',
|
||||
fiscal_year:'Fiscal Year',
|
||||
language:'Language',
|
||||
time_zone:'Time Zone',
|
||||
date_format:'Date Format',
|
||||
edit_user:'Edit User',
|
||||
edit_invite:'Edit Invite',
|
||||
inactivate_user:'Inactivate User',
|
||||
delete_user:'Delete User',
|
||||
full_name:'Full Name',
|
||||
the_user_has_been_successfully_inactivated: 'The user has been successfully inactivated.',
|
||||
the_user_has_been_successfully_deleted: 'The user has been successfully deleted.',
|
||||
customize_report:'Customize Report',
|
||||
print:'Print',
|
||||
export:'Export',
|
||||
accounts_with_zero_balance:'Accounts with Zero Balance',
|
||||
all_transactions:'All Transactions',
|
||||
filter_accounts:'Filter Accounts',
|
||||
calculate_report:'Calculate Report',
|
||||
total:'Total',
|
||||
specific_accounts:'Specific Accounts',
|
||||
trans_num:'Trans. NUM',
|
||||
journal_sheet:'Journal Sheet',
|
||||
run_report:'Run Report',
|
||||
num:'Num.',
|
||||
acc_code:'Acc. Code',
|
||||
display_report_columns:'Display report columns',
|
||||
select_display_columns_by:'Select display columns by...',
|
||||
credit_and_debit_not_equal:'credit and debit not equal',
|
||||
the_currency_has_been_successfully_edited:'The currency has been successfully edited',
|
||||
the_currency_has_been_successfully_created:'The currency has been successfully created',
|
||||
|
||||
// Name Labels
|
||||
expense_account_id :'Expense account',
|
||||
payment_account_id: 'Payment account',
|
||||
currency_code_: 'Currency code',
|
||||
publish:'Publish',
|
||||
exchange_rate_:'Exchange rate',
|
||||
journal_number_:'Journal number',
|
||||
first_name_: 'First name',
|
||||
last_name_:'Last name',
|
||||
phone_number_:'Phone number',
|
||||
organization_name_:'Organization name',
|
||||
confirm_password:'Confirm password',
|
||||
crediential:'Email or Phone number',
|
||||
account_type_id:'Account type',
|
||||
account_name_:'Account name',
|
||||
currency_name_:'Currency name',
|
||||
cost_account_id:'Cost account',
|
||||
sell_account_id:'Sell account',
|
||||
item_type_:'Item type',
|
||||
item_name_:'Item name',
|
||||
organization_industry_:'Organization industry',
|
||||
base_currency_:'Base currency',
|
||||
date_format_:'Date format',
|
||||
view_name_:'View name'
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
60
client/src/lang/en/locale.js
Normal file
60
client/src/lang/en/locale.js
Normal file
@@ -0,0 +1,60 @@
|
||||
import printValue from '../printValue';
|
||||
export const locale = {
|
||||
|
||||
mixed: {
|
||||
default: "${path} is invalid",
|
||||
required: "${path} is a required field ",
|
||||
oneOf: "${path} must be one of the following values: ${values}",
|
||||
notOneOf: "${path} must not be one of the following values: ${values}",
|
||||
notType: ({ path, type, value, originalValue }) => {
|
||||
let isCast = originalValue != null && originalValue !== value;
|
||||
let msg =
|
||||
`${path} must beeeeee a \`${type}\` type, ` +
|
||||
`but the final value was: \`${printValue(value, true)}\`` +
|
||||
(isCast
|
||||
? ` (cast from the value \`${printValue(originalValue, true)}\`).`
|
||||
: '.');
|
||||
|
||||
if (value === null) {
|
||||
msg += `\n If "null" is intended as an empty value be sure to mark the schema as \`.nullable()\``;
|
||||
}
|
||||
|
||||
return msg;
|
||||
},
|
||||
defined: '${path} must be defined',
|
||||
},
|
||||
string: {
|
||||
length: "${path} must be exactly ${length} characters",
|
||||
min: "${path} must be at least ${min} characters",
|
||||
max: "${path} must be at most ${max} characters",
|
||||
matches: '${path} must match the following: "${regex}"',
|
||||
email: "${path} must be a valid email",
|
||||
url: "${path} must be a valid URL",
|
||||
trim: "${path} must be a trimmed string",
|
||||
lowercase: "${path} must be a lowercase string",
|
||||
uppercase: "${path} must be a upper case string"
|
||||
},
|
||||
number: {
|
||||
min: "${path} must be greater than or equal to ${min}",
|
||||
max: "${path} must be less than or equal to ${max}",
|
||||
lessThan: "${path} must be less than ${less}",
|
||||
moreThan: "${path} must be greater than ${more}",
|
||||
notEqual: "${path} must be not equal to ${notEqual}",
|
||||
positive: "${path} must be a positive number",
|
||||
negative: "${path} must be a negative number",
|
||||
integer: "${path} must be an integer"
|
||||
},
|
||||
date: {
|
||||
min: "${path} field must be later than ${min}",
|
||||
max: "${path} field must be at earlier than ${max}"
|
||||
},
|
||||
boolean : {},
|
||||
object: {
|
||||
noUnknown:
|
||||
"${path} field cannot have keys not specified in the object shape"
|
||||
},
|
||||
array: {
|
||||
min: "${path} field must have at least ${min} items",
|
||||
max: "${path} field must have less than or equal to ${max} items"
|
||||
}
|
||||
};
|
||||
48
client/src/lang/printValue.js
Normal file
48
client/src/lang/printValue.js
Normal file
@@ -0,0 +1,48 @@
|
||||
const toString = Object.prototype.toString;
|
||||
const errorToString = Error.prototype.toString;
|
||||
const regExpToString = RegExp.prototype.toString;
|
||||
const symbolToString =
|
||||
typeof Symbol !== 'undefined' ? Symbol.prototype.toString : () => '';
|
||||
const SYMBOL_REGEXP = /^Symbol\((.*)\)(.*)$/;
|
||||
|
||||
function printNumber(val) {
|
||||
if (val != +val) return 'NaN';
|
||||
const isNegativeZero = val === 0 && 1 / val < 0;
|
||||
return isNegativeZero ? '-0' : '' + val;
|
||||
}
|
||||
|
||||
function printSimpleValue(val, quoteStrings = false) {
|
||||
if (val == null || val === true || val === false) return '' + val;
|
||||
|
||||
const typeOf = typeof val;
|
||||
if (typeOf === 'number') return printNumber(val);
|
||||
if (typeOf === 'string') return quoteStrings ? `"${val}"` : val;
|
||||
if (typeOf === 'function')
|
||||
return '[Function ' + (val.name || 'anonymous') + ']';
|
||||
if (typeOf === 'symbol')
|
||||
return symbolToString.call(val).replace(SYMBOL_REGEXP, 'Symbol($1)');
|
||||
|
||||
const tag = toString.call(val).slice(8, -1);
|
||||
if (tag === 'Date')
|
||||
return isNaN(val.getTime()) ? '' + val : val.toISOString(val);
|
||||
if (tag === 'Error' || val instanceof Error)
|
||||
return '[' + errorToString.call(val) + ']';
|
||||
if (tag === 'RegExp') return regExpToString.call(val);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
export default function printValue(value, quoteStrings) {
|
||||
let result = printSimpleValue(value, quoteStrings);
|
||||
if (result !== null) return result;
|
||||
|
||||
return JSON.stringify(
|
||||
value,
|
||||
function(key, value) {
|
||||
let result = printSimpleValue(this[key], quoteStrings);
|
||||
if (result !== null) return result;
|
||||
return value;
|
||||
},
|
||||
2,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user