Updated PLANS.md, AGENTS.md, and arabic-localization.md to reflect the “foundations now, full translations later” approach and marked progress accordingly.

Implemented localization foundations across backend and frontend (locale settings/middleware, preferred language, i18n wiring, RTL support, minimal Arabic UI strings, Accept-Language).
Added targeted backend and frontend tests plus a risks note for pending full translation coverage.
This commit is contained in:
2026-02-28 11:48:58 +03:00
parent fd90af33b3
commit d40bb10876
27 changed files with 407 additions and 68 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
from rest_framework import serializers
from django.utils.translation import gettext_lazy as _
from apps.bookings.models import Booking
from apps.payments.models import Payment, PaymentProvider, PaymentStatus
@@ -33,7 +34,7 @@ class PaymentCreateSerializer(serializers.ModelSerializer):
def validate_booking_id(self, value):
if not Booking.objects.filter(id=value).exists():
raise serializers.ValidationError("Booking not found")
raise serializers.ValidationError(_("Booking not found"))
return value
def create(self, validated_data):
+3 -2
View File
@@ -1,5 +1,6 @@
from rest_framework import permissions, status, viewsets
from rest_framework.response import Response
from django.utils.translation import gettext as _
from apps.bookings.models import Booking
from apps.payments.models import Payment
@@ -39,11 +40,11 @@ class PaymentViewSet(viewsets.ModelViewSet):
serializer.is_valid(raise_exception=True)
booking = Booking.objects.get(id=serializer.validated_data["booking_id"])
if not user_can_access_booking(request.user, booking):
return Response({"detail": "Not allowed"}, status=status.HTTP_403_FORBIDDEN)
return Response({"detail": _("Not allowed")}, status=status.HTTP_403_FORBIDDEN)
payment = serializer.save()
return Response(
{
"detail": "Payment record created. Provider integration pending.",
"detail": _("Payment record created. Provider integration pending."),
"payment_id": payment.id,
"amount": str(payment.amount),
"currency": payment.currency,