# refactor\(applet\): move quota-window labels into a component \(\#318\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/ba0a0d86e92d2460fad82ffa1a2df27777f34c09)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: ba0a0d86e92d2460fad82ffa1a2df27777f34c09

Requested commit: ba0a0d86e92d2460fad82ffa1a2df27777f34c09

Commit: ba0a0d86e92d2460fad82ffa1a2df27777f34c09

Tree: 545ba10621b4920130a1edf4a9c58863199cfb79

Author: Simone

Committer: GitHub

## Message

```
refactor(applet): move quota-window labels into a component (#318)

rateWindowLabel was a 113-line switch of provider-specific labels living
in main.qml, reading no root state. It moves verbatim into
components/RateWindowLabels.qml as `labelForLane(key, lane)`, following
the ProviderNames pattern: the labels stay literal i18n() calls in QML
so gettext still extracts them. The two callers in main.qml resolve the
provider key before the lookup, as rateWindowLabel did internally.

Nothing executed these labels before; deleting any of them left the
suite green. tst_rate_window_labels.qml now pins one real entry per lane
and the generic fallback for an unknown provider in every lane.

Three extraction harnesses stubbed the old function; they now stub the
component object instead, and test_quota_reset_metadata gains the
providerKey stub the caller now needs. Catalogs are regenerated: the
entries only move to the new source file, with every msgid and
translation unchanged.

main.qml: 2744 -> 2634 lines.

Documentation impact: none. No user-visible behavior changes, and no
guide describes where this table lives.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
```

## Parents

- [1762070c9958ec18ef53baa88ba65c9b86b604d1](https://git.cafe/lucenx/codexbar-plasma/commit/1762070c9958ec18ef53baa88ba65c9b86b604d1?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/ba0a0d86e92d2460fad82ffa1a2df27777f34c09?format=markdown)
