support custom script to process delimiter-separated values (data) file / data

This commit is contained in:
MaysWind
2025-09-15 00:21:13 +08:00
parent 538d2b8205
commit c75fdfea1c
20 changed files with 1007 additions and 13 deletions
+36
View File
@@ -117,6 +117,7 @@
"youHaveAccounts": "{count}アカウントを記録しました",
"addNewTag": "新しいタグ\"{tag}\"を追加しました",
"clickToSelectedFile": "クリックしてインポートファイルを選択します({extensions}",
"previewCount": "Preview Count: {count}",
"selectedCount": "{count} / {totalCount}を選択",
"youHaveUpdatedTransactions": "{count}件の取引を更新しました",
"confirmImportTransactions": "本当に{count}件の取引をインポートしますか?",
@@ -134,6 +135,7 @@
"defaultExportReconciliationStatementsFileName": "ezBookkeeping_reconciliation_statements",
"exportReconciliationStatementsFileName": "ezBookkeeping_{nickname}_reconciliation_statements",
"defaultImportDataMappingFileName": "ezBookkeeping_import_data_mapping",
"defaultImportHandlingScript": "ezBookkeeping_handling_script",
"defaultImportReplaceRuleFileName": "ezBookkeeping_import_replace_rule"
},
"calendar": {
@@ -1217,6 +1219,7 @@
"invalid amount expression": "Amount expression is invalid",
"invalid xml file": "Invalid XML file",
"invalid mt940 file": "Invalid MT940 file",
"invalid json file": "Invalid JSON file",
"user custom exchange rate data not found": "User custom exchange rate data is not found",
"cannot update exchange rate data for base currency": "Cannot update exchange rate data for base currency",
"cannot delete exchange rate data for base currency": "Cannot delete exchange rate data for base currency",
@@ -1349,6 +1352,26 @@
}
}
},
"sample": {
"importTransactionCustomScript": {
"headerComment": "Example script:",
"functionDescription": "The parse function will be called for each row of the parsed file data, and the function name must be 'parse'",
"functionParamRowDescription": "An array of string, each element is a column value",
"functionParamIndexDescription": "The row index (0-based)",
"functionReturnDescription": "An object representing a transaction (with the fields defined below), or null to skip this row",
"fieldTimeDescription": "[required] Transaction time, format: YYYY-MM-DD HH:mm:ss",
"fieldUtcOffsetDescription": "[required] Transaction timezone offset in minutes, e.g. '480' for UTC+8, '-300' for UTC-5",
"fieldTypeDescription": "[required] Transaction type, must be one of 'TransactionType.Income', 'TransactionType.Expense' or 'TransactionType.Transfer'",
"fieldCategoryNameDescription": "[optional] Category name",
"fieldSourceAccountNameDescription": "[optional] Source account name",
"fieldDestinationAccountNameDescription": "[optional] Destination account name (for transfer type only)",
"fieldSourceAmountDescription": "[required] Source amount",
"fieldDestinationAmountDescription": "[optional] Destination amount (for transfer type only)",
"fieldGeoLocationDescription": "[optional] Geolocation, format: 'longitude latitude', e.g. '116.3912972 39.9057136'",
"fieldTagNamesDescription": "[optional] Comma separated tag names, e.g. 'tag1;tag2;tag3'",
"fieldCommentDescription": "[optional] Description"
}
},
"OK": "OK",
"Cancel": "キャンセル",
"Operation": "操作",
@@ -1777,6 +1800,11 @@
"Alipay (Web) Statement File": "Alipay (Web) Statement File",
"WeChat Pay Statement File": "WeChat Pay Statement File",
"JD.com Finance Statement File": "JD.com Finance Statement File",
"Handling Method": "Handling Method",
"Column Mapping": "Column Mapping",
"Custom Script": "Custom Script",
"Execute Custom Script": "Execute Custom Script",
"Execute Custom Script to Parse Data": "Execute Custom Script to Parse Data",
"Data File": "データファイル",
"Data to import": "インポートするデータ",
"Please select a file to import": "インポートするファイルを選択してください",
@@ -1799,6 +1827,14 @@
"Load Data Mapping File": "Load Data Mapping File",
"Save Data Mapping File": "Save Data Mapping File",
"Data mapping file is invalid": "Data mapping file is invalid",
"Load Script File": "Load Script File",
"Save Script File": "Save Script File",
"Cannot load script file": "Cannot load script file",
"No Preview Result": "No Preview Result",
"Please execute the custom script first": "Please execute the custom script first",
"Executing Script...": "Executing Script...",
"No parse function defined": "No parse function defined",
"Failed to execute custom script": "Failed to execute custom script",
"Batch Replace Selected Expense Categories": "バッチは選択した支出カテゴリを置き換えます",
"Batch Replace Selected Income Categories": "バッチは選択した収入カテゴリを置き換えます",
"Batch Replace Selected Transfer Categories": "バッチは選択した振替カテゴリを置き換えます",