Talk:Analytics/Reportcard/UI

From mediawiki.org

UI suggestions and considerations[edit]

Internationalization[edit]

It will help the project greatly in the longer term if the code base if prepared for internationalization from the start. Erik Zachte (talk) 14:43, 13 March 2012 (UTC)Reply

This is the first mention of internationalization, so I'm taking that to imply it is not a proximate priority. It's good to know this is a question that has borne examination in the past, so that when we get to that point, we can turn to your expertise for help.
The UI as it stands has very few strings in it; the column-headers are in the data. It would be simple enough to supply .mo files alongside the data files, or to push those strings into the metadata files. Additionally, I know that node has more than a few internationalization libraries, including support for gettext. But rather than planning far ahead, I think we should cross that bridge when we come to it :) -- Dsc (talk) 17:50, 13 March 2012 (UTC)Reply

Literals[edit]

Suggestions:

  • Bring all literals into a message module, which can (perhaps later) interface with Translatewiki.
  • WMF has an internationalization team. I'm sure PM Siebrand Mazeland will be happy to give some advice on (future) interfacing with Translatewiki.
  • Keep in mind that strings in different languages can widely vary in length, e.g use oversized (or perhaps dynamically sized) edit/message boxes.
  • Use standard language codes for look-up of literals (e.g. 'en' for English, which could be default)

Number formatting[edit]

Formatting rules for numbers can differ widely, this concerns decimal and thousands marks, but also digit grouping (e.g. English 10,000,000 is in Hindi 1,00,00,000, in Dutch 10.000.000 in French 1 000 000, in Chinese 100,0000, in Croatian 10.000,000

Suggestions:

  • Bring all formatting of numbers into one function which receives
    • The number to be presented
    • A language code,
    • A 'short or long' flag. This allows abbreviation of large numbers in a standard and flexible way. E.g. English 1,000,000 => 1M? or 1mm?

This way support for more languages can easily be added gradually.