Skip to content

Refactor roughCount into an atomic QGadget, fix usage of i18np

ivan tkachenko requested to merge work/ratijas/count into master

i18np's first argument should be a valid number. Meanwhile roughCount was a string. Instead we should pass the original number as the plural-deciding argument, while using the formatted string only for the actual substitution.

It is only natural to factor out the counter into a gadget class of its own, since all of its properties (and their semantics like the roughCount.length > 0 special case) change atomically and thus do not require separate connections.

Also, let's store the Timer inline, instead of allocating dynamically.

BUG: 476148


Replaces !686 (closed)

Merge request reports