User:Liangent/wb-lang/dev

Requirements

 * Clean up language codes first (eg zh-classical => lzh, zh-yue => yue and disable some codes)
 * Site link table (see above)
 * Opt-out: {{#babel:en-0}}

API

 * For all wbget* actions accepting &languages=:
 * When &languages=zh-cn is wanted but zh-cn is not there:
 * 
 * if there's zh-tw and en in known labels ('something' is guaranteed to be in zh-cn, by Language converter)
 * 
 * if there's only en in known labels ('something' is in English)
 * Aliases: convert-fallbacks are added, but plain fallbacks are not added
 * For all wbset* actions:
 * Behaviors are not changed. Data set to exact language code requested by user.
 * Remember to take care of zh-classical and such (this falls out of scope of this project)
 * For action=wbsearchentities:
 * Things might be difficult and put off
 * For multilingual text values:
 * I need some real world examples to see how it works now...

WebUI

 * +langname comment when needed like -> (English)


 * Item label/description
 * display in user's most preferred language, prefill with display value when user starts editing, and save to user's language
 * I say both zh and en. When I have my userlang set to zh, en is displayed as fallback, I'm editing the label
 * Since I can use both zh and en, I may be misled that I'm changing the English label (especially when there's (English) nearby).
 * Item aliases
 * display all aliases in userlangs explicitly listed in babel + all convert-fallbacks (no zh->en fallbacks and such)
 * new alias: added to userlang
 * removal: do we really want to remove it from fallback source? users may be deleting an alias because it's in a foreign language and not recognized by current editor :/ or make aliases from fallback readonly?
 * Item displayed as value of claims
 * only label in most preferred language, like the first bullet above w/o editing
 * Property suggestion
 * ditto
 * Item suggestion (as claim values)
 * ditto
 * (and any more autocomplete suggestions?)

Client

 * How to tell {{#property: caller the language a value is in, when it's from fallback?
 * Extend syntax to accept a list of languages? Allow defining whether fallback is used or not?

Lua

 * TBD