Page MenuHomePhabricator

Be able to specify languages for icons (not just use ltr -> rtl substitution)
Closed, ResolvedPublic1 Story Points

Description

https://gerrit.wikimedia.org/r/#/c/143407/ provides an RTL version of the 'help' icon, but doesn't work because the build process assumes that "file" maps to a string and doesn't resolve the object. Resolving the object would need OOjs UI, however, so… bootstrapping issue?

Event Timeline

Jdforrester-WMF updated the task description. (Show Details)
Jdforrester-WMF raised the priority of this task from to High.
Jdforrester-WMF added a project: OOUI.
Jdforrester-WMF moved this task to Backlog on the OOUI board.
Jdforrester-WMF changed Security from none to None.
Jdforrester-WMF added a subscriber: Jdforrester-WMF.
Jdforrester-WMF moved this task from Backlog to Next-up on the OOUI board.Dec 3 2014, 12:27 AM

This would require us to generate per-language CSS files for distribution. The syntax you used is supported by MediaWiki's ResourceLoaderImageModule, but currently not by OOUI's image generator thingy.

For MediaWiki, we can use ResourceLoader and ResourceLoaderImageModule, which support this kind of thing natively.

For standalone OOjs UI, we should try out some magic with :lang() selectors.

We could also merge the LTR/RTL stuff together with :dir() selectors, which are coming 'soon' if the current draft of Selectors 4 remains true: http://dev.w3.org/csswg/selectors-4/#the-dir-pseudo.

It's be nice to implement a more compact format for our sanity – one proposal:

1Current format
2
3"italic": { "file": {
4 "default": "italic-a.svg",
5 "ar": "italic-arab-meem.svg",
6 "be": "italic-k.svg",
7 "cs": "italic-i.svg",
8 "da": "italic-k.svg",
9 "de": "italic-k.svg",
10 "en": "italic-i.svg",
11 "es": "italic-c.svg",
12 "eu": "italic-e.svg",
13 "fa": "italic-arab-keheh-jeem.svg",
14 "fi": "italic-k.svg",
15 "fr": "italic-i.svg",
16 "gl": "italic-c.svg",
17 "he": "italic-i.svg",
18 "hu": "italic-d.svg",
19 "hy": "italic-armn-sha.svg",
20 "it": "italic-c.svg",
21 "ka": "italic-geor-kan.svg",
22 "ksh": "italic-s.svg",
23 "ky": "italic-k.svg",
24 "ml": "italic-i.svg",
25 "nl": "italic-c.svg",
26 "nn": "italic-k.svg",
27 "no": "italic-k.svg",
28 "os": "italic-k.svg",
29 "pl": "italic-i.svg",
30 "pt": "italic-i.svg",
31 "ru": "italic-k.svg",
32 "sv": "italic-k.svg",
33},
34
35
36Current format, grouped
37
38"italic": { "file": {
39 "default": "italic-a.svg",
40 "ar": "italic-arab-meem.svg",
41 "cs": "italic-i.svg",
42 "en": "italic-i.svg",
43 "fr": "italic-i.svg",
44 "he": "italic-i.svg",
45 "ml": "italic-i.svg",
46 "pl": "italic-i.svg",
47 "pt": "italic-i.svg",
48 "be": "italic-k.svg",
49 "da": "italic-k.svg",
50 "de": "italic-k.svg",
51 "fi": "italic-k.svg",
52 "ky": "italic-k.svg",
53 "nn": "italic-k.svg",
54 "no": "italic-k.svg",
55 "os": "italic-k.svg",
56 "sv": "italic-k.svg",
57 "ru": "italic-k.svg",
58 "es": "italic-c.svg",
59 "gl": "italic-c.svg",
60 "it": "italic-c.svg",
61 "nl": "italic-c.svg",
62 "eu": "italic-e.svg",
63 "fa": "italic-arab-keheh-jeem.svg",
64 "hu": "italic-d.svg",
65 "hy": "italic-armn-sha.svg",
66 "ksh": "italic-s.svg",
67 "ka": "italic-geor-kan.svg",
68},
69
70
71
72Compact format
73
74"italic": { "files": {
75 "default": "italic-a.svg",
76 "ar": "italic-arab-meem.svg",
77 "cs,en,fr,he,ml,pl,pt": "italic-i.svg",
78 "be,da,de,fi,ky,nn,no,os,sv,ru": "italic-k.svg",
79 "es,gl,it,nl": "italic-c.svg",
80 "eu": "italic-e.svg",
81 "fa": "italic-arab-keheh-jeem.svg",
82 "hu": "italic-d.svg",
83 "hy": "italic-armn-sha.svg",
84 "ksh": "italic-s.svg",
85 "ka": "italic-geor-kan.svg",
86},

Change 201486 had a related patch set uploaded (by Bartosz Dziewoński):
Support (poorly) per-language icon versions in colorize-svg.js

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

Change 201495 had a related patch set uploaded (by Bartosz Dziewoński):
ResourceLoaderImage: Allow shorthand syntax

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

Change 201486 merged by jenkins-bot:
Support (poorly) per-language icon versions in colorize-svg.js

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

Change 201495 merged by jenkins-bot:
ResourceLoaderImage: Allow shorthand syntax

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

Jdforrester-WMF moved this task from Next-up to Reviewing on the OOUI board.Apr 29 2015, 9:35 PM