diff --git a/lib/l10n/app_en.arb b/lib/l10n/app_en.arb index 9d5ffbde6..e236607ab 100644 --- a/lib/l10n/app_en.arb +++ b/lib/l10n/app_en.arb @@ -1,6 +1,4 @@ { - "moduleCentralassociation": "Centralassociation", - "moduleCentralassociationDescription": "Aggregator of association links", "adminAccountTypes": "Account types", "adminAdd": "Add", "adminAddAssociation": "Add association", @@ -783,6 +781,8 @@ "moduleBookingDescription": "Book a room", "moduleCalendar": "Calendar", "moduleCalendarDescription": "View the calendar of events", + "moduleCentralassociation": "Centralassociation", + "moduleCentralassociationDescription": "Aggregator of association links", "moduleCentralisation": "Centralisation", "moduleCentralisationDescription": "Viw all links", "moduleCinema": "Cinema", @@ -842,6 +842,7 @@ "paiementAccessPage": "Access the page", "paiementAdd": "Add", "paiementAddedSeller": "Seller added", + "paiementAddFunds": "Add Funds", "paiementAddingSellerError": "Error while adding seller", "paiementAddingStoreError": "Error while adding the store", "paiementAddSeller": "Add seller", @@ -871,6 +872,9 @@ "paiementCanSeeHistory": "Can view history", "paiementCantLaunchURL": "Can't open link", "paiementClose": "Close", + "paiementCompletePayment": "Complete payment", + "paiementConfirmPayment": "Confirm Payment", + "paiementConfirmYourPurchase": "Confirm your purchase", "paiementCreate": "Create", "paiementCreateInvoice": "Create new invoice", "paiementDecline": "Decline", @@ -923,6 +927,8 @@ "paiementGetTransactionsError": "Error while retrieving transactions: ", "paiementHandOver": "Handover", "paiementHistory": "History", + "paiementHurryUp": "Hurry up!", + "paiementInsufficientFunds": "Insufficient Funds", "paiementInvoiceCreatedSuccessfully": "Invoice created successfully", "paiementInvoices": "Invoices", "paiementInvoicesPerPage": "{quantity} invoices/page", @@ -959,15 +965,15 @@ "paiementPaid": "Paid", "paiementPay": "Pay", "paiementPayment": "Payment", + "paiementPaymentCanceled": "Payment canceled", + "paiementPaymentRequest": "Payment request", + "paiementPaymentRequestAccepted": "Payment request accepted", + "paiementPaymentRequestError": "Error processing payment request", + "paiementPaymentRequestRefused": "Payment request refused", + "paiementPaymentSuccessful": "Payment successful!", "paiementPayWithHA": "Pay with HelloAsso", "paiementPending": "Pending", "paiementPersonalBalance": "Personal balance", - "paiementAddFunds": "Add Funds", - "paiementInsufficientFunds": "Insufficient Funds", - "paiementTimeRemaining": "Time Remaining", - "paiementHurryUp": "Hurry up!", - "paiementCompletePayment": "Complete payment", - "paiementConfirmPayment": "Confirm Payment", "paiementPleaseAcceptPopup": "Please allow popups", "paiementPleaseAcceptTOS": "Please accept the Terms of Service.", "paiementPleaseAddDevice": "Please add this device to pay", @@ -981,6 +987,7 @@ "paiementRefund": "Refund", "paiementRefundAction": "Refund", "paiementRefundedThe": "Refunded on", + "paiementRefuse": "Refuse", "paiementRevokeDevice": "Revoke device?", "paiementRevokeDeviceDescription": "You will no longer be able to use this device for payments", "paiementRightsOf": "Rights of", @@ -1014,20 +1021,11 @@ } }, "paiementSuccededTransaction": "Successful payment", - "paiementConfirmYourPurchase": "Confirm your purchase", - "paiementYourBalance": "Your balance", - "paiementPaymentSuccessful": "Payment successful!", - "paiementPaymentCanceled": "Payment canceled", - "paiementPaymentRequest": "Payment request", - "paiementPaymentRequestAccepted": "Payment request accepted", - "paiementPaymentRequestRefused": "Payment request refused", - "paiementPaymentRequestError": "Error processing payment request", - "paiementAccept": "Accept", - "paiementRefuse": "Refuse", "paiementSuccessfullyAddedStore": "Store successfully added", "paiementSuccessfullyModifiedStore": "Store successfully updated", "paiementThe": "The", "paiementThisDevice": "(this device)", + "paiementTimeRemaining": "Time Remaining", "paiementTopUp": "Top-up", "paiementTopUpAction": "Top-up", "paiementTotalDuringPeriod": "Total during the period", @@ -1042,6 +1040,7 @@ "paiementUnknownDevice": "Unknown device", "paiementValidUntil": "Valid until", "paiementYouAreTransferingStructureTo": "You are about to transfer the structure to ", + "paiementYourBalance": "Your balance", "phAdd": "Add", "phAdded": "Added", "phAddingFileError": "Add error", @@ -1655,4 +1654,4 @@ "voteVoteSuccess": "Vote recorded", "voteWarning": "Warning", "voteWarningMessage": "Selection will not be saved.\nDo you want to continue?" -} +} \ No newline at end of file diff --git a/lib/l10n/app_fr.arb b/lib/l10n/app_fr.arb index fd367ca05..7e2a4ccaf 100644 --- a/lib/l10n/app_fr.arb +++ b/lib/l10n/app_fr.arb @@ -1,6 +1,4 @@ { - "moduleCentralassociation": "Centralassociation", - "moduleCentralassociationDescription": "Agrégateur des liens des associations", "adminAccountTypes": "Types de compte", "adminAdd": "Ajouter", "adminAddAssociation": "Ajouter une association", @@ -791,6 +789,8 @@ "moduleBookingDescription": "Gérer les réservations, les salles et les managers", "moduleCalendar": "Calendrier", "moduleCalendarDescription": "Consulter les événements et les activités", + "moduleCentralassociation": "Centralassociation", + "moduleCentralassociationDescription": "Agrégateur des liens des associations", "moduleCentralisation": "Centralisation", "moduleCentralisationDescription": "Gérer la centralisation des données", "moduleCinema": "Cinéma", @@ -850,6 +850,7 @@ "paiementAccessPage": "Accéder à la page", "paiementAdd": "Ajouter", "paiementAddedSeller": "Vendeur ajouté", + "paiementAddFunds": "Ajouter des fonds", "paiementAddingSellerError": "Erreur lors de l'ajout du vendeur", "paiementAddingStoreError": "Erreur lors de l'ajout du magasin", "paiementAddSeller": "Ajouter un vendeur", @@ -879,6 +880,9 @@ "paiementCanSeeHistory": "Peut voir l'historique", "paiementCantLaunchURL": "Impossible d'ouvrir le lien", "paiementClose": "Fermer", + "paiementCompletePayment": "Finaliser le paiement", + "paiementConfirmPayment": "Confirmer le paiement", + "paiementConfirmYourPurchase": "Confirmer votre achat", "paiementCreate": "Créer", "paiementCreateInvoice": "Créer une facture", "paiementDecline": "Refuser", @@ -931,6 +935,8 @@ "paiementGetTransactionsError": "Erreur lors de la récupération des transactions : ", "paiementHandOver": "Passation", "paiementHistory": "Historique", + "paiementHurryUp": "Dépêchez-vous !", + "paiementInsufficientFunds": "Fonds insuffisants", "paiementInvoiceCreatedSuccessfully": "Facture créée avec succès", "paiementInvoices": "Factures", "paiementInvoicesPerPage": "{quantity} factures/page", @@ -967,15 +973,15 @@ "paiementPaid": "Payé", "paiementPay": "Payer", "paiementPayment": "Paiement", + "paiementPaymentCanceled": "Paiement annulé", + "paiementPaymentRequest": "Demande de paiement", + "paiementPaymentRequestAccepted": "Demande de paiement acceptée", + "paiementPaymentRequestError": "Erreur lors du traitement de la demande", + "paiementPaymentRequestRefused": "Demande de paiement refusée", + "paiementPaymentSuccessful": "Paiement réussi !", "paiementPayWithHA": "Payer avec HelloAsso", "paiementPending": "En attente", "paiementPersonalBalance": "Solde personnel", - "paiementAddFunds": "Ajouter des fonds", - "paiementInsufficientFunds": "Fonds insuffisants", - "paiementTimeRemaining": "Temps restant", - "paiementHurryUp": "Dépêchez-vous !", - "paiementCompletePayment": "Finaliser le paiement", - "paiementConfirmPayment": "Confirmer le paiement", "paiementPleaseAcceptPopup": "Veuillez autoriser les popups", "paiementPleaseAcceptTOS": "Veuillez accepter les Conditions Générales d'Utilisation.", "paiementPleaseAddDevice": "Veuillez ajouter cet appareil pour payer", @@ -989,6 +995,7 @@ "paiementRefund": "Remboursement", "paiementRefundAction": "Rembourser", "paiementRefundedThe": "Remboursé le", + "paiementRefuse": "Refuser", "paiementRevokeDevice": "Révoquer l'appareil ?", "paiementRevokeDeviceDescription": "Vous ne pourrez plus utiliser cet appareil pour les paiements", "paiementRightsOf": "Droits de", @@ -1022,20 +1029,11 @@ } }, "paiementSuccededTransaction": "Paiement réussi", - "paiementConfirmYourPurchase": "Confirmer votre achat", - "paiementYourBalance": "Votre solde", - "paiementPaymentSuccessful": "Paiement réussi !", - "paiementPaymentCanceled": "Paiement annulé", - "paiementPaymentRequest": "Demande de paiement", - "paiementPaymentRequestAccepted": "Demande de paiement acceptée", - "paiementPaymentRequestRefused": "Demande de paiement refusée", - "paiementPaymentRequestError": "Erreur lors du traitement de la demande", - "paiementAccept": "Accepter", - "paiementRefuse": "Refuser", "paiementSuccessfullyAddedStore": "Magasin ajoutée avec succès", "paiementSuccessfullyModifiedStore": "Magasin modifiée avec succès", "paiementThe": "Le", "paiementThisDevice": "(cet appareil)", + "paiementTimeRemaining": "Temps restant", "paiementTopUp": "Recharge", "paiementTopUpAction": "Recharger", "paiementTotalDuringPeriod": "Total sur la période", @@ -1050,6 +1048,7 @@ "paiementUnknownDevice": "Appareil inconnu", "paiementValidUntil": "Valide jusqu'à", "paiementYouAreTransferingStructureTo": "Vous êtes sur le point de transférer la structure à ", + "paiementYourBalance": "Votre solde", "phAdd": "Ajouter", "phAdded": "Ajouté", "phAddingFileError": "Erreur d'ajout", @@ -1662,4 +1661,4 @@ "voteVoteSuccess": "Vote enregistré", "voteWarning": "Attention", "voteWarningMessage": "La sélection ne sera pas sauvegardée.\nVoulez-vous continuer ?" -} +} \ No newline at end of file diff --git a/lib/l10n/sort_arb.dart b/lib/l10n/sort_arb.dart new file mode 100644 index 000000000..3db35354d --- /dev/null +++ b/lib/l10n/sort_arb.dart @@ -0,0 +1,29 @@ +import 'dart:convert'; +import 'dart:io'; + +void main() async { + final fileNames = ["app_en.arb", "app_fr.arb"]; + + for (final fileName in fileNames) { + final file = File("lib/l10n/$fileName"); + final content = + jsonDecode(await file.readAsString()) as Map; + + final sortedKeys = content.keys.toList() + ..sort((a, b) { + final keyA = + a.toLowerCase().replaceAll("@", "") + + (a.startsWith("@") ? "a" : ""); + final keyB = + b.toLowerCase().replaceAll("@", "") + + (b.startsWith("@") ? "a" : ""); + return keyA.compareTo(keyB); + }); + + final sortedContent = {for (final key in sortedKeys) key: content[key]}; + + await file.writeAsString( + const JsonEncoder.withIndent(' ').convert(sortedContent), + ); + } +} diff --git a/lib/l10n/sort_arb.py b/lib/l10n/sort_arb.py deleted file mode 100644 index 8d799cd4d..000000000 --- a/lib/l10n/sort_arb.py +++ /dev/null @@ -1,20 +0,0 @@ -import json - -file_names = [ - "app_en.arb", - "app_fr.arb", -] -for file_name in file_names: - with open(f"lib/l10n/{file_name}", "r", encoding="utf-8") as f: - content: dict = json.load(f) - sorted_content = dict( - sorted( - content.items(), - key=lambda item: ( - item[0].lower().replace("@", "") - + ("a" if item[0].startswith("@") else "") - ), - ) - ) - with open(f"lib/l10n/{file_name}", "w", encoding="utf-8") as f: - json.dump(sorted_content, f, ensure_ascii=False, indent=2) diff --git a/pubspec.yaml b/pubspec.yaml index a13db3148..e503d32da 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,6 +6,9 @@ version: 3.0.0+197 minimal_hyperion_version: 6.0.0 +scripts: + sort-arb: dart run .\lib\l10n\sort_arb.dart + environment: sdk: ^3.10.0 flutter: ^3.38.6