Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gender: when gender not passed, avoid error, fallback to neutral #57

Merged
merged 1 commit into from
Sep 22, 2021

Conversation

santhoshtr
Copy link
Member

Messages like {{GENDER:|A|B|C}} were causing parser failures.
This patch fixes the parser and introduce a fallback to neutral form.

As a mediawiki independent library, while Gender is supported, we cannot
support gender with current logged in user. For that explicit gender
param placeholder needed(example: {{GENDER:$1|A|B|C}}

Messages like {{GENDER:|A|B|C}} were causing parser failures.
This patch fixes the parser and introduce a fallback to neutral form.

As a mediawiki independent library, while Gender is supported, we cannot
support gender with current logged in user. For that explicit gender
param placeholder needed(example: {{GENDER:$1|A|B|C}}
@santhoshtr
Copy link
Member Author

I found this issue while testing https://phabricator.wikimedia.org/T271918. A few messages from hebrew has Gender without gender information.
Example
{{GENDER:|הרחב|הרחיבי}} באמצעות הוספת {{PLURAL:$2|$1 ועוד פרק|$1 ועוד $2 פרקים|0=$1}}"

@santhoshtr santhoshtr requested review from amire80 and Nikerabbit July 12, 2021 10:56
@santhoshtr santhoshtr requested a review from iiirxs August 2, 2021 11:03
@amire80 amire80 merged commit 039d73c into master Sep 22, 2021
wmfgerrit pushed a commit to wikimedia/mediawiki-extensions-ContentTranslation that referenced this pull request Sep 24, 2021
Banana-i18n updated improved i18n for RTL scripts
wikimedia/banana-i18n#57

Bug: T271918
Change-Id: I2fe475fb6887cc73a153f51b79e5fa2115d15e3c
wmfgerrit pushed a commit to wikimedia/mediawiki-extensions that referenced this pull request Sep 24, 2021
* Update ContentTranslation from branch 'master'
  to ba1bebaaf2c5e0e0f9e95a3f1cd533681aaf1821
  - SX: Update dependencies
    
    Banana-i18n updated improved i18n for RTL scripts
    wikimedia/banana-i18n#57
    
    Bug: T271918
    Change-Id: I2fe475fb6887cc73a153f51b79e5fa2115d15e3c
@Abijeet Abijeet deleted the gender-fallback branch July 12, 2022 05:11
@Abijeet Abijeet restored the gender-fallback branch July 12, 2022 05:11
@Abijeet Abijeet deleted the gender-fallback branch July 12, 2022 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants