changes 25
This commit is contained in:
parent
9bd61d2f60
commit
8a3eb08cf8
Binary file not shown.
@ -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"
|
||||
|
||||
31
update_po_v3.py
Normal file
31
update_po_v3.py
Normal file
@ -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")
|
||||
Loading…
x
Reference in New Issue
Block a user