Skip to content

Game Text Compiler requires feature for reversing Arabic text #2

Open
ViTeXFTW/GeneralsGameCode
#1
@xezon

Description

@xezon

commy2:

Arabic is written right to left. In str, all lines are reversed. It is impossible to read. Maybe it would be beneficial if, in str, each character in a line was reversed. So that Arabic speakers can read and edit the lines. Then when making the csf, reverse the lines again so game puts them correctly together.

Sample of proper reversal:

string = "قﺎﻄﻨﻟا ﻦﻤﺿ تايانبلاو تﺎﺑﺮﻌﻟا ﺢﯿﻠﺼﺗ\n\nيناوث ٠١ : ١ ﻒﻨﺻ\nةيناث ٠٢ : ٢ ﻒﻨﺻ\nةيناث ٠٣ : ٣ ﻒﻨﺻ\n\nةدﺎﯿﻘﻟا ﺰﻛﺮﻣ : ىﺪﻟ ﻊﺑﺎﺗ"

lines = string.split("\n")
for i, line in enumerate(lines):
    lines[i] = "".join(reversed(line))

print("\n".join(lines))

Metadata

Metadata

Assignees

No one assigned

    Labels

    EnhancementIs new feature or requestTextIs text, string, localization related

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions