mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-02 17:26:24 +00:00
6a3d4b1281
Attaching a receipt no longer lets the budget domain delete one. Trashing the file was reachable from the REST route, the MCP tool and the plugin RPC, none of which check file_delete, and a receipt id is any file on the trip, so anyone who could edit an expense could trash a document they were not allowed to touch. A concurrent edit could do it by accident: the client sends the full set of receipt ids from a snapshot taken when the form opened, so saving an expense someone else had just attached a file to moved that file to the trash. Removing a receipt now removes the link and nothing else. The link row is treated as shared, because it is. One row can tie a file to a place and to an expense at once, so the sync clears only the receipt half and leaves the rest, the foreign key is SET NULL rather than CASCADE, and a receipt already in the trash keeps its link so restoring it comes back attached. The upload and its rollback moved into one module both shells call. It was copied into six places, and all six rolled back with the permanent-delete route, which only accepts a file that is already in the trash and therefore answered 404 every time: a failed save left every uploaded file on the trip, attached to the expense, and the next attempt uploaded another copy. It now trashes first, keeps the pending files for the retry, and says so when a file could not be removed instead of swallowing it. Escape in the receipt viewer no longer closes the expense form behind it, the download fallback uses a real accent class rather than a utility that does not exist, and the upload indicator is actually switched on. Tests: the receipt link behaviour on both service paths, the four new branches in the files service, the upload module, and the viewer.
159 lines
7.4 KiB
TypeScript
159 lines
7.4 KiB
TypeScript
import type { TranslationStrings } from '../types';
|
||
|
||
const budget: TranslationStrings = {
|
||
'costs.confirm.deleteTitle': 'この支出を削除しますか?',
|
||
'costs.confirm.deleteBody': '「{name}」は完全に削除されます。',
|
||
'budget.title': '予算',
|
||
'budget.exportCsv': 'CSVを書き出し',
|
||
'budget.emptyTitle': '予算はまだありません',
|
||
'budget.emptyText': 'カテゴリと項目を作成して旅行予算を計画しましょう',
|
||
'budget.emptyPlaceholder': 'カテゴリ名を入力...',
|
||
'budget.createCategory': 'カテゴリを作成',
|
||
'budget.category': 'カテゴリ',
|
||
'budget.categoryName': 'カテゴリ名',
|
||
'budget.table.name': '名前',
|
||
'budget.table.total': '合計',
|
||
'budget.table.persons': '人数',
|
||
'budget.table.days': '日数',
|
||
'budget.table.perPerson': '1人あたり',
|
||
'budget.table.perDay': '1日あたり',
|
||
'budget.table.perPersonDay': '人/日',
|
||
'budget.table.note': 'メモ',
|
||
'budget.table.date': '日付',
|
||
'budget.newEntry': '新しい項目',
|
||
'budget.defaultEntry': '新しい項目',
|
||
'budget.defaultCategory': '新しいカテゴリ',
|
||
'budget.total': '合計',
|
||
'budget.totalBudget': '総予算',
|
||
'budget.byCategory': 'カテゴリ別',
|
||
'budget.editTooltip': 'クリックして編集',
|
||
'budget.linkedToReservation': '予約に連携中 — 名前はそちらで編集してください',
|
||
'budget.confirm.deleteCategory': '{count}件の項目があるカテゴリ「{name}」を削除しますか?',
|
||
'budget.deleteCategory': 'カテゴリを削除',
|
||
'budget.perPerson': '1人あたり',
|
||
'budget.paid': '支払済み',
|
||
'budget.open': '未精算',
|
||
'budget.noMembers': 'メンバー未割り当て',
|
||
'budget.settlement': '精算',
|
||
'budget.settlementInfo':
|
||
'予算項目のメンバーアイコンをクリックして緑にすると、支払い済みを示します。精算では、誰が誰にいくら支払うべきかを表示します。',
|
||
'budget.netBalances': '差引残高',
|
||
'budget.categoriesLabel': 'カテゴリ',
|
||
'costs.you': '自分',
|
||
'costs.youShort': 'Y',
|
||
'costs.youLower': 'you',
|
||
'costs.youOwe': '支払う額',
|
||
'costs.youOweSub': '他の人に支払うべき額',
|
||
'costs.youreOwed': '受け取る額',
|
||
'costs.youreOwedSub': '他の人があなたに支払うべき額',
|
||
'costs.totalSpend': '旅行の合計支出',
|
||
'costs.totalSpendSub': '全員の合計',
|
||
'costs.to': '支払先',
|
||
'costs.from': '支払元',
|
||
'costs.allSettled': 'すべて精算済みです',
|
||
'costs.nothingOwed': '受け取る額はありません',
|
||
'costs.yourShare': 'あなたの負担分',
|
||
'costs.youPaid': 'あなたが支払った額',
|
||
'costs.outstanding': '未精算の金額',
|
||
'costs.outstandingSub': '支払者が未設定の支出',
|
||
'costs.outstandingItems': '件の支出に支払者が必要',
|
||
'costs.expenses': '支出',
|
||
'costs.entries': '{count}件',
|
||
'costs.searchPlaceholder': '支出を検索…',
|
||
'costs.filter.all': 'すべて',
|
||
'costs.filter.mine': '自分が支払った分',
|
||
'costs.filter.owed': '受け取る分',
|
||
'costs.addExpense': '支出を追加',
|
||
'costs.editExpense': '支出を編集',
|
||
'costs.noMatch': '検索条件に一致する支出はありません。',
|
||
'costs.emptyText': '支出はまだありません。最初の支出を追加しましょう。',
|
||
'costs.spent': '{amount}を支出',
|
||
'costs.noDate': '日付なし',
|
||
'costs.noOnePaid': 'まだ誰も支払っていません',
|
||
'costs.youLent': '{amount}を立て替えました',
|
||
'costs.youBorrowed': '{amount}を借りています',
|
||
'costs.settleUp': '精算する',
|
||
'costs.history': '履歴',
|
||
'costs.everyoneSquare': '全員が清算済みです',
|
||
'costs.nothingOutstanding': '現在、未払いの支払いはありません。',
|
||
'costs.pay': '支払う',
|
||
'costs.pays': '支払う',
|
||
'costs.settle': '精算',
|
||
'costs.balances': '残高',
|
||
'costs.byCategory': 'カテゴリ別',
|
||
'costs.noCategories': '支出はまだありません。',
|
||
'costs.settleHistory': '精算履歴',
|
||
'costs.noSettlements': '精算済みの支払いはまだありません。',
|
||
'costs.paymentsSettled': '{count}件の支払いを精算済み',
|
||
'costs.paid': '支払済み',
|
||
'costs.undo': '元に戻す',
|
||
'costs.whatFor': '何の支出ですか?',
|
||
'costs.namePlaceholder': '例:夕食、お土産、ガソリン…',
|
||
'costs.note': 'メモ',
|
||
'costs.notePlaceholder': '内訳や立て替えのメモなど…',
|
||
'costs.addNote': 'メモを追加',
|
||
'costs.showNote': 'メモを表示',
|
||
'costs.hideNote': 'メモを非表示',
|
||
'costs.totalAmount': '合計金額',
|
||
'costs.currency': '通貨',
|
||
'costs.day': '日',
|
||
'costs.rateLabel': '1 {from} = {to}',
|
||
'costs.category': 'カテゴリ',
|
||
'costs.whoPaid': '誰が支払いましたか?',
|
||
'costs.multiplePayers': '複数人が支払い',
|
||
'costs.singlePayer': '1人が支払い',
|
||
'costs.payersUnbalanced': '支払者の金額の合計は {amount} である必要があります',
|
||
'costs.splitBetween': '均等に分割する相手',
|
||
'costs.pickSomeone': '分割する相手を少なくとも1人選んでください。',
|
||
'costs.splitSummary': '{count}人で分割 · 各{amount}',
|
||
'costs.cat.accommodation': '宿泊',
|
||
'costs.cat.food': '飲食',
|
||
'costs.cat.groceries': '食料品',
|
||
'costs.cat.transport': '交通',
|
||
'costs.cat.flights': '航空券',
|
||
'costs.cat.activities': 'アクティビティ',
|
||
'costs.cat.sightseeing': '観光',
|
||
'costs.cat.shopping': '買い物',
|
||
'costs.cat.fees': '手数料・チケット',
|
||
'costs.cat.health': '健康',
|
||
'costs.cat.tips': 'チップ',
|
||
'costs.cat.fuel': '燃料',
|
||
'costs.cat.parking': '駐車場',
|
||
'costs.cat.other': 'その他',
|
||
'costs.daysCount': '{count}日間',
|
||
'costs.travelers': '{count}人の旅行者',
|
||
'costs.liveRate': 'リアルタイムレート',
|
||
'costs.settleAll': 'すべて精算',
|
||
'costs.payment': '支払い',
|
||
'costs.editPayment': '支払いを編集',
|
||
'costs.addPayment': '支払いを追加',
|
||
'costs.unfinished': '未完了',
|
||
'costs.unfinishedHint': '合計のみ — 未精算',
|
||
'costs.tapToInclude': 'タップして追加',
|
||
'costs.amount': '金額',
|
||
'costs.split': 'Split',
|
||
'costs.splitEqually': 'Equally',
|
||
'costs.splitCustom': 'Custom',
|
||
'costs.splitTicket': 'Ticket',
|
||
'costs.filter.allCategories': 'すべてのカテゴリー',
|
||
'costs.filter.allDays': 'すべての日',
|
||
'costs.expensesCount': '{count}件の支出',
|
||
'costs.ticketItemName': '品目名',
|
||
'costs.ticketSplitting': '分割:',
|
||
'costs.ticketAddItem': '品目を追加',
|
||
'costs.ticketShares': '一人あたりの負担',
|
||
'costs.excluded': '対象外',
|
||
'costs.splitBalanced': '分割は合計と一致しています',
|
||
'costs.splitSumUnder': '分割の合計: {total} のうち {sum}({diff} 不足)',
|
||
'costs.splitSumOver': '分割の合計: {total} のうち {sum}({diff} 超過)',
|
||
'costs.toggleSign': '支出と返金を切り替える',
|
||
'costs.receipts': 'レシート',
|
||
'costs.receiptsTitle': 'レシート・請求書',
|
||
'costs.attachReceipt': 'レシート・請求書を添付',
|
||
'costs.noReceipts': '添付されたレシートはありません',
|
||
'costs.deleteReceipt': 'レシートを削除',
|
||
'costs.viewReceipt': 'レシートを表示',
|
||
'costs.receiptLeftBehind': '保存に失敗し、アップロード済みの領収書が {count} 件残っています。ファイルタブで削除してください。',
|
||
};
|
||
export default budget;
|