Page MenuHomePhabricator

Implement CSV/TSV import/export for tabular data set
Open, Needs TriagePublic

Event Timeline

This is awesome, thank you @TheDJ and @JeanFred ! One kinda important issue -- it breaks on localized columns, e.g. Data:I18n/No_globals.tab -- CSV outputs empty values, and Excel shows English (I think).

I think the best solution would be to introduce fake columns, i.e message:en. There will never be a column name like that in the data because column names are restricted to [a-z0-9_]+, so adding a colon with the language code could be a good alternative. The logic would be:

  • if CSV column has no : in the name, it's a text column, unless all values are integers or booleans. Empty values -> null (TBD: for string columns, should empty be "" or null?)
  • for those with the :, treat text after : as the language code, and combine all such columns with the same name into one. Always treat them as strings. If value is empty, do not add that language to that row (this way only some rows can have translations, and we won't end up with tons of "fr": "" if only one row had it.
TheDJ removed TheDJ as the assignee of this task.Jan 29 2020, 11:17 PM
TheDJ unsubscribed.

The gadget is now enabled by default for all users.