From 98c96b8217856d59439aec47d8b1aa701abf8b49 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Wed, 30 Oct 2024 22:51:41 +0800 Subject: [PATCH] support qpf file extension --- pkg/converters/transaction_data_converters.go | 6 ++++-- src/consts/file.js | 15 ++++++++++----- src/locales/en.json | 3 ++- src/locales/zh_Hans.json | 3 ++- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/pkg/converters/transaction_data_converters.go b/pkg/converters/transaction_data_converters.go index f4d53a57..43bdee6d 100644 --- a/pkg/converters/transaction_data_converters.go +++ b/pkg/converters/transaction_data_converters.go @@ -31,6 +31,10 @@ func GetTransactionDataImporter(fileType string) (base.TransactionDataImporter, return _default.DefaultTransactionDataCSVFileConverter, nil } else if fileType == "ezbookkeeping_tsv" { return _default.DefaultTransactionDataTSVFileConverter, nil + } else if fileType == "ofx" { + return ofx.OFXTransactionDataImporter, nil + } else if fileType == "qfx" { + return ofx.OFXTransactionDataImporter, nil } else if fileType == "qif_ymd" { return qif.QifYearMonthDayTransactionDataImporter, nil } else if fileType == "qif_mdy" { @@ -39,8 +43,6 @@ func GetTransactionDataImporter(fileType string) (base.TransactionDataImporter, return qif.QifDayMonthYearTransactionDataImporter, nil } else if fileType == "iif" { return iif.IifTransactionDataFileImporter, nil - } else if fileType == "ofx" { - return ofx.OFXTransactionDataImporter, nil } else if fileType == "gnucash" { return gnucash.GnuCashTransactionDataImporter, nil } else if fileType == "firefly_iii_csv" { diff --git a/src/consts/file.js b/src/consts/file.js index 3984ef7d..9d934c84 100644 --- a/src/consts/file.js +++ b/src/consts/file.js @@ -22,6 +22,16 @@ const supportedImportFileTypes = [ anchor: 'export-transactions' } }, + { + type: 'ofx', + name: 'Open Financial Exchange (OFX) File', + extensions: '.ofx' + }, + { + type: 'qfx', + name: 'Quicken Financial Exchange (QFX) File', + extensions: '.qfx' + }, { type: 'qif', name: 'Quicken Interchange Format (QIF) File', @@ -46,11 +56,6 @@ const supportedImportFileTypes = [ name: 'Intuit Interchange Format (IIF) File', extensions: '.iif' }, - { - type: 'ofx', - name: 'Open Financial Exchange (OFX) File', - extensions: '.ofx' - }, { type: 'gnucash', name: 'GnuCash XML Database File', diff --git a/src/locales/en.json b/src/locales/en.json index 79c4942f..dc999d1d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -1527,12 +1527,13 @@ "File Type": "File Type", "How to export this file?": "How to export this file?", "ezbookkeeping Data Export File": "ezbookkeeping Data Export File", + "Open Financial Exchange (OFX) File": "Open Financial Exchange (OFX) File", + "Quicken Financial Exchange (QFX) File": "Quicken Financial Exchange (QFX) File", "Quicken Interchange Format (QIF) File": "Quicken Interchange Format (QIF) File", "Year-month-day format": "Year-month-day format", "Month-day-year format": "Month-day-year format", "Day-month-year format": "Day-month-year format", "Intuit Interchange Format (IIF) File": "Intuit Interchange Format (IIF) File", - "Open Financial Exchange (OFX) File": "Open Financial Exchange (OFX) File", "GnuCash XML Database File": "GnuCash XML Database File", "Firefly III Data Export File": "Firefly III Data Export File", "Feidee MyMoney (App) Data Export File": "Feidee MyMoney (App) Data Export File", diff --git a/src/locales/zh_Hans.json b/src/locales/zh_Hans.json index d73b3c0e..f1f80d27 100644 --- a/src/locales/zh_Hans.json +++ b/src/locales/zh_Hans.json @@ -1527,12 +1527,13 @@ "File Type": "文件类型", "How to export this file?": "如何导出该文件?", "ezbookkeeping Data Export File": "ezbookkeeping 数据导出文件", + "Open Financial Exchange (OFX) File": "开放式金融交换 (OFX) 文件", + "Quicken Financial Exchange (QFX) File": "Quicken Financial Exchange (QFX) 文件", "Quicken Interchange Format (QIF) File": "Quicken Interchange Format (QIF) 文件", "Year-month-day format": "年-月-日 格式", "Month-day-year format": "月-日-年 格式", "Day-month-year format": "日-月-年 格式", "Intuit Interchange Format (IIF) File": "Intuit Interchange Format (IIF) 文件", - "Open Financial Exchange (OFX) File": "开放式金融交换 (OFX) 文件", "GnuCash XML Database File": "GnuCash XML 数据库文件", "Firefly III Data Export File": "Firefly III 数据导出文件", "Feidee MyMoney (App) Data Export File": "随手记 (App) 数据导出文件",