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

Remove ternary operators from converted .po plural condition #9882

Merged
merged 2 commits into from Jan 31, 2021

Conversation

MrPetovan
Copy link
Collaborator

Address #9747 (comment)

Thanks to @sunchaserinfo again.

@MrPetovan MrPetovan added the Bug label Jan 30, 2021
@MrPetovan MrPetovan added this to the 2021.03 milestone Jan 30, 2021
preg_match("|nplurals=([0-9]*); *plural=(.*)[;\\\\]|", $l, $match);
$cond = str_replace('n', '$n', $match[2]);
preg_match("|nplurals=([0-9]*); *plural=(.*?)[;\\\\]|", $l, $match);
$return = $this->convertCPluralConditionToPhpReturnStatement($match[2]);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this win the price of the longest function name you ever created? 😬

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly, although it's an open contest.

@annando annando merged commit 56a77f5 into friendica:develop Jan 31, 2021
@MrPetovan MrPetovan deleted the bug/po2php-plural-conversion branch January 31, 2021 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants