Currently the localization interface is a bunch of parameters on setLabels(...) and a parameterless resetLabels(). That whole method is getting a bit long and convoluted as it organically grew without much forethought.
This task is to clean it up by creating a new method accepting a general Format object which contains all those features. It will make it easier than remembering how many nulls to put before the value you actually want to set.
The current method looks like:
countdown.setLabels(singular, plural, last, delim, empty, formatter);
Something like this would allow setting just the things to override:
Issue migrated from Bitbucket...
Currently the localization interface is a bunch of parameters on
setLabels(...)
and a parameterlessresetLabels()
. That whole method is getting a bit long and convoluted as it organically grew without much forethought.This task is to clean it up by creating a new method accepting a general
Format
object which contains all those features. It will make it easier than remembering how manynull
s to put before the value you actually want to set.The current method looks like:
Something like this would allow setting just the things to override:
It's nice and compact to allow those label lists to be simple pipe (
'|'
) delimited strings, but it should also accept an array of strings.