diff --git a/frappe/models/doctype/ToDo/ToDo.js b/frappe/models/doctype/ToDo/ToDo.js
index aca473d9..4ea3d7ce 100644
--- a/frappe/models/doctype/ToDo/ToDo.js
+++ b/frappe/models/doctype/ToDo/ToDo.js
@@ -20,7 +20,7 @@ module.exports = {
{
fieldname: 'subject',
label: t`Subject`,
- placeholder: 'Subject',
+ placeholder: t`Subject`,
fieldtype: 'Data',
required: 1,
},
diff --git a/models/doctype/Account/Account.js b/models/doctype/Account/Account.js
index ea514512..bee98c57 100644
--- a/models/doctype/Account/Account.js
+++ b/models/doctype/Account/Account.js
@@ -20,7 +20,7 @@ export default {
fieldname: 'rootType',
label: t`Root Type`,
fieldtype: 'Select',
- placeholder: 'Root Type',
+ placeholder: t`Root Type`,
options: ['Asset', 'Liability', 'Equity', 'Income', 'Expense'],
required: 1,
},
@@ -40,7 +40,7 @@ export default {
{
fieldname: 'accountType',
label: t`Account Type`,
- placeholder: 'Account Type',
+ placeholder: t`Account Type`,
fieldtype: 'Select',
options: [
'Accumulated Depreciation',
diff --git a/models/doctype/AccountingSettings/AccountingSettings.js b/models/doctype/AccountingSettings/AccountingSettings.js
index 77baf2f7..5de9cc9a 100644
--- a/models/doctype/AccountingSettings/AccountingSettings.js
+++ b/models/doctype/AccountingSettings/AccountingSettings.js
@@ -51,7 +51,7 @@ export default {
fieldname: 'country',
label: t`Country`,
fieldtype: 'AutoComplete',
- placeholder: 'Select Country',
+ placeholder: t`Select Country`,
readOnly: 1,
required: 1,
getList: () => countryList,
@@ -113,7 +113,7 @@ export default {
fieldname: 'gstin',
label: t`GSTIN`,
fieldtype: 'Data',
- placeholder: '27AAAAA0000A1Z5',
+ placeholder: t`27AAAAA0000A1Z5`,
},
],
quickEditFields: [
diff --git a/models/doctype/Address/Address.js b/models/doctype/Address/Address.js
index 78b841bf..c768c07e 100644
--- a/models/doctype/Address/Address.js
+++ b/models/doctype/Address/Address.js
@@ -29,27 +29,27 @@ export default {
{
fieldname: 'addressLine1',
label: t`Address Line 1`,
- placeholder: 'Address Line 1',
+ placeholder: t`Address Line 1`,
fieldtype: 'Data',
required: 1,
},
{
fieldname: 'addressLine2',
label: t`Address Line 2`,
- placeholder: 'Address Line 2',
+ placeholder: t`Address Line 2`,
fieldtype: 'Data',
},
{
fieldname: 'city',
label: t`City / Town`,
- placeholder: 'City / Town',
+ placeholder: t`City / Town`,
fieldtype: 'Data',
required: 1,
},
{
fieldname: 'state',
label: t`State`,
- placeholder: 'State',
+ placeholder: t`State`,
fieldtype: 'AutoComplete',
emptyMessage: (doc) => {
if (doc.country) {
@@ -62,7 +62,7 @@ export default {
{
fieldname: 'country',
label: t`Country`,
- placeholder: 'Country',
+ placeholder: t`Country`,
fieldtype: 'AutoComplete',
getList: () => Object.keys(countryList).sort(),
required: 1,
@@ -70,19 +70,19 @@ export default {
{
fieldname: 'postalCode',
label: t`Postal Code`,
- placeholder: 'Postal Code',
+ placeholder: t`Postal Code`,
fieldtype: 'Data',
},
{
fieldname: 'emailAddress',
label: t`Email Address`,
- placeholder: 'Email Address',
+ placeholder: t`Email Address`,
fieldtype: 'Data',
},
{
fieldname: 'phone',
label: t`Phone`,
- placeholder: 'Phone',
+ placeholder: t`Phone`,
fieldtype: 'Data',
},
{
diff --git a/models/doctype/Address/RegionalChanges.js b/models/doctype/Address/RegionalChanges.js
index 45a0deb9..cae759cb 100644
--- a/models/doctype/Address/RegionalChanges.js
+++ b/models/doctype/Address/RegionalChanges.js
@@ -18,7 +18,7 @@ export default function getAugmentedAddress({ country }) {
fieldname: 'pos',
label: t`Place of Supply`,
fieldtype: 'AutoComplete',
- placeholder: 'Place of Supply',
+ placeholder: t`Place of Supply`,
formula: (doc) => (stateList.includes(doc.state) ? doc.state : ''),
getList: () => stateList,
},
diff --git a/models/doctype/GSTR3B/GSTR3B.js b/models/doctype/GSTR3B/GSTR3B.js
index a9d94403..2a310e63 100644
--- a/models/doctype/GSTR3B/GSTR3B.js
+++ b/models/doctype/GSTR3B/GSTR3B.js
@@ -20,7 +20,7 @@ export default {
{
fieldname: 'month',
label: t`Month`,
- placeholder: 'Month',
+ placeholder: t`Month`,
fieldtype: 'Select',
options: [
'January',
diff --git a/models/doctype/Item/Item.js b/models/doctype/Item/Item.js
index afa494e1..19cf9503 100644
--- a/models/doctype/Item/Item.js
+++ b/models/doctype/Item/Item.js
@@ -18,7 +18,7 @@ export default {
fieldname: 'name',
label: t`Item Name`,
fieldtype: 'Data',
- placeholder: 'Item Name',
+ placeholder: t`Item Name`,
required: 1,
},
{
@@ -29,21 +29,21 @@ export default {
{
fieldname: 'description',
label: t`Description`,
- placeholder: 'Item Description',
+ placeholder: t`Item Description`,
fieldtype: 'Text',
},
{
fieldname: 'unit',
label: t`Unit Type`,
fieldtype: 'Select',
- placeholder: 'Unit Type',
+ placeholder: t`Unit Type`,
default: 'Unit',
options: ['Unit', 'Kg', 'Gram', 'Hour', 'Day'],
},
{
fieldname: 'itemType',
label: t`Type`,
- placeholder: 'Type',
+ placeholder: t`Type`,
fieldtype: 'Select',
default: 'Product',
options: ['Product', 'Service'],
@@ -61,7 +61,7 @@ export default {
label: t`Income`,
fieldtype: 'Link',
target: 'Account',
- placeholder: 'Income',
+ placeholder: t`Income`,
required: 1,
disableCreation: true,
getFilters: () => {
@@ -86,7 +86,7 @@ export default {
label: t`Expense`,
fieldtype: 'Link',
target: 'Account',
- placeholder: 'Expense',
+ placeholder: t`Expense`,
required: 1,
disableCreation: true,
getFilters: () => {
@@ -112,7 +112,7 @@ export default {
label: t`Tax`,
fieldtype: 'Link',
target: 'Tax',
- placeholder: 'Tax',
+ placeholder: t`Tax`,
},
{
fieldname: 'rate',
diff --git a/models/doctype/Item/RegionalChanges.js b/models/doctype/Item/RegionalChanges.js
index 43d48f92..7b88b41d 100644
--- a/models/doctype/Item/RegionalChanges.js
+++ b/models/doctype/Item/RegionalChanges.js
@@ -17,7 +17,7 @@ export default function getAugmentedItem({ country }) {
fieldname: 'hsnCode',
label: t`HSN/SAC`,
fieldtype: 'Int',
- placeholder: 'HSN/SAC Code',
+ placeholder: t`HSN/SAC Code`,
},
...Item.fields.slice(nameFieldIndex + 1, Item.fields.length),
];
diff --git a/models/doctype/JournalEntry/JournalEntry.js b/models/doctype/JournalEntry/JournalEntry.js
index 5bb14ead..8cc3cb44 100644
--- a/models/doctype/JournalEntry/JournalEntry.js
+++ b/models/doctype/JournalEntry/JournalEntry.js
@@ -28,7 +28,7 @@ export default {
fieldname: 'entryType',
label: t`Entry Type`,
fieldtype: 'Select',
- placeholder: 'Entry Type',
+ placeholder: t`Entry Type`,
options: Object.keys(journalEntryTypeMap),
map: journalEntryTypeMap,
required: 1,
@@ -67,7 +67,7 @@ export default {
fieldname: 'userRemark',
label: t`User Remark`,
fieldtype: 'Text',
- placeholder: 'User Remark',
+ placeholder: t`User Remark`,
},
{
fieldname: 'cancelled',
diff --git a/models/doctype/JournalEntryAccount/JournalEntryAccount.js b/models/doctype/JournalEntryAccount/JournalEntryAccount.js
index c10bd8d9..244c27f9 100644
--- a/models/doctype/JournalEntryAccount/JournalEntryAccount.js
+++ b/models/doctype/JournalEntryAccount/JournalEntryAccount.js
@@ -6,7 +6,7 @@ export default {
{
fieldname: 'account',
label: t`Account`,
- placeholder: 'Account',
+ placeholder: t`Account`,
fieldtype: 'Link',
target: 'Account',
required: 1,
diff --git a/models/doctype/Party/Party.js b/models/doctype/Party/Party.js
index 264dd7de..a159c8c2 100644
--- a/models/doctype/Party/Party.js
+++ b/models/doctype/Party/Party.js
@@ -11,7 +11,7 @@ export default {
label: t`Name`,
fieldtype: 'Data',
required: 1,
- placeholder: 'Full Name',
+ placeholder: t`Full Name`,
},
{
fieldname: 'image',
@@ -59,14 +59,14 @@ export default {
label: t`Currency`,
fieldtype: 'Link',
target: 'Currency',
- placeholder: 'INR',
+ placeholder: t`INR`,
formula: () => frappe.AccountingSettings.currency,
},
{
fieldname: 'email',
label: t`Email`,
fieldtype: 'Data',
- placeholder: 'john@doe.com',
+ placeholder: t`john@doe.com`,
validate: {
type: 'email',
},
@@ -75,7 +75,7 @@ export default {
fieldname: 'phone',
label: t`Phone`,
fieldtype: 'Data',
- placeholder: 'Phone',
+ placeholder: t`Phone`,
validate: {
type: 'phone',
},
diff --git a/models/doctype/Party/RegionalChanges.js b/models/doctype/Party/RegionalChanges.js
index f977b9df..955cc365 100644
--- a/models/doctype/Party/RegionalChanges.js
+++ b/models/doctype/Party/RegionalChanges.js
@@ -23,7 +23,7 @@ export default function getAugmentedParty({ country }) {
{
fieldname: 'gstType',
label: t`GST Registration`,
- placeholder: 'GST Registration',
+ placeholder: t`GST Registration`,
fieldtype: 'Select',
default: gstTypes[0],
options: gstTypes,
diff --git a/models/doctype/Payment/Payment.js b/models/doctype/Payment/Payment.js
index 5bf5e83b..76f9f270 100644
--- a/models/doctype/Payment/Payment.js
+++ b/models/doctype/Payment/Payment.js
@@ -7,6 +7,12 @@ const paymentTypeMap = {
Pay: t`Pay`,
};
+const paymentMethodMap = {
+ Cash: t`Cash`,
+ Cheque: t`Cheque`,
+ Transfer: t`Transfer`,
+};
+
export default {
name: 'Payment',
label: t`Payment`,
@@ -61,7 +67,7 @@ export default {
fieldname: 'paymentType',
label: t`Payment Type`,
fieldtype: 'Select',
- placeholder: 'Payment Type',
+ placeholder: t`Payment Type`,
options: Object.keys(paymentTypeMap),
map: paymentTypeMap,
required: 1,
@@ -69,7 +75,7 @@ export default {
{
fieldname: 'paymentAccount',
label: t`To Account`,
- placeholder: 'To Account',
+ placeholder: t`To Account`,
fieldtype: 'Link',
target: 'Account',
required: 1,
@@ -102,16 +108,17 @@ export default {
{
fieldname: 'paymentMethod',
label: t`Payment Method`,
- placeholder: 'Payment Method',
+ placeholder: t`Payment Method`,
fieldtype: 'Select',
- options: ['Cash', 'Cheque', 'Transfer'],
+ options: Object.keys(paymentMethodMap),
+ map: paymentMethodMap,
default: 'Cash',
required: 1,
},
{
fieldname: 'referenceId',
label: t`Ref. / Cheque No.`,
- placeholder: 'Ref. / Cheque No.',
+ placeholder: t`Ref. / Cheque No.`,
fieldtype: 'Data',
required: (doc) => doc.paymentMethod !== 'Cash', // TODO: UNIQUE
hidden: (doc) => doc.paymentMethod === 'Cash',
@@ -119,13 +126,13 @@ export default {
{
fieldname: 'referenceDate',
label: t`Ref. Date`,
- placeholder: 'Ref. Date',
+ placeholder: t`Ref. Date`,
fieldtype: 'Date',
},
{
fieldname: 'clearanceDate',
label: t`Clearance Date`,
- placeholder: 'Clearance Date',
+ placeholder: t`Clearance Date`,
fieldtype: 'Date',
hidden: (doc) => doc.paymentMethod === 'Cash',
},
diff --git a/models/doctype/PaymentFor/PaymentFor.js b/models/doctype/PaymentFor/PaymentFor.js
index d3c528ba..96e9b173 100644
--- a/models/doctype/PaymentFor/PaymentFor.js
+++ b/models/doctype/PaymentFor/PaymentFor.js
@@ -16,7 +16,7 @@ export default {
{
fieldname: 'referenceType',
label: t`Reference Type`,
- placeholder: 'Type',
+ placeholder: t`Type`,
fieldtype: 'Select',
options: Object.keys(referenceTypeMap),
map: referenceTypeMap,
@@ -27,7 +27,7 @@ export default {
label: t`Reference Name`,
fieldtype: 'DynamicLink',
references: 'referenceType',
- placeholder: 'Name',
+ placeholder: t`Name`,
getFilters() {
return {
outstandingAmount: ['>', 0],
diff --git a/models/doctype/PrintSettings/PrintSettings.js b/models/doctype/PrintSettings/PrintSettings.js
index 8533c1c2..72210ed5 100644
--- a/models/doctype/PrintSettings/PrintSettings.js
+++ b/models/doctype/PrintSettings/PrintSettings.js
@@ -20,7 +20,7 @@ export default {
fieldname: 'email',
label: t`Email`,
fieldtype: 'Data',
- placeholder: 'john@doe.com',
+ placeholder: t`john@doe.com`,
validate: {
type: 'email',
},
@@ -34,7 +34,7 @@ export default {
fieldname: 'phone',
label: t`Phone`,
fieldtype: 'Data',
- placeholder: '9888900000',
+ placeholder: t`9888900000`,
validate: {
type: 'phone',
},
@@ -44,13 +44,13 @@ export default {
label: t`Address`,
fieldtype: 'Link',
target: 'Address',
- placeholder: 'Click to create',
+ placeholder: t`Click to create`,
inline: true,
},
{
fieldname: 'template',
label: t`Template`,
- placeholder: 'Template',
+ placeholder: t`Template`,
fieldtype: 'Select',
options: ['Basic', 'Minimal', 'Business'],
default: 'Basic',
@@ -58,7 +58,7 @@ export default {
{
fieldname: 'color',
label: t`Color`,
- placeholder: 'Select Color',
+ placeholder: t`Select Color`,
fieldtype: 'Color',
colors: [
'red',
@@ -86,7 +86,7 @@ export default {
{
fieldname: 'font',
label: t`Font`,
- placeholder: 'Font',
+ placeholder: t`Font`,
fieldtype: 'Select',
options: ['Inter', 'Times New Roman', 'Arial', 'Courier'],
default: 'Inter',
diff --git a/models/doctype/SalesInvoiceSettings/SalesInvoiceSettings.js b/models/doctype/SalesInvoiceSettings/SalesInvoiceSettings.js
index e6606d45..7150f585 100644
--- a/models/doctype/SalesInvoiceSettings/SalesInvoiceSettings.js
+++ b/models/doctype/SalesInvoiceSettings/SalesInvoiceSettings.js
@@ -10,7 +10,7 @@ export default {
{
fieldname: 'template',
label: t`Template`,
- placeholder: 'Template',
+ placeholder: t`Template`,
fieldtype: 'Select',
options: ['Basic I', 'Basic II', 'Modern'],
required: 1,
@@ -19,7 +19,7 @@ export default {
{
fieldname: 'font',
label: t`Font`,
- placeholder: 'Font',
+ placeholder: t`Font`,
fieldtype: 'Select',
options: ['Montserrat', 'Open Sans', 'Oxygen', 'Merriweather'],
required: 1,
diff --git a/models/doctype/SetupWizard/SetupWizard.js b/models/doctype/SetupWizard/SetupWizard.js
index 7860727f..fca8396e 100644
--- a/models/doctype/SetupWizard/SetupWizard.js
+++ b/models/doctype/SetupWizard/SetupWizard.js
@@ -22,7 +22,7 @@ export default {
fieldname: 'country',
label: t`Country`,
fieldtype: 'AutoComplete',
- placeholder: 'Select Country',
+ placeholder: t`Select Country`,
required: 1,
getList: () => Object.keys(countryList).sort(),
},
@@ -31,7 +31,7 @@ export default {
fieldname: 'fullname',
label: t`Your Name`,
fieldtype: 'Data',
- placeholder: 'John Doe',
+ placeholder: t`John Doe`,
required: 1,
},
@@ -39,7 +39,7 @@ export default {
fieldname: 'email',
label: t`Email`,
fieldtype: 'Data',
- placeholder: 'john@doe.com',
+ placeholder: t`john@doe.com`,
required: 1,
validate: {
type: 'email',
@@ -49,7 +49,7 @@ export default {
{
fieldname: 'companyName',
label: t`Company Name`,
- placeholder: 'Company Name',
+ placeholder: t`Company Name`,
fieldtype: 'Data',
required: 1,
},
@@ -58,14 +58,14 @@ export default {
fieldname: 'bankName',
label: t`Bank Name`,
fieldtype: 'Data',
- placeholder: 'Prime Bank',
+ placeholder: t`Prime Bank`,
required: 1,
},
{
fieldname: 'fiscalYearStart',
label: t`Fiscal Year Start Date`,
- placeholder: 'Fiscal Year Start Date',
+ placeholder: t`Fiscal Year Start Date`,
fieldtype: 'Date',
formulaDependsOn: ['country'],
formula: (doc) => {
@@ -84,7 +84,7 @@ export default {
{
fieldname: 'fiscalYearEnd',
label: t`Fiscal Year End Date`,
- placeholder: 'Fiscal Year End Date',
+ placeholder: t`Fiscal Year End Date`,
fieldtype: 'Date',
formulaDependsOn: ['country'],
formula: (doc) => {
@@ -103,7 +103,7 @@ export default {
fieldname: 'currency',
label: t`Currency`,
fieldtype: 'Data',
- placeholder: 'Currency',
+ placeholder: t`Currency`,
formulaDependsOn: ['country'],
formula: (doc) => {
if (!doc.country) return;
diff --git a/models/doctype/TaxDetail/TaxDetail.js b/models/doctype/TaxDetail/TaxDetail.js
index da4a97a8..a4c7bcd1 100644
--- a/models/doctype/TaxDetail/TaxDetail.js
+++ b/models/doctype/TaxDetail/TaxDetail.js
@@ -19,7 +19,7 @@ export default {
label: t`Rate`,
fieldtype: 'Float',
required: 1,
- placeholder: '0%',
+ placeholder: t`0%`,
},
],
tableFields: ['account', 'rate'],
diff --git a/models/doctype/Transaction/Transaction.js b/models/doctype/Transaction/Transaction.js
index 9c49d930..e81bed84 100644
--- a/models/doctype/Transaction/Transaction.js
+++ b/models/doctype/Transaction/Transaction.js
@@ -5,6 +5,12 @@ import utils from '../../../accounting/utils';
import { statusColor } from '../../../src/colors';
export function getStatusColumn() {
+ const statusMap = {
+ Unpaid: t`Unpaid`,
+ Paid: t`Paid`,
+ Draft: t`Draft`,
+ Cancelled: t`Cancelled`,
+ };
return {
label: t`Status`,
fieldname: 'status',
@@ -12,8 +18,9 @@ export function getStatusColumn() {
render(doc) {
const status = getInvoiceStatus(doc);
const color = statusColor[status];
+ const label = statusMap[status];
return {
- template: `${status}`,
+ template: `${label}`,
components: { Badge },
};
},
diff --git a/reports/BalanceSheet/viewConfig.js b/reports/BalanceSheet/viewConfig.js
index d6e632d8..14cb96b6 100644
--- a/reports/BalanceSheet/viewConfig.js
+++ b/reports/BalanceSheet/viewConfig.js
@@ -1,15 +1,21 @@
import frappe, { t } from 'frappe';
import getCommonExportActions from '../commonExporter';
+const periodicityMap = {
+ Monthly: t`Monthly`,
+ Quarterly: t`Quarterly`,
+ 'Half Yearly': t`Half Yearly`,
+ Yearly: t`Yearly`,
+};
export default {
- title: 'Balance Sheet',
+ title: t`Balance Sheet`,
method: 'balance-sheet',
filterFields: [
{
fieldtype: 'Date',
fieldname: 'toDate',
size: 'small',
- placeholder: 'ToDate',
+ placeholder: t`To Date`,
label: t`To Date`,
required: 1,
default: async () => {
@@ -18,9 +24,10 @@ export default {
},
{
fieldtype: 'Select',
- placeholder: 'Select Period',
+ placeholder: t`Select Period`,
size: 'small',
- options: ['Monthly', 'Quarterly', 'Half Yearly', 'Yearly'],
+ options: Object.keys(periodicityMap),
+ map: periodicityMap,
label: t`Periodicity`,
fieldname: 'periodicity',
default: 'Monthly',
diff --git a/reports/BankReconciliation/viewConfig.js b/reports/BankReconciliation/viewConfig.js
index f318cedf..9505136a 100644
--- a/reports/BankReconciliation/viewConfig.js
+++ b/reports/BankReconciliation/viewConfig.js
@@ -11,7 +11,7 @@ export default {
fieldtype: 'Link',
target: 'Account',
size: 'small',
- placeholder: 'Payment Account',
+ placeholder: t`Payment Account`,
label: t`Payment Account`,
fieldname: 'paymentAccount',
getFilters: () => {
@@ -26,20 +26,20 @@ export default {
target: 'Party',
size: 'small',
label: t`Party`,
- placeholder: 'Party',
+ placeholder: t`Party`,
fieldname: 'party',
},
{
fieldtype: 'Date',
size: 'small',
- placeholder: 'From Date',
+ placeholder: t`From Date`,
label: t`From Date`,
fieldname: 'fromDate',
},
{
fieldtype: 'Date',
size: 'small',
- placeholder: 'To Date',
+ placeholder: t`To Date`,
label: t`To Date`,
fieldname: 'toDate',
},
diff --git a/reports/GeneralLedger/viewConfig.js b/reports/GeneralLedger/viewConfig.js
index 51f8a3c0..87cd442b 100644
--- a/reports/GeneralLedger/viewConfig.js
+++ b/reports/GeneralLedger/viewConfig.js
@@ -2,7 +2,7 @@ import { partyWithAvatar } from '@/utils';
import { t } from 'frappe';
import getCommonExportActions from '../commonExporter';
-let title = 'General Ledger';
+let title = t`General Ledger`;
const viewConfig = {
title,
@@ -19,13 +19,13 @@ const viewConfig = {
size: 'small',
label: t`Reference Type`,
fieldname: 'referenceType',
- placeholder: 'Reference Type',
+ placeholder: t`Reference Type`,
default: 'All',
},
{
fieldtype: 'DynamicLink',
size: 'small',
- placeholder: 'Reference Name',
+ placeholder: t`Reference Name`,
references: 'referenceType',
label: t`Reference Name`,
fieldname: 'referenceName',
@@ -34,7 +34,7 @@ const viewConfig = {
fieldtype: 'Link',
target: 'Account',
size: 'small',
- placeholder: 'Account',
+ placeholder: t`Account`,
label: t`Account`,
fieldname: 'account',
},
@@ -43,20 +43,20 @@ const viewConfig = {
target: 'Party',
label: t`Party`,
size: 'small',
- placeholder: 'Party',
+ placeholder: t`Party`,
fieldname: 'party',
},
{
fieldtype: 'Date',
size: 'small',
- placeholder: 'From Date',
+ placeholder: t`From Date`,
label: t`From Date`,
fieldname: 'fromDate',
},
{
fieldtype: 'Date',
size: 'small',
- placeholder: 'To Date',
+ placeholder: t`To Date`,
label: t`To Date`,
fieldname: 'toDate',
},
diff --git a/reports/GoodsAndServiceTax/BaseViewConfig.js b/reports/GoodsAndServiceTax/BaseViewConfig.js
index 222d1bee..acc07c86 100644
--- a/reports/GoodsAndServiceTax/BaseViewConfig.js
+++ b/reports/GoodsAndServiceTax/BaseViewConfig.js
@@ -11,7 +11,7 @@ export default {
fieldtype: 'AutoComplete',
label: t`Place`,
size: 'small',
- placeholder: 'Place',
+ placeholder: t`Place`,
fieldname: 'place',
getList: () => stateList,
},
@@ -19,7 +19,7 @@ export default {
fieldtype: 'Date',
label: t`From Date`,
size: 'small',
- placeholder: 'From Date',
+ placeholder: t`From Date`,
fieldname: 'fromDate',
default: () => DateTime.local().minus({ months: 3 }).toISODate(),
},
@@ -27,7 +27,7 @@ export default {
fieldtype: 'Date',
label: t`To Date`,
size: 'small',
- placeholder: 'To Date',
+ placeholder: t`To Date`,
fieldname: 'toDate',
default: () => DateTime.local().toISODate(),
},
diff --git a/reports/GoodsAndServiceTax/GSTR1View.js b/reports/GoodsAndServiceTax/GSTR1View.js
index 67492e62..0fc54224 100644
--- a/reports/GoodsAndServiceTax/GSTR1View.js
+++ b/reports/GoodsAndServiceTax/GSTR1View.js
@@ -13,7 +13,7 @@ const transferTypeMap = {
const transferType = {
fieldtype: 'Select',
label: t`Transfer Type`,
- placeholder: 'Transfer Type',
+ placeholder: t`Transfer Type`,
fieldname: 'transferType',
options: Object.keys(transferTypeMap),
map: transferTypeMap,
@@ -23,7 +23,7 @@ const transferType = {
const actions = [
{
- group: 'Export',
+ group: t`Export`,
label: t`JSON`,
type: 'primary',
action: async (report, filters) => {
@@ -31,7 +31,7 @@ const actions = [
},
},
{
- group: 'Export',
+ group: t`Export`,
label: t`CSV`,
type: 'primary',
action: async (report, filters) => {
diff --git a/reports/GoodsAndServiceTax/GSTR2View.js b/reports/GoodsAndServiceTax/GSTR2View.js
index 70e4527a..62ce9a67 100644
--- a/reports/GoodsAndServiceTax/GSTR2View.js
+++ b/reports/GoodsAndServiceTax/GSTR2View.js
@@ -10,7 +10,7 @@ const transferTypeMap = {
const transferType = {
fieldtype: 'Select',
label: t`Transfer Type`,
- placeholder: 'Transfer Type',
+ placeholder: t`Transfer Type`,
fieldname: 'transferType',
options: Object.keys(transferTypeMap),
map: transferTypeMap,
@@ -20,7 +20,7 @@ const transferType = {
const actions = [
{
- group: 'Export',
+ group: t`Export`,
label: t`CSV`,
type: 'primary',
action: async (report, filters) => {
diff --git a/reports/ProfitAndLoss/viewConfig.js b/reports/ProfitAndLoss/viewConfig.js
index 198ca77d..7be22ccb 100644
--- a/reports/ProfitAndLoss/viewConfig.js
+++ b/reports/ProfitAndLoss/viewConfig.js
@@ -1,8 +1,14 @@
import frappe, { t } from 'frappe';
import getCommonExportActions from '../commonExporter';
-const title = 'Profit and Loss';
+const title = t`Profit and Loss`;
+const periodicityMap = {
+ Monthly: t`Monthly`,
+ Quarterly: t`Quarterly`,
+ 'Half Yearly': t`Half Yearly`,
+ Yearly: t`Yearly`,
+};
export default {
title: title,
method: 'profit-and-loss',
@@ -12,7 +18,7 @@ export default {
fieldtype: 'Date',
fieldname: 'fromDate',
size: 'small',
- placeholder: 'From Date',
+ placeholder: t`From Date`,
label: t`From Date`,
required: 1,
default: async () => {
@@ -23,7 +29,7 @@ export default {
fieldtype: 'Date',
fieldname: 'toDate',
size: 'small',
- placeholder: 'To Date',
+ placeholder: t`To Date`,
label: t`To Date`,
required: 1,
default: async () => {
@@ -33,10 +39,11 @@ export default {
{
fieldtype: 'Select',
size: 'small',
- options: ['Monthly', 'Quarterly', 'Half Yearly', 'Yearly'],
+ options: Object.keys(periodicityMap),
+ map: periodicityMap,
default: 'Monthly',
label: t`Periodicity`,
- placeholder: 'Select Period...',
+ placeholder: t`Select Period...`,
fieldname: 'periodicity',
},
],
diff --git a/reports/PurchaseRegister/viewConfig.js b/reports/PurchaseRegister/viewConfig.js
index a15ab16a..7617bd90 100644
--- a/reports/PurchaseRegister/viewConfig.js
+++ b/reports/PurchaseRegister/viewConfig.js
@@ -11,7 +11,7 @@ export default {
label: t`Supplier Name`,
fieldname: 'supplier',
size: 'small',
- placeholder: 'Supplier Name',
+ placeholder: t`Supplier Name`,
getFilters: (query) => {
if (query)
return {
@@ -28,14 +28,14 @@ export default {
fieldtype: 'Date',
fieldname: 'fromDate',
size: 'small',
- placeholder: 'From Date',
+ placeholder: t`From Date`,
label: t`From Date`,
required: 1,
},
{
fieldtype: 'Date',
size: 'small',
- placeholder: 'To Date',
+ placeholder: t`To Date`,
fieldname: 'toDate',
label: t`To Date`,
required: 1,
diff --git a/reports/SalesRegister/viewConfig.js b/reports/SalesRegister/viewConfig.js
index 622adf33..366f11a7 100644
--- a/reports/SalesRegister/viewConfig.js
+++ b/reports/SalesRegister/viewConfig.js
@@ -10,7 +10,7 @@ export default {
target: 'Party',
label: t`Customer Name`,
size: 'small',
- placeholder: 'Customer Name',
+ placeholder: t`Customer Name`,
fieldname: 'customer',
getFilters: (query) => {
if (query)
@@ -28,14 +28,14 @@ export default {
fieldtype: 'Date',
fieldname: 'fromDate',
size: 'small',
- placeholder: 'From Date',
+ placeholder: t`From Date`,
label: t`From Date`,
required: 1,
},
{
fieldtype: 'Date',
size: 'small',
- placeholder: 'To Date',
+ placeholder: t`To Date`,
fieldname: 'toDate',
label: t`To Date`,
required: 1,
diff --git a/reports/TrialBalance/viewConfig.js b/reports/TrialBalance/viewConfig.js
index 00d219dd..6b7bf7cf 100644
--- a/reports/TrialBalance/viewConfig.js
+++ b/reports/TrialBalance/viewConfig.js
@@ -1,7 +1,7 @@
import frappe, { t } from 'frappe';
import getCommonExportActions from '../commonExporter';
-const title = 'Trial Balance';
+const title = t`Trial Balance`;
export default {
title: title,
@@ -13,7 +13,7 @@ export default {
fieldname: 'fromDate',
label: t`From Date`,
size: 'small',
- placeholder: 'From Date',
+ placeholder: t`From Date`,
required: 1,
default: async () => {
return (await frappe.getSingle('AccountingSettings')).fiscalYearStart;
@@ -22,7 +22,7 @@ export default {
{
fieldtype: 'Date',
size: 'small',
- placeholder: 'To Date',
+ placeholder: t`To Date`,
fieldname: 'toDate',
label: t`To Date`,
required: 1,
diff --git a/reports/commonExporter.js b/reports/commonExporter.js
index 8a59779d..ee0d1f8a 100644
--- a/reports/commonExporter.js
+++ b/reports/commonExporter.js
@@ -95,7 +95,7 @@ async function exportReport(extention, reportName, getReportData) {
export default function getCommonExportActions(reportName) {
return ['csv', 'json'].map((ext) => ({
- group: 'Export',
+ group: frappe.t`Export`,
label: ext.toUpperCase(),
type: 'primary',
action: async (getReportData) =>
diff --git a/src/components/FilterDropdown.vue b/src/components/FilterDropdown.vue
index d6ac2b54..1e8fc5cd 100644
--- a/src/components/FilterDropdown.vue
+++ b/src/components/FilterDropdown.vue
@@ -31,7 +31,7 @@
size="small"
input-class="bg-gray-100"
:df="{
- placeholder: 'Field',
+ placeholder: t`Field`,
fieldname: 'fieldname',
fieldtype: 'Select',
options: fieldOptions,
@@ -45,7 +45,7 @@
size="small"
input-class="bg-gray-100"
:df="{
- placeholder: 'Condition',
+ placeholder: t`Condition`,
fieldname: 'condition',
fieldtype: 'Select',
options: conditions,
@@ -59,7 +59,7 @@
size="small"
input-class="bg-gray-100"
:df="{
- placeholder: 'Value',
+ placeholder: t`Value`,
fieldname: 'value',
fieldtype: 'Data',
}"
@@ -116,11 +116,11 @@
+
- {{ value }}
+ {{ periodSelectorMap[value] }}
@@ -37,6 +45,8 @@