Files
TREK/shared/src/i18n/gr/budget.ts
T
Maurice 6a3d4b1281 fix(budget): stop receipts deleting files, and share the upload path
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.
2026-09-08 23:15:26 +02:00

160 lines
9.4 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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': 'Ανά Άτομο',
'budget.table.perDay': 'Ανά Ημέρα',
'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':
'Είστε σίγουροι ότι θέλετε να διαγράψετε την κατηγορία "{name}" με {count} εγγραφές;',
'budget.deleteCategory': 'Διαγραφή Κατηγορίας',
'budget.perPerson': 'Ανά Άτομο',
'budget.paid': 'Πληρωμένο',
'budget.open': 'Ανοιχτό',
'budget.noMembers': 'Δεν έχουν ανατεθεί μέλη',
'budget.settlement': 'Εκκαθάριση',
'budget.settlementInfo':
'Κάντε κλικ στο avatar ενός μέλους σε μια εγγραφή προϋπολογισμού για να το επισημάνετε πράσινο — αυτό σημαίνει ότι πλήρωσε. Η εκκαθάριση δείχνει στη συνέχεια ποιος χρωστάει σε ποιον και πόσα.',
'budget.netBalances': 'Καθαρά Υπόλοιπα',
'budget.categoriesLabel': 'κατηγορίες',
'costs.you': 'Εσείς',
'costs.youShort': 'Ε',
'costs.youLower': 'εσείς',
'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': 'Πλήρωσε ένα άτομο',
'costs.payersUnbalanced': 'Τα ποσά των πληρωτών πρέπει να αθροίζουν σε {amount}',
'costs.splitBetween': 'Ισόποση κατανομή μεταξύ',
'costs.pickSomeone': 'Επιλέξτε τουλάχιστον ένα άτομο για τον διαμοιρασμό.',
'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': 'Άθροισμα μεριδίων: {sum} από {total} (λείπουν {diff})',
'costs.splitSumOver': 'Άθροισμα μεριδίων: {sum} από {total} ({diff} παραπάνω)',
'costs.toggleSign': 'Εναλλαγή μεταξύ εξόδου και επιστροφής',
'costs.receipts': 'Αποδείξεις',
'costs.receiptsTitle': 'Αποδείξεις & Τιμολόγια',
'costs.attachReceipt': 'Επισύναψη απόδειξης / τιμολογίου',
'costs.noReceipts': 'Δεν υπάρχουν συνημμένες αποδείξεις',
'costs.deleteReceipt': 'Αφαίρεση απόδειξης',
'costs.viewReceipt': 'Προβολή απόδειξης',
'costs.receiptLeftBehind': 'Η αποθήκευση απέτυχε και {count} ανεβασμένες αποδείξεις παραμένουν. Διαγράψτε τες στην καρτέλα Αρχεία.',
};
export default budget;