fix(webapp): rename sidebar localization keys names to be keyword path

This commit is contained in:
Ahmed Bouhuolia
2023-06-15 20:12:31 +02:00
parent 01c27b56ef
commit ef2d1977d6
2 changed files with 161 additions and 92 deletions

View File

@@ -31,7 +31,7 @@ export const SidebarMenu = [
// # Homepage
// ---------------
{
text: <T id={'homepage'} />,
text: <T id={'sidebar.homepage'} />,
type: ISidebarMenuItemType.Link,
disabled: false,
href: '/',
@@ -41,20 +41,20 @@ export const SidebarMenu = [
// # Sales & Inventory
// ---------------
{
text: <T id={'sales_inventory'} />,
text: <T id={'sidebar.sales_inventory'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'items'} />,
text: <T id={'sidebar.items'} />,
type: ISidebarMenuItemType.Overlay,
overlayId: ISidebarMenuOverlayIds.Items,
children: [
{
text: <T id={'items'} />,
text: <T id={'sidebar.items'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'items'} />,
text: <T id={'sidebar.items'} />,
href: '/items',
type: ISidebarMenuItemType.Link,
permission: {
@@ -63,7 +63,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'inventory_adjustments'} />,
text: <T id={'sidebar.inventory_adjustments'} />,
href: '/inventory-adjustments',
type: ISidebarMenuItemType.Link,
permission: {
@@ -72,7 +72,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'sidebar_warehouse_transfer'} />,
text: <T id={'sidebar.warehouse_transfer'} />,
href: '/warehouses-transfers',
type: ISidebarMenuItemType.Link,
feature: Features.Warehouses,
@@ -89,11 +89,11 @@ export const SidebarMenu = [
],
},
{
text: <T id={'New tasks'} />,
text: <T id={'sidebar.new_tasks'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'New inventory item'} />,
text: <T id={'sidebar.new_inventory_item'} />,
href: '/items/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -102,15 +102,13 @@ export const SidebarMenu = [
},
},
{
text: (
<T id={'warehouse_transfer.label.new_warehouse_transfer'} />
),
text: <T id={'sidebar.new_warehouse_transfer'} />,
href: '/warehouses-transfers/new',
type: ISidebarMenuItemType.Link,
feature: Features.Warehouses,
},
{
text: <T id={'New service'} />,
text: <T id={'sidebar.new_service'} />,
href: '/items/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -119,7 +117,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'New item category'} />,
text: <T id={'sidebar.new_item_category'} />,
href: '/items/categories/new',
type: ISidebarMenuItemType.Dialog,
dialogName: 'item-category-form',
@@ -138,16 +136,16 @@ export const SidebarMenu = [
// # Sales
// ---------------
{
text: <T id={'sales'} />,
text: <T id={'sidebar.sales'} />,
type: ISidebarMenuItemType.Overlay,
overlayId: ISidebarMenuOverlayIds.Sales,
children: [
{
text: <T id={'sales'} />,
text: <T id={'sidebar.sales'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'estimates'} />,
text: <T id={'sidebar.estimates'} />,
href: '/estimates',
type: ISidebarMenuItemType.Link,
permission: {
@@ -156,7 +154,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'invoices'} />,
text: <T id={'sidebar.invoices'} />,
href: '/invoices',
type: ISidebarMenuItemType.Link,
permission: {
@@ -165,7 +163,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'receipts'} />,
text: <T id={'sidebar.receipts'} />,
href: '/receipts',
type: ISidebarMenuItemType.Link,
permission: {
@@ -174,12 +172,12 @@ export const SidebarMenu = [
},
},
{
text: <T id={'sidebar_credit_note'} />,
text: <T id={'sidebar.credit_notes'} />,
href: '/credit-notes',
type: ISidebarMenuItemType.Link,
},
{
text: <T id={'payment_receives'} />,
text: <T id={'sidebar.payment_receives'} />,
href: '/payment-receives',
type: ISidebarMenuItemType.Link,
permission: {
@@ -190,11 +188,11 @@ export const SidebarMenu = [
],
},
{
text: <T id={'New tasks'} />,
text: <T id={'sidebar.new_tasks'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'new_estimate'} />,
text: <T id={'sidebar.new_estimate'} />,
href: '/estimates/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -203,7 +201,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'new_invoice'} />,
text: <T id={'sidebar.new_invoice'} />,
href: '/invoices/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -212,7 +210,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'new_receipt'} />,
text: <T id={'sidebar.new_receipt'} />,
href: '/receipts/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -221,12 +219,12 @@ export const SidebarMenu = [
},
},
{
text: <T id={'credit_note.label.new_credit_note'} />,
text: <T id={'sidebar.new_credit_note'} />,
href: '/credit-notes/new',
type: ISidebarMenuItemType.Link,
},
{
text: <T id={'new_payment_receive'} />,
text: <T id={'sidebar.new_payment_receive'} />,
href: '/payment-receives/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -242,12 +240,12 @@ export const SidebarMenu = [
// # Purchases
// ---------------
{
text: <T id={'purchases'} />,
text: <T id={'sidebar.purchases'} />,
type: ISidebarMenuItemType.Overlay,
overlayId: ISidebarMenuOverlayIds.Purchases,
children: [
{
text: <T id={'purchases'} />,
text: <T id={'sidebar.purchases'} />,
type: ISidebarMenuItemType.Group,
children: [
{
@@ -276,11 +274,11 @@ export const SidebarMenu = [
],
},
{
text: <T id={'New tasks'} />,
text: <T id={'sidebar.new_tasks'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'New purchase invoice'} />,
text: <T id={'sidebar.new_purchase_invoice'} />,
href: '/bills/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -289,7 +287,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'vendor_credits.label.new_vendor_credit'} />,
text: <T id={'sidebar.new_vendor_credit'} />,
href: '/vendor-credits/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -298,7 +296,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'new_payment_made'} />,
text: <T id={'sidebar.new_payment_made'} />,
href: '/payment-mades/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -314,16 +312,16 @@ export const SidebarMenu = [
// # Contacts
// ---------------
{
text: <T id={'contacts'} />,
text: <T id={'sidebar.contacts'} />,
type: ISidebarMenuItemType.Overlay,
overlayId: ISidebarMenuOverlayIds.Contacts,
children: [
{
text: <T id={'contacts'} />,
text: <T id={'sidebar.contacts'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'customers'} />,
text: <T id={'sidebar.customers'} />,
href: '/customers',
type: ISidebarMenuItemType.Link,
permission: {
@@ -332,7 +330,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'vendors'} />,
text: <T id={'sidebar.vendors'} />,
href: '/vendors',
type: ISidebarMenuItemType.Link,
permission: {
@@ -343,11 +341,11 @@ export const SidebarMenu = [
],
},
{
text: <T id={'New tasks'} />,
text: <T id={'sidebar.new_tasks'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'new_customer'} />,
text: <T id={'sidebar.new_customer'} />,
href: '/customers/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -356,7 +354,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'new_vendor'} />,
text: <T id={'sidebar.new_vendor'} />,
href: '/vendors/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -372,20 +370,20 @@ export const SidebarMenu = [
// # Accounting
// ---------------
{
text: <T id={'accounting'} />,
text: <T id={'sidebar.accounting'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'financial'} />,
text: <T id={'sidebar.financial'} />,
type: ISidebarMenuItemType.Overlay,
overlayId: ISidebarMenuOverlayIds.Financial,
children: [
{
text: <T id={'financial'} />,
text: <T id={'sidebar.financial'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'accounts_chart'} />,
text: <T id={'sidebar.accounts_chart'} />,
href: '/accounts',
type: ISidebarMenuItemType.Link,
permission: {
@@ -394,7 +392,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'manual_journals'} />,
text: <T id={'sidebar.manual_journals'} />,
href: '/manual-journals',
type: ISidebarMenuItemType.Link,
permission: {
@@ -410,11 +408,11 @@ export const SidebarMenu = [
],
},
{
text: <T id={'New tasks'} />,
text: <T id={'sidebar.new_tasks'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'make_journal_entry'} />,
text: <T id={'sidebar.make_journal_entry'} />,
href: '/make-journal-entry',
type: ISidebarMenuItemType.Link,
permission: {
@@ -441,7 +439,7 @@ export const SidebarMenu = [
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'siebar.cashflow.label_cash_and_bank_accounts'} />,
text: <T id={'sidebar.cash_bank_accounts'} />,
href: '/cashflow-accounts',
type: ISidebarMenuItemType.Link,
permission: {
@@ -452,12 +450,12 @@ export const SidebarMenu = [
],
},
{
text: <T id={'New tasks'} />,
text: <T id={'sidebar.new_tasks'} />,
type: ISidebarMenuItemType.Group,
divider: true,
children: [
{
text: <T id={'cash_flow.label.add_money_in'} />,
text: <T id={'sidebar.add_money_in'} />,
href: '/cashflow-accounts',
type: ISidebarMenuItemType.Dialog,
dialogName: 'money-in',
@@ -467,7 +465,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'cash_flow.label.add_money_out'} />,
text: <T id={'sidebar.add_money_out'} />,
href: '/cashflow-accounts',
type: ISidebarMenuItemType.Dialog,
permission: {
@@ -476,7 +474,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'cash_flow.label.add_cash_account'} />,
text: <T id={'sidebar.add_cash_account'} />,
href: '/cashflow-accounts',
type: ISidebarMenuItemType.Dialog,
permission: {
@@ -485,7 +483,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'cash_flow.label.add_bank_account'} />,
text: <T id={'sidebar.add_bank_account'} />,
href: '/cashflow-accounts',
type: ISidebarMenuItemType.Dialog,
permission: {
@@ -501,16 +499,16 @@ export const SidebarMenu = [
// # Expenses
// ---------------
{
text: <T id={'expenses'} />,
text: <T id={'sidebar.expenses'} />,
type: ISidebarMenuItemType.Overlay,
overlayId: ISidebarMenuOverlayIds.Expenses,
children: [
{
text: <T id={'expenses'} />,
text: <T id={'sidebar.expenses'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'expenses'} />,
text: <T id={'sidebar.expenses'} />,
href: '/expenses',
type: ISidebarMenuItemType.Link,
permission: {
@@ -521,11 +519,11 @@ export const SidebarMenu = [
],
},
{
text: <T id={'New tasks'} />,
text: <T id={'sidebar.new_tasks'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'new_expense'} />,
text: <T id={'sidebar.new_expense'} />,
href: '/expenses/new',
type: ISidebarMenuItemType.Link,
permission: {
@@ -541,16 +539,16 @@ export const SidebarMenu = [
// # Projects Management
// ---------------------
// {
// text: 'Projects',
// text: <T id={'sidebar.projects'} />,
// type: ISidebarMenuItemType.Overlay,
// overlayId: ISidebarMenuOverlayIds.Projects,
// children: [
// {
// text: 'Projects',
// text: <T id={'sidebar.projects'} />,
// type: ISidebarMenuItemType.Group,
// children: [
// {
// text: 'Projects',
// text: <T id={'sidebar.projects'} />,
// href: '/projects',
// type: ISidebarMenuItemType.Link,
// permission: {
@@ -561,11 +559,11 @@ export const SidebarMenu = [
// ],
// },
// {
// text: <T id={'New tasks'} />,
// text: <T id={'sidebar.new_tasks'} />,
// type: ISidebarMenuItemType.Group,
// children: [
// {
// text: <T id={'projects.label.new_project'} />,
// text: <T id={'sidebar.new_project'} />,
// type: ISidebarMenuItemType.Dialog,
// dialogName: 'project-form',
// permission: {
@@ -574,18 +572,18 @@ export const SidebarMenu = [
// },
// },
// {
// text: <T id={'projects.label.new_time_entry'} />,
// text: <T id={'sidebar.new_time_entry'} />,
// type: ISidebarMenuItemType.Dialog,
// dialogName: 'project-time-entry-form',
// },
// ],
// },
// {
// text: <T id={'Reports'} />,
// text: <T id={'sidebar.reports'} />,
// type: ISidebarMenuItemType.Group,
// children: [
// {
// text: <T id={'project_profitability_summary'} />,
// text: <T id={'sidebar.project_profitability_summary'} />,
// href: '/financial-reports/project-profitability-summary',
// type: ISidebarMenuItemType.Link,
// },
@@ -597,16 +595,16 @@ export const SidebarMenu = [
// # Reports
// ---------------
{
text: <T id={'Reports'} />,
text: <T id={'sidebar.reports'} />,
type: ISidebarMenuItemType.Overlay,
overlayId: ISidebarMenuOverlayIds.Reports,
children: [
{
text: <T id={'Reports'} />,
text: <T id={'sidebar.reports'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'balance_sheet'} />,
text: <T id={'sidebar.balance_sheet'} />,
href: '/financial-reports/balance-sheet',
type: ISidebarMenuItemType.Link,
permission: {
@@ -615,7 +613,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'trial_balance_sheet'} />,
text: <T id={'sidebar.trial_balance_sheet'} />,
href: '/financial-reports/trial-balance-sheet',
type: ISidebarMenuItemType.Link,
permission: {
@@ -624,7 +622,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'journal'} />,
text: <T id={'sidebar.journal'} />,
href: '/financial-reports/journal-sheet',
type: ISidebarMenuItemType.Link,
permission: {
@@ -633,7 +631,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'general_ledger'} />,
text: <T id={'sidebar.general_ledger'} />,
href: '/financial-reports/general-ledger',
type: ISidebarMenuItemType.Link,
permission: {
@@ -642,7 +640,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'profit_loss_sheet'} />,
text: <T id={'sidebar.profit_loss_sheet'} />,
href: '/financial-reports/profit-loss-sheet',
type: ISidebarMenuItemType.Link,
permission: {
@@ -651,7 +649,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'cash_flow_statement'} />,
text: <T id={'sidebar.cash_flow_statement'} />,
href: '/financial-reports/cash-flow',
type: ISidebarMenuItemType.Link,
permission: {
@@ -660,7 +658,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'AR_Aging_Summary'} />,
text: <T id={'sidebar.ar_aging_Summary'} />,
href: '/financial-reports/receivable-aging-summary',
type: ISidebarMenuItemType.Link,
permission: {
@@ -669,7 +667,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'AP_Aging_Summary'} />,
text: <T id={'sidebar.ap_aging_summary'} />,
href: '/financial-reports/payable-aging-summary',
type: ISidebarMenuItemType.Link,
permission: {
@@ -680,11 +678,11 @@ export const SidebarMenu = [
],
},
{
text: <T id={'Sales/Purchases'} />,
text: <T id={'sidebar.sales_purchases'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'purchases_by_items'} />,
text: <T id={'sidebar.purchases_by_items'} />,
type: ISidebarMenuItemType.Link,
href: '/financial-reports/purchases-by-items',
permission: {
@@ -693,7 +691,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'sales_by_items'} />,
text: <T id={'sidebar.sales_by_items'} />,
href: '/financial-reports/sales-by-items',
type: ISidebarMenuItemType.Link,
permission: {
@@ -702,7 +700,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'customers_transactions'} />,
text: <T id={'sidebar.customers_transactions'} />,
href: '/financial-reports/transactions-by-customers',
type: ISidebarMenuItemType.Link,
permission: {
@@ -711,7 +709,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'vendors_transactions'} />,
text: <T id={'sidebar.vendors_transactions'} />,
href: '/financial-reports/transactions-by-vendors',
type: ISidebarMenuItemType.Link,
permission: {
@@ -720,7 +718,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'customers_balance_summary'} />,
text: <T id={'sidebar.customers_balance_summary'} />,
href: '/financial-reports/customers-balance-summary',
type: ISidebarMenuItemType.Link,
permission: {
@@ -729,7 +727,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'vendors_balance_summary'} />,
text: <T id={'sidebar.vendors_balance_summary'} />,
href: '/financial-reports/vendors-balance-summary',
type: ISidebarMenuItemType.Link,
permission: {
@@ -740,11 +738,11 @@ export const SidebarMenu = [
],
},
{
text: <T id={'inventory'} />,
text: <T id={'sidebar.inventory'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'inventory_item_details'} />,
text: <T id={'sidebar.inventory_item_details'} />,
href: '/financial-reports/inventory-item-details',
type: ISidebarMenuItemType.Link,
permission: {
@@ -753,7 +751,7 @@ export const SidebarMenu = [
},
},
{
text: <T id={'inventory_valuation'} />,
text: <T id={'sidebar.inventory_valuation'} />,
href: '/financial-reports/inventory-valuation',
type: ISidebarMenuItemType.Link,
permission: {
@@ -766,11 +764,11 @@ export const SidebarMenu = [
],
},
{
text: <T id={'system'} />,
text: <T id={'sidebar.system'} />,
type: ISidebarMenuItemType.Group,
children: [
{
text: <T id={'preferences'} />,
text: <T id={'sidebar.preferences'} />,
href: '/preferences',
type: ISidebarMenuItemType.Link,
permission: {