User:Liangent/wb-lang/updates

July

  • Lib: Language work infrastructure is done (class LanguageWithConversion, LanguageFallbackChain and LanguageFallbackChainFactory). gerrit:70871 gerrit:71778 performance tweaks
  • Repo: A new special page, Special:MyLanguageFallbackChain, is added, to display the language fallback chain used for current context, allowing users to confirm their user settings now. gerrit:71281
  • Repo: Various page titles, including view, edit and history, as well as displayed text of links to item pages (on special pages), are better displayed. gerrit:71845 gerrit:71865
  • Client: {{#property: }} is now able to display labels from variant languages, as properly converted text. gerrit:71072
  • Lib: A new pseudo language code, "qqc", is introduced to contain the most preferred label for current context. gerrit:72258 - Abandoned
  • Repo: wbEntity and wbUsedEntities now get contents in "qqc" gerrit:72226 - Abandoned
  • Repo: api.php?action=wbgetentities now accepts a new parameter, &contextlanguage=. gerrit:72260 - Abandoned

August edit

  • Design: Start to go on the approach to change the serialized format to something like (was using "qqc" - see "Abandoned" lines above):
'ii': {
    'language': 'zh-cn',
    'source-language': 'zh-tw',
    'value': '(Text in Simplified Chinese)'
}
  • Lib: Serialized formats get new fields "source-language" and "for-language" (only returned in formats without keys), alongside with "language". gerrit:72225 (gerrit change reused)
    • Actually implements the design above.
    • "source-language" indicates the language where this particular piece of data was fetched.
    • "for-language", or array keys in some formats, indicates the language originally requested.
  • Client: Lua: mw.wikibase.labels( ) now finds labels in all variants. gerrit:72751
  • Client: Better handling for {{#property: }} to show different labels for views requesting different variants. gerrit:71996
  • Repo: wbEntity and wbUsedEntities now contain labels from fallback languages, as an experimental feature. gerrit:72226 (gerrit change reused)
    • Uses the format described at the beginning of this section.
  • Repo: api.php?action=wbgetentities now accepts a new parameter, &languagefallback. gerrit:74954
    • Uses the format described at the beginning of this section.
  • Misc: Various small bugfixes and enhancements for previous code. gerrit:73754 gerrit:73854 gerrit:79180