|
| 1 | +import type { CatalogSlice } from '../types'; |
| 2 | + |
| 3 | +/** |
| 4 | + * Messages for the slugs raised by DB functions (`raise exception 'slug'`, see |
| 5 | + * the error-slug migration). A slug the catalog does not know falls back to the |
| 6 | + * generic error copy, so a new DB error never shows its raw slug to a user. |
| 7 | + * Values the DB appends to a slug arrive as `{0}`, `{1}`, … in order. |
| 8 | + */ |
| 9 | +export const dbErrorsCatalog: CatalogSlice = { |
| 10 | + en: { |
| 11 | + // Roles and members |
| 12 | + 'db.role-admin-grant-forbidden': 'Only an admin can grant or change the admin role.', |
| 13 | + 'db.role-change-forbidden': 'Only an admin can change your role.', |
| 14 | + 'db.seat-limit-reached': |
| 15 | + 'This company has reached its plan seat limit ({0}). Ask an admin to upgrade.', |
| 16 | + |
| 17 | + // Invites |
| 18 | + 'db.invite-identity-immutable': "An invite's email, role and company cannot be changed.", |
| 19 | + 'db.invite-role-forbidden': 'Only an admin can invite a manager or an admin.', |
| 20 | + |
| 21 | + // Time entries |
| 22 | + 'db.time-entry-invoiced-locked': 'This time entry is already invoiced and can no longer be edited.', |
| 23 | + 'db.capacity-exceeded': 'Monthly capacity exceeded (22 × {0}h).', |
| 24 | + 'db.vacation-allowance-exceeded': 'Vacation allowance exceeded ({0} days per year).', |
| 25 | + 'db.time-net-negative-delete': 'Deleting this entry would leave negative net time for this project month.', |
| 26 | + 'db.time-net-negative-remove': 'Removing this entry would leave negative net time for this project month.', |
| 27 | + 'db.time-net-negative-correction': 'This correction would leave negative net time for this project month.', |
| 28 | + |
| 29 | + // Invoices |
| 30 | + 'db.invoice-company-mismatch': 'This invoice does not belong to its project company.', |
| 31 | + 'db.invoice-foreign-user': 'You cannot write an invoice for another user.', |
| 32 | + 'db.invoice-invalid-project': 'That project is not valid for this invoice.', |
| 33 | + 'db.invoice-freelancer-status-forbidden': 'Freelancers can only draft or submit an invoice.', |
| 34 | + 'db.invoice-settlement-status-reserved': 'Settlement statuses are set by the monthly settlement, not by hand.', |
| 35 | + 'db.invoice-settled-immutable': 'A settled invoice can only be cancelled, not reverted.', |
| 36 | + |
| 37 | + // Projects, revenue and costs |
| 38 | + 'db.project-not-found': 'Project not found.', |
| 39 | + 'db.company-not-found': 'Company not found.', |
| 40 | + 'db.revenue-source-not-found': 'Revenue source not found.', |
| 41 | + 'db.revenue-recognize-forbidden': 'Only a manager can recognize revenue.', |
| 42 | + 'db.revenue-correct-forbidden': 'Only a manager can correct revenue.', |
| 43 | + 'db.revenue-paid-forbidden': 'Only a manager can mark revenue as paid.', |
| 44 | + 'db.revenue-entries-not-found': 'No matching revenue entries.', |
| 45 | + 'db.revenue-entries-multi-company': 'Revenue entries must all belong to the same company.', |
| 46 | + 'db.revenue-net-negative-delete': 'Deleting this entry would leave negative net revenue for this project month.', |
| 47 | + 'db.revenue-net-negative-remove': 'Removing this entry would leave negative net revenue for this project month.', |
| 48 | + 'db.revenue-net-negative-correction': 'This correction would leave negative net revenue for this project month.', |
| 49 | + 'db.project-costs-not-found': 'No matching project costs.', |
| 50 | + 'db.project-costs-multi-company': 'Project costs must all belong to the same company.', |
| 51 | + 'db.project-costs-paid-forbidden': 'Only a manager can mark project costs as paid.', |
| 52 | + 'db.project-cost-reimbursable-not-payable': |
| 53 | + 'A reimbursable cost is settled by reimbursing it, not by marking it paid.', |
| 54 | + 'db.referral-total-exceeded': 'Referral shares cannot exceed 100% for a project (this would reach {0}%).', |
| 55 | + 'db.settle-forbidden': 'Only a manager can settle a project month.', |
| 56 | + |
| 57 | + // Remuneration |
| 58 | + 'db.rem-compute-forbidden': 'Only a manager can compute the remuneration month.', |
| 59 | + 'db.rem-lock-forbidden': 'Only a manager can lock the remuneration month.', |
| 60 | + 'db.rem-month-locked': 'This remuneration month is locked.', |
| 61 | + 'db.rem-month-not-computed': 'This remuneration month has not been computed yet.', |
| 62 | + 'db.rem-license-recipients-invalid': |
| 63 | + 'License distribution needs exactly two license recipients ({0} found).', |
| 64 | + |
| 65 | + // Company settings |
| 66 | + 'db.working-weekdays-empty': 'Pick at least one working day.', |
| 67 | + 'db.working-weekdays-out-of-range': 'Working days must be between Monday and Sunday.', |
| 68 | + 'db.working-weekdays-duplicate': 'A working day cannot be listed twice.', |
| 69 | + 'db.product-pool-project-invalid': 'Pick an active product pool project from this company.', |
| 70 | + }, |
| 71 | + fr: { |
| 72 | + // Rôles et membres |
| 73 | + 'db.role-admin-grant-forbidden': 'Seul un admin peut attribuer ou modifier le rôle admin.', |
| 74 | + 'db.role-change-forbidden': 'Seul un admin peut modifier votre rôle.', |
| 75 | + 'db.seat-limit-reached': |
| 76 | + 'Cette entreprise a atteint la limite de sièges de son forfait ({0}). Demandez à un admin de le faire évoluer.', |
| 77 | + |
| 78 | + // Invitations |
| 79 | + 'db.invite-identity-immutable': |
| 80 | + "L'e-mail, le rôle et l'entreprise d'une invitation ne peuvent pas être modifiés.", |
| 81 | + 'db.invite-role-forbidden': 'Seul un admin peut inviter un manager ou un admin.', |
| 82 | + |
| 83 | + // Saisies de temps |
| 84 | + 'db.time-entry-invoiced-locked': 'Cette saisie est déjà facturée et ne peut plus être modifiée.', |
| 85 | + 'db.capacity-exceeded': 'Capacité mensuelle dépassée (22 × {0} h).', |
| 86 | + 'db.vacation-allowance-exceeded': 'Solde de congés dépassé ({0} jours par an).', |
| 87 | + 'db.time-net-negative-delete': |
| 88 | + 'Supprimer cette saisie rendrait le temps net négatif pour ce mois de projet.', |
| 89 | + 'db.time-net-negative-remove': |
| 90 | + 'Retirer cette saisie rendrait le temps net négatif pour ce mois de projet.', |
| 91 | + 'db.time-net-negative-correction': |
| 92 | + 'Cette correction rendrait le temps net négatif pour ce mois de projet.', |
| 93 | + |
| 94 | + // Factures |
| 95 | + 'db.invoice-company-mismatch': "Cette facture n'appartient pas à l'entreprise de son projet.", |
| 96 | + 'db.invoice-foreign-user': 'Vous ne pouvez pas créer de facture pour un autre utilisateur.', |
| 97 | + 'db.invoice-invalid-project': "Ce projet n'est pas valide pour cette facture.", |
| 98 | + 'db.invoice-freelancer-status-forbidden': |
| 99 | + 'Un freelance peut seulement mettre une facture en brouillon ou la soumettre.', |
| 100 | + 'db.invoice-settlement-status-reserved': |
| 101 | + 'Les statuts de règlement sont définis par le règlement mensuel, pas manuellement.', |
| 102 | + 'db.invoice-settled-immutable': 'Une facture réglée peut seulement être annulée, pas rétablie.', |
| 103 | + |
| 104 | + // Projets, revenus et coûts |
| 105 | + 'db.project-not-found': 'Projet introuvable.', |
| 106 | + 'db.company-not-found': 'Entreprise introuvable.', |
| 107 | + 'db.revenue-source-not-found': 'Source de revenu introuvable.', |
| 108 | + 'db.revenue-recognize-forbidden': 'Seul un manager peut constater du revenu.', |
| 109 | + 'db.revenue-correct-forbidden': 'Seul un manager peut corriger un revenu.', |
| 110 | + 'db.revenue-paid-forbidden': 'Seul un manager peut marquer un revenu comme payé.', |
| 111 | + 'db.revenue-entries-not-found': 'Aucune écriture de revenu correspondante.', |
| 112 | + 'db.revenue-entries-multi-company': |
| 113 | + 'Les écritures de revenu doivent toutes appartenir à la même entreprise.', |
| 114 | + 'db.revenue-net-negative-delete': |
| 115 | + 'Supprimer cette écriture rendrait le revenu net négatif pour ce mois de projet.', |
| 116 | + 'db.revenue-net-negative-remove': |
| 117 | + 'Retirer cette écriture rendrait le revenu net négatif pour ce mois de projet.', |
| 118 | + 'db.revenue-net-negative-correction': |
| 119 | + 'Cette correction rendrait le revenu net négatif pour ce mois de projet.', |
| 120 | + 'db.project-costs-not-found': 'Aucun coût de projet correspondant.', |
| 121 | + 'db.project-costs-multi-company': |
| 122 | + 'Les coûts de projet doivent tous appartenir à la même entreprise.', |
| 123 | + 'db.project-costs-paid-forbidden': |
| 124 | + 'Seul un manager peut marquer des coûts de projet comme payés.', |
| 125 | + 'db.project-cost-reimbursable-not-payable': |
| 126 | + 'Un coût remboursable se règle par un remboursement, pas en le marquant payé.', |
| 127 | + 'db.referral-total-exceeded': |
| 128 | + "Les parts d'apport d'affaires ne peuvent pas dépasser 100 % sur un projet (ce changement atteindrait {0} %).", |
| 129 | + 'db.settle-forbidden': 'Seul un manager peut clôturer un mois de projet.', |
| 130 | + |
| 131 | + // Rémunération |
| 132 | + 'db.rem-compute-forbidden': 'Seul un manager peut calculer le mois de rémunération.', |
| 133 | + 'db.rem-lock-forbidden': 'Seul un manager peut verrouiller le mois de rémunération.', |
| 134 | + 'db.rem-month-locked': 'Ce mois de rémunération est verrouillé.', |
| 135 | + 'db.rem-month-not-computed': "Ce mois de rémunération n'a pas encore été calculé.", |
| 136 | + 'db.rem-license-recipients-invalid': |
| 137 | + 'La répartition de licence nécessite exactement deux bénéficiaires ({0} trouvés).', |
| 138 | + |
| 139 | + // Paramètres d'entreprise |
| 140 | + 'db.working-weekdays-empty': 'Choisissez au moins un jour travaillé.', |
| 141 | + 'db.working-weekdays-out-of-range': 'Les jours travaillés doivent être compris entre lundi et dimanche.', |
| 142 | + 'db.working-weekdays-duplicate': 'Un jour travaillé ne peut pas être listé deux fois.', |
| 143 | + 'db.product-pool-project-invalid': 'Choisissez un projet de pool produit actif de cette entreprise.', |
| 144 | + }, |
| 145 | +}; |
0 commit comments