daniel added a comment.

I agree that it would be nice to have a flexible system like this. Whether it 
is given in the form of nested constructors, or nested object literals, I don't 
care much. But it should be possible to combine the bits freely. In Thiemo's 
version, I'm not sure how I would add the ULS languages to a fixed list 
(instead of vice versa).

In addition to fixed list, ULS, union, and difference, I think may also want a 
"core" languages list. Or would "ULS" just use the core languages, if ULS is 
not there? We need a sane fallback for the case that ULS is not installed.

For the structural representation, I would probably go for something very 
simple:

  [ { op: "add", source: "uls" }, { op: "add", data: ['a', 'b'] }, { op: 
"remove", data: ['x', 'y'] } ]

However, when adding explicit languages, just specifying the language code is 
not enough. For each of those languages, we would need to provide at least a 
localized name, and maybe some additional info, like rtl/ltr. So we'd need 
something like:

  { op: "add", data: { a: { name: "Aaarg" }, b: { name: "Böörk", dir: "rtl" } } 
}


TASK DETAIL
  https://phabricator.wikimedia.org/T78007

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: adrianheine, daniel
Cc: Ricordisamoa, Tobi_WMDE_SW, JeroenDeDauw, Wikidata-bugs, jeblad, 
thiemowmde, JanZerebecki, adrianheine, Aklapper, Lydia_Pintscher, daniel, aude, 
Mbch331



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to