diff --git a/locale/ar/LC_MESSAGES/django.mo b/locale/ar/LC_MESSAGES/django.mo index 84665f9..94226c7 100644 Binary files a/locale/ar/LC_MESSAGES/django.mo and b/locale/ar/LC_MESSAGES/django.mo differ diff --git a/locale/ar/LC_MESSAGES/django.po b/locale/ar/LC_MESSAGES/django.po index 8de27b9..da383c0 100644 --- a/locale/ar/LC_MESSAGES/django.po +++ b/locale/ar/LC_MESSAGES/django.po @@ -951,7 +951,7 @@ msgstr "إدارة أسطولك وعروضك النشطة." #: core/templates/core/truck_owner_dashboard.html:14 msgid "Add New Truck" -msgstr "ابحث عن شاحنة" +msgstr "تسجيل شاحنة" #: core/templates/core/truck_owner_dashboard.html:22 msgid "Received Shipping Offers" diff --git a/update_po_v3.py b/update_po_v3.py new file mode 100644 index 0000000..f0a25b1 --- /dev/null +++ b/update_po_v3.py @@ -0,0 +1,31 @@ +import os + +po_path = 'locale/ar/LC_MESSAGES/django.po' +with open(po_path, 'r', encoding='utf-8') as f: + lines = f.readlines() + +new_lines = [] +i = 0 +while i < len(lines): + line = lines[i] + if line.startswith('msgid "Add New Truck"'): + new_lines.append(line) + i += 1 + if i < len(lines) and lines[i].startswith('msgstr'): + new_lines.append('msgstr "تسجيل شاحنة"\n') + i += 1 + # Check if there was a fuzzy flag before this entry + # In .po files, flags come before msgid + else: + new_lines.append(lines[i]) + i += 1 + elif line.startswith('#, fuzzy') and i + 1 < len(lines) and (lines[i+1].startswith('msgid "Add New Truck"') or (i + 2 < len(lines) and lines[i+2].startswith('msgid "Add New Truck"'))): + # Skip fuzzy if it's for Add New Truck + i += 1 + else: + new_lines.append(line) + i += 1 + +with open(po_path, 'w', encoding='utf-8') as f: + f.writelines(new_lines) +print("Updated django.po manually") \ No newline at end of file