<p dir="ltr">Tagging language and directionality on fallback entries sounds reasonable, and not a huge addition.</p>
<p dir="ltr">I'm not sure why the fallbacks are cached in the main body instead of letting them through to the backing language's cache, but if that's a necessary or useful choice I've no reason to hop in and change it. I also am a bit mystified why we moved from a filesystem-backed database to a giant in-memory cache that requires deserializing the entire language cache on every request (if I'm reading correctly) but apparently that performs better than I think it should, so take me with a grain of salt... :)</p>
<p dir="ltr">I would recommend getting someone from Performance to weigh in on this to confirm the proposed solution has no surprises. Probably best to have at least a preliminary patch which can be run through some paces...<br></p>
<p dir="ltr">More generally, we should capture the other note in the mediawiki-i18n thread about having the templating system pick up language and directionality and fill out the necessary buts for tagging and isolation on the HTML end.</p>
<p dir="ltr">We may want to think about a class to represent a bit of text or HTML that's tagged with a language and an isolation factor (not sure if necessary), which can be mixed and matched with Message objects and passed into Html class generators or template things. And of course, equivalent on the JS side.</p>
<p dir="ltr">-- brion</p>
<div class="gmail_quot<blockquote class=" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
Niklas brought this message[1] to my attention as something that<br>
probably deserves more attention than it has gotten, and I trust he's<br>
correct.  What he said back in April: "I added<br>
wikitech-l to CC in hopes that people who have worked on localisation<br>
cache more recently would comment on whether [Adrian's proposed option<br>
to not merge<br>
messages in LocalisationCache] would make more sense nowadays."<br>
<br>
Adrian: assuming Niklas and I are correct, my suggestion for moving<br>
this forward would be to turn your design thoughts into an<br>
ArchCom-RFC[2] for more explicit consideration by ArchCom.  My attempt<br>
at abstract for those who haven't followed this:<br>
<br>
Adrian was trying to figure out how to output pages that need to have<br>
multiple languages in a single page, which becomes difficult when<br>
fallbacks are missing.  It results in some oddball behavior where<br>
placeholder text is output with incorrect i18n attributes in the<br>
surrounding div.  He provided several alternatives for how to solve<br>
the problem in his mail to mediawiki-i18n.  Niklas replied, providing<br>
the "if we stick with the status quo" answer (tag message strings in<br>
LocalisationCache with the correct language), and then is trying to<br>
figure out if the status quo makes the right space vs speed tradeoff<br>
given the quantity of languages and messages we have in 2016.<br>
<br>
Adrian & Niklas: did I get the gist of it?<br>
<br>
Rob<br>
<br>
[1]: The April 2016 mediawiki-i18n thread: "Providing the effective<br>
language of messages"<br>
 <<a href="https://lists.wikimedia.org/pipermail/mediawiki-i18n/2016-April/thread.html#1059" rel="noreferrer" target="_blank">https://lists.wikimedia.org/pipermail/mediawiki-i18n/2016-April/thread.html#1059</a>><br>
[2]: My unofficial guide on how to turn something into an ArchCom-RFC:<br>
<<a href="https://www.mediawiki.org/wiki/User:RobLa-WMF/ArchCom-RFC" rel="noreferrer" target="_blank">https://www.mediawiki.org/wiki/User:RobLa-WMF/ArchCom-RFC</a>><br>
<br>
_______________________________________________<br>
Wikitech-l mailing list<br>
<a href="mailto:Wikitech-l@lists.wikimedia.org">Wikitech-l@lists.wikimedia.org</a><br>
<a href="https://lists.wikimedia.org/mailman/listinfo/wikitech-l" rel="noreferrer" target="_blank">https://lists.wikimedia.org/mailman/listinfo/wikitech-l</a></div>