Page MenuHomePhabricator

Remove the need to hard-code all chart definition properties in the Chart extension PHP code
Open, HighPublic1 Estimated Story Points

Description

Right now, JCChartContent::localize() does its job (localizing axis labels etc, transforming { "en": "Foo", "nl": "Bar" } to "Foo") by creating a new object and copying properties to it one by one. This means it needs to know about all definition properties (including ones that aren't localizable), and drops any properties it doesn't know about.

This is going to be a maintenance nightmare in the long term, necessitating changes like this one. We should make this less fragile, for example by only localizing fields that are localizable, or doing validation based on a shared JSON schema.