Mooeypoo has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/276903

Change subject: Wrap section name in <bdi> tags in 'new topic' notification text
......................................................................

Wrap section name in <bdi> tags in 'new topic' notification text

The text of the notification is defined as
"New topic created on [board]: '[topic]'"
If both the [board] and the [topic] are in a different direction
than the interface text, then, since the only characters between
these two are weak unicode bidirectional characters, the entire
segment "flips" around.

For example, if we view the notification in English but both board
and topic are Hebrew, the rendering will actuall be:

"New topic created on [topic]' :[board]'."

The only way to fix this is to isolate the segments so they do
not affect general context directionality. We can isolate both,
but we actually don't need to. We only need one of them to "break
the streak" of directionality. That is, instead of considering both
of those segments as RTL in the example above, they will be one RTL
and one LTR, which breaks them apart, and displays them properly.

Also note that both of these elements (topic and board names) are
internally wrapped in bidi embed, to make sure that internally they
preserve proper direction regardless of interface direction (that is
more for things like parentheses, etc)

Fun bug!

Change-Id: Ife1e15caaaa41cb5792ad4e3c48f3e3aca97da98
---
M i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/03/276903/1

diff --git a/i18n/en.json b/i18n/en.json
index 1a2681a..0b91487 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -269,7 +269,7 @@
        "flow-notification-reply-bundle": "<span class=\"plainlinks 
mw-echo-title-heading\">[$4 $2]</span><br />$1 and $5 
{{PLURAL:$6|other|others}} {{GENDER:$1|responded}} on '''$3'''.",
        "flow-notification-edit": "<span class=\"plainlinks 
mw-echo-title-heading\">[$6 $2]</span><br />$1 has {{GENDER:$1|edited}} your 
<span class=\"plainlinks\">[$5 post]</span> on [[$3|$4]].",
        "flow-notification-edit-bundle": "$1 and $5 {{PLURAL:$6|other|others}} 
{{GENDER:$1|edited}} a <span class=\"plainlinks\">[$4 post]</span> in \"$2\" on 
\"$3\".",
-       "notification-header-flow-new-topic-v2": "New topic created on 
'''$3''': \"'''$4'''\".",
+       "notification-header-flow-new-topic-v2": "New topic created on 
'''$3''': <bdi>\"'''$4'''\"</bdi>.",
        "notification-bundle-header-flow-new-topic": "$1 new 
{{PLURAL:$2|topic|topics}} on '''$3'''.",
        "notification-body-flow-new-topic-v2": "$1",
        "notification-header-flow-new-topic-user-talk": "A new topic was 
created on '''your talk page''': \"'''$4'''\".",

-- 
To view, visit https://gerrit.wikimedia.org/r/276903
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife1e15caaaa41cb5792ad4e3c48f3e3aca97da98
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to