[go: up one dir, main page]

Page MenuHomePhabricator

Improve support for gender keyword in translations
Open, LowPublic

Description

We have several translations (14 after a file search) that include the TranslateWiki gender keyword. For example:

https://github.com/wikimedia/wikipedia-ios/pull/4369/files#diff-90c36f1135207b72d5c09ca0a34708a5eb12d183309ae9d2f641471a29af69f7R1069

Currently translations like these may appear malformed in the app:

Screen Shot 2022-10-24 at 12.59.52 PM.png (1×545 px, 226 KB)

This ticket is to investigate and improve this treatment in the localization script. Ideally we would use NSStringGenderRuleType in a .stringsdict file, similar to how we deal with plurals. If this doesn't work, maybe we can at least clean up the resulting text so that the || no longer shows.

Event Timeline

LGoto triaged this task as Low priority.Oct 24 2022, 6:33 PM
LGoto moved this task from Needs Triage to Engineering Backlog on the Wikipedia-iOS-App-Backlog board.
LGoto added a project: ios-app-v7.0.
LGoto edited projects, added ios-app-v7.0.1; removed ios-app-v7.0.

We can try to work this by tapping on MediaWiki's gender tool for languages with gendered nouns. More on that work here T279483.

As for implementation on the client, NSStringGenderRuleType doesn't have any public documentation from Apple but could work together with our existing script. It would require updating our existing script to address the gender issues in some languages, similar to what we do with plurals.

Starting on iOS15, the foundation framework supports a new data formatting enum called grammatical gender https://developer.apple.com/documentation/foundation/morphology/3767096-grammaticalgender . I'm not sure if this option is viable, as it would demand reworking our current localization solution, but it could be worth testing when we revisit this ticket.

In any case, addressing this ticket would require us to research how different languages handle this issue. I based these findings on what could be considered typical for romance languages, but research in other languages is necessary.