From d049529951501fdb36c9923ce1cf084affa1fd04 Mon Sep 17 00:00:00 2001 From: Claudio Date: Thu, 22 Oct 2026 14:23:36 +0200 Subject: [PATCH] fix: pin the popup's width, and what the QML linters asked for Plasma remembers a popup's size per applet and reapplies it, clamped only by the representation's Layout hints. The redesign pinned the height but gave the width a minimum and a preferred value with no maximum, so a width stretched under the old popup (1042px) came back and spread the cards across the screen. The width is now pinned like the height. It shows only in the panel of someone who has used the widget, never in plasmawindowed or an offscreen render. From the Qt QML checks: - the panel form is reachable from the keyboard (Tab, then Space or Enter) and tells a screen reader what the tooltip says; the mark, the dots and the chart columns are hidden from it, since the figures they draw are written next to them; - the popup's heading and its large figure move to files of their own, PopupHeader.qml and NearestLimit.qml, taking FullRepresentation from 391 lines to 224; - `pragma ComponentBehavior: Bound` in the files whose delegates reach outer ids, the legend's delegate qualified, an unused import dropped, and one unqualified `refresher` in main.qml qualified. qmllint is left with i18n/i18nc, which KDE injects into the context, and the plasmoid's `root` id, the project's convention. CLAUDE.md records both traps: the remembered popup size, and that `systemctl --user restart plasma-plasmashell.service` is a silent no-op when plasmashell was started by hand. --- CLAUDE.md | 14 ++ .../contents/ui/CompactRepresentation.qml | 20 +- plasmoid/contents/ui/DailyChart.qml | 5 + plasmoid/contents/ui/DotBar.qml | 3 + plasmoid/contents/ui/FullRepresentation.qml | 189 ++---------------- plasmoid/contents/ui/ModelBreakdown.qml | 9 +- plasmoid/contents/ui/NearestLimit.qml | 79 ++++++++ plasmoid/contents/ui/PopupHeader.qml | 154 ++++++++++++++ plasmoid/contents/ui/TokensCard.qml | 2 + plasmoid/contents/ui/main.qml | 2 +- translations/dipstick.pot | 77 ++++--- translations/it.po | 77 ++++--- 12 files changed, 374 insertions(+), 257 deletions(-) create mode 100644 plasmoid/contents/ui/NearestLimit.qml create mode 100644 plasmoid/contents/ui/PopupHeader.qml diff --git a/CLAUDE.md b/CLAUDE.md index ba00d15..d41f9df 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -55,6 +55,13 @@ journal, not to the terminal. latest version: hence the risk of believing a change has landed while the user is still looking at the old one. Before calling a UI change done, make sure the user is looking at the same build. + **The restart only works if plasmashell runs under that unit.** One started + by hand (`plasmashell --replace` from a terminal) is outside systemd: the + restart launches a second instance that finds the first, exits at once with + status 0, and leaves the old build on screen — a silent no-op. Check + `systemctl --user is-active plasma-plasmashell.service` and the start time + in `ps -o lstart= -C plasmashell`; if the unit is inactive, the way back is + `kquitapp6 plasmashell; systemctl --user start plasma-plasmashell.service`. - **`XMLHttpRequest` on `file://` does not work in QML.** Qt 6 disables it. The state is read through `Plasma5Support.DataSource` (`executable`) instead. - **Transcripts contain duplicate messages**, in quantity: ~3900 lines with @@ -130,5 +137,12 @@ journal, not to the terminal. gets both: a preview outside the panel can look right on roles the panel does not have. Draw only with text, inactive text, background, highlight and the semantic colours; derive everything else from them. +- **Plasma remembers the popup's size per applet and reapplies it.** It lives + as `popupWidth`/`popupHeight` in the applet's configuration, clamped only by + the representation's `Layout` minimum and maximum. The redesign shipped with + a minimum and a preferred width but no maximum, and a width stretched under + the old popup (1042px) came back and spread the cards across the screen. + Pin all three, width and height alike. It never shows in `plasmawindowed` + or in an offscreen render: only in the panel of someone who has used it. - **`state.json` carries no interface strings.** Localisation belongs to the plasmoid; the daemon runs with no locale context. diff --git a/plasmoid/contents/ui/CompactRepresentation.qml b/plasmoid/contents/ui/CompactRepresentation.qml index 61966b8..6f9c3ff 100644 --- a/plasmoid/contents/ui/CompactRepresentation.qml +++ b/plasmoid/contents/ui/CompactRepresentation.qml @@ -10,13 +10,14 @@ * Which one is "first" has already been decided by the daemon. Nothing is * chosen here: at panel height, this only draws. */ +pragma ComponentBehavior: Bound + import QtQuick import QtQuick.Layouts import org.kde.plasma.core as PlasmaCore import org.kde.plasma.components as PlasmaComponents import org.kde.plasma.plasmoid import org.kde.kirigami as Kirigami -import "format.js" as Format MouseArea { id: compact @@ -43,6 +44,21 @@ MouseArea { hoverEnabled: true onClicked: root.expanded = !root.expanded + // Reachable and readable without a mouse: the same toggle from the + // keyboard, and the tooltip's words for a screen reader. + activeFocusOnTab: true + Keys.onPressed: event => { + if (event.key === Qt.Key_Space || event.key === Qt.Key_Enter + || event.key === Qt.Key_Return || event.key === Qt.Key_Select) { + root.expanded = !root.expanded + event.accepted = true + } + } + Accessible.role: Accessible.Button + Accessible.name: root.toolTipMainText + Accessible.description: root.toolTipSubText + Accessible.onPressAction: root.expanded = !root.expanded + // The open popup's anchor: the widget stays marked while its detail is // on screen. Rectangle { @@ -72,6 +88,7 @@ MouseArea { // file for light panels and dark ones. source: Qt.resolvedUrl("../icons/dipstick.svg") isMask: true + Accessible.ignored: true color: root.expanded || compact.containsMouse ? look.ink : look.muted } @@ -93,6 +110,7 @@ MouseArea { Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter visible: compact.hasData spacing: Math.round(3 * compact.u) + Accessible.ignored: true Repeater { model: 5 diff --git a/plasmoid/contents/ui/DailyChart.qml b/plasmoid/contents/ui/DailyChart.qml index 4a1b322..ff9163a 100644 --- a/plasmoid/contents/ui/DailyChart.qml +++ b/plasmoid/contents/ui/DailyChart.qml @@ -7,6 +7,8 @@ * relative to the peak day, because the question is "how did this compare to * the busy days", not "exactly how many tokens". */ +pragma ComponentBehavior: Bound + import QtQuick import QtQuick.Layouts import org.kde.plasma.components as PlasmaComponents @@ -58,6 +60,9 @@ Item { Layout.minimumHeight: plotHeight Layout.maximumHeight: plotHeight spacing: Math.round(3 * chart.u) + // Thirty unlabelled columns say nothing to a screen reader; the + // totals and the legend around them carry the numbers. + Accessible.ignored: true Repeater { model: chart.days diff --git a/plasmoid/contents/ui/DotBar.qml b/plasmoid/contents/ui/DotBar.qml index 5c1f2f1..0791ed2 100644 --- a/plasmoid/contents/ui/DotBar.qml +++ b/plasmoid/contents/ui/DotBar.qml @@ -18,6 +18,9 @@ Item { implicitHeight: dotSize + // The figure it draws is always written next to it. + Accessible.ignored: true + Canvas { anchors.fill: parent diff --git a/plasmoid/contents/ui/FullRepresentation.qml b/plasmoid/contents/ui/FullRepresentation.qml index 5907503..d697a85 100644 --- a/plasmoid/contents/ui/FullRepresentation.qml +++ b/plasmoid/contents/ui/FullRepresentation.qml @@ -9,6 +9,8 @@ * projected burn rate, per-project rankings, session lists. This is a * panel widget, not an analytics application. */ +pragma ComponentBehavior: Bound + import QtQuick import QtQuick.Layouts import org.kde.plasma.components as PlasmaComponents @@ -43,9 +45,15 @@ PlasmaExtras.Representation { Look { id: look } - // The width the design was drawn at, in the user's text size. + // The width the design was drawn at, in the user's text size. The + // maximum matters as much as the other two: Plasma remembers a popup's + // size per applet (popupWidth in the applet's configuration) and + // reapplies it, clamped only by these hints. Without a maximum, a width + // stretched under an earlier version came back and spread the cards + // across the screen. Layout.minimumWidth: Math.round(428 * u) Layout.preferredWidth: Math.round(428 * u) + Layout.maximumWidth: Math.round(428 * u) // Dynamic height: the popup is worth exactly its content, no scrolling. // @@ -149,191 +157,24 @@ PlasmaExtras.Representation { spacing: 0 visible: full.hasData - // Identity on the left, the plan and the one action on the right. - RowLayout { + PopupHeader { Layout.fillWidth: true Layout.leftMargin: 6 * full.u Layout.rightMargin: 4 * full.u Layout.topMargin: 4 * full.u - spacing: 10 * full.u - - Rectangle { - Layout.alignment: Qt.AlignVCenter - implicitWidth: Math.round(34 * full.u) - implicitHeight: implicitWidth - radius: width / 2 - color: look.tile - - Kirigami.Icon { - anchors.centerIn: parent - implicitWidth: Math.round(18 * full.u) - implicitHeight: implicitWidth - // Shipped with the package rather than taken from the - // icon theme, so it is drawn as a mask: only its alpha - // is used and the colour comes from the theme, which - // is what keeps it legible on a light panel and on a - // dark one alike. - source: Qt.resolvedUrl("../icons/dipstick.svg") - isMask: true - color: look.ink - } - } - - // What this is, and which account the percentages belong to. - ColumnLayout { - Layout.fillWidth: true - Layout.alignment: Qt.AlignVCenter - spacing: 2 * full.u - - PlasmaComponents.Label { - Layout.fillWidth: true - elide: Text.ElideRight - text: i18n("Claude usage") - color: look.ink - font.family: look.uiFamily - font.pixelSize: Math.round(15 * full.u) - font.weight: Font.Medium - } - PlasmaComponents.Label { - Layout.fillWidth: true - visible: text !== "" - elide: Text.ElideRight - text: full.account ? (full.account.email || full.account.name || "") : "" - color: look.faint - font.family: look.monoFamily - font.pixelSize: Math.round(11 * full.u) - } - } - - // The plan qualifies every percentage below it. - Rectangle { - visible: full.account && full.account.plan - Layout.alignment: Qt.AlignVCenter - implicitWidth: planLabel.implicitWidth + Math.round(22 * full.u) - implicitHeight: Math.round(24 * full.u) - radius: height / 2 - color: look.ink - - PlasmaComponents.Label { - id: planLabel - anchors.centerIn: parent - // A product name, not translated text. - text: full.account ? full.account.plan : "" - color: look.paper - font.family: look.uiFamily - font.pixelSize: Math.round(11 * full.u) - font.weight: Font.Medium - font.letterSpacing: 0.6 * full.u - } - } - - // It asks the daemon for a round; the numbers still arrive - // the usual way, by re-reading the state file. - // - // Button and indicator live in a fixed-size slot rather than - // taking turns in the row: swapping two items of different - // widths would make the heading twitch on every click. - Item { - Layout.alignment: Qt.AlignVCenter - implicitWidth: Math.round(34 * full.u) - implicitHeight: implicitWidth - - PlasmaComponents.ToolButton { - id: refreshButton - anchors.fill: parent - display: PlasmaComponents.AbstractButton.IconOnly - text: i18n("Refresh now") - icon.name: root.refresher.error !== "" ? "dialog-warning" : "view-refresh" - icon.width: Math.round(16 * full.u) - icon.height: Math.round(16 * full.u) - // Hidden rather than removed while the click is in - // flight, so the indicator over it is the only thing - // moving. - opacity: root.refresher.busy ? 0 : 1 - enabled: !root.refresher.busy - onClicked: root.refresher.trigger() - - background: Rectangle { - radius: width / 2 - color: refreshButton.hovered || refreshButton.visualFocus - ? look.tileHover : look.tile - } - - PlasmaComponents.ToolTip.visible: hovered - PlasmaComponents.ToolTip.delay: Kirigami.Units.toolTipDelay - PlasmaComponents.ToolTip.text: root.refresher.error !== "" - ? root.refresher.error - : i18n("Refresh now") - } - - PlasmaComponents.BusyIndicator { - anchors.centerIn: parent - implicitWidth: Kirigami.Units.iconSizes.small - implicitHeight: Kirigami.Units.iconSizes.small - visible: root.refresher.busy - running: visible - } - } + account: full.account + refresher: root.refresher } - // The figure the panel shows, large: the limit that will be hit - // first. Which one that is was decided by the daemon. - RowLayout { + NearestLimit { Layout.fillWidth: true Layout.topMargin: 18 * full.u Layout.leftMargin: 12 * full.u Layout.rightMargin: 10 * full.u Layout.bottomMargin: 6 * full.u visible: full.primary !== null - spacing: 12 * full.u - - DotMatrix { - Layout.alignment: Qt.AlignBottom - text: full.primary - ? i18nc("percentage of quota used", "%1%", full.primary.percent) : "" - dotSize: 4.6 * full.u - gap: 1.6 * full.u - litColor: look.severityColor(full.primary ? full.primary.severity : "", - look.accent) - shineColor: look.dark - && Format.severityRank(full.primary ? full.primary.severity : "") === 0 - ? look.shine : litColor - glow: look.dark ? 0.38 : 0 - } - - ColumnLayout { - Layout.fillWidth: true - Layout.alignment: Qt.AlignBottom - spacing: 0 - - PlasmaComponents.Label { - Layout.fillWidth: true - horizontalAlignment: Text.AlignRight - elide: Text.ElideLeft - text: i18n("Nearest limit") - color: look.muted - font.family: look.uiFamily - font.pixelSize: Math.round(11 * full.u) - font.weight: Font.Medium - font.letterSpacing: 1.4 * full.u - font.capitalization: Font.AllUppercase - } - PlasmaComponents.Label { - Layout.fillWidth: true - horizontalAlignment: Text.AlignRight - elide: Text.ElideLeft - text: { - var name = Format.shortWindowLabel(full.primary, i18n) - var reset = full.primary - ? Format.untilResetShort(full.primary.resets_at, full.now, i18n) : "" - return reset === "" ? name - : i18nc("which window, and when it resets", "%1 · %2", name, reset) - } - color: look.faint - font.family: look.monoFamily - font.pixelSize: Math.round(11 * full.u) - } - } + window: full.primary + now: full.now } ColumnLayout { diff --git a/plasmoid/contents/ui/ModelBreakdown.qml b/plasmoid/contents/ui/ModelBreakdown.qml index c11ba6e..f3183f2 100644 --- a/plasmoid/contents/ui/ModelBreakdown.qml +++ b/plasmoid/contents/ui/ModelBreakdown.qml @@ -5,6 +5,8 @@ * The chart above answers "when"; this answers "how much per model". The * colour dot ties each row to its band in the chart. */ +pragma ComponentBehavior: Bound + import QtQuick import QtQuick.Layouts import org.kde.plasma.components as PlasmaComponents @@ -43,6 +45,7 @@ Item { Repeater { model: breakdown.shown delegate: RowLayout { + id: entry required property var modelData required property int index @@ -54,18 +57,18 @@ Item { implicitWidth: Math.round(7 * breakdown.u) implicitHeight: implicitWidth radius: width / 2 - color: look.modelColor(index) + color: look.modelColor(entry.index) } PlasmaComponents.Label { Layout.fillWidth: true elide: Text.ElideRight - text: Format.modelName(modelData.id) + text: Format.modelName(entry.modelData.id) color: look.muted font.family: look.uiFamily font.pixelSize: Math.round(12 * breakdown.u) } PlasmaComponents.Label { - text: Format.humanTokens(modelData.tokens) + text: Format.humanTokens(entry.modelData.tokens) color: look.ink font.family: look.monoFamily font.pixelSize: Math.round(12 * breakdown.u) diff --git a/plasmoid/contents/ui/NearestLimit.qml b/plasmoid/contents/ui/NearestLimit.qml new file mode 100644 index 0000000..c37ab04 --- /dev/null +++ b/plasmoid/contents/ui/NearestLimit.qml @@ -0,0 +1,79 @@ +/* + * The figure the panel shows, large: the limit that will be hit first, with + * which window it is and when it resets. Which one that is was decided by the + * daemon. + */ +import QtQuick +import QtQuick.Layouts +import org.kde.plasma.components as PlasmaComponents +import "format.js" as Format + +Item { + id: limit + + property var window: null + property double now: 0 + + readonly property real u: look.u + + Look { id: look } + + implicitHeight: row.implicitHeight + + RowLayout { + id: row + anchors { + left: parent.left + right: parent.right + } + spacing: 12 * limit.u + + DotMatrix { + Layout.alignment: Qt.AlignBottom + text: limit.window + ? i18nc("percentage of quota used", "%1%", limit.window.percent) : "" + dotSize: 4.6 * limit.u + gap: 1.6 * limit.u + litColor: look.severityColor(limit.window ? limit.window.severity : "", + look.accent) + shineColor: look.dark + && Format.severityRank(limit.window ? limit.window.severity : "") === 0 + ? look.shine : litColor + glow: look.dark ? 0.38 : 0 + } + + ColumnLayout { + Layout.fillWidth: true + Layout.alignment: Qt.AlignBottom + spacing: 0 + + PlasmaComponents.Label { + Layout.fillWidth: true + horizontalAlignment: Text.AlignRight + elide: Text.ElideLeft + text: i18n("Nearest limit") + color: look.muted + font.family: look.uiFamily + font.pixelSize: Math.round(11 * limit.u) + font.weight: Font.Medium + font.letterSpacing: 1.4 * limit.u + font.capitalization: Font.AllUppercase + } + PlasmaComponents.Label { + Layout.fillWidth: true + horizontalAlignment: Text.AlignRight + elide: Text.ElideLeft + text: { + var name = Format.shortWindowLabel(limit.window, i18n) + var reset = limit.window + ? Format.untilResetShort(limit.window.resets_at, limit.now, i18n) : "" + return reset === "" ? name + : i18nc("which window, and when it resets", "%1 · %2", name, reset) + } + color: look.faint + font.family: look.monoFamily + font.pixelSize: Math.round(11 * limit.u) + } + } + } +} diff --git a/plasmoid/contents/ui/PopupHeader.qml b/plasmoid/contents/ui/PopupHeader.qml new file mode 100644 index 0000000..0af6a36 --- /dev/null +++ b/plasmoid/contents/ui/PopupHeader.qml @@ -0,0 +1,154 @@ +/* + * The popup's heading: the widget's mark, what this is and whose account, + * then the plan and the one action, refresh. + * + * An Item around the row rather than the row itself, so its Look does not + * take a cell in the layout. + */ +import QtQuick +import QtQuick.Layouts +import org.kde.plasma.components as PlasmaComponents +import org.kde.kirigami as Kirigami + +Item { + id: header + + property var account: null + // Owned by the plasmoid's root, which outlives the popup: see main.qml. + property Refresher refresher + + readonly property real u: look.u + + Look { id: look } + + implicitHeight: row.implicitHeight + + // Identity on the left, the plan and the one action on the right. + RowLayout { + id: row + anchors { + left: parent.left + right: parent.right + } + spacing: 10 * header.u + + Rectangle { + Layout.alignment: Qt.AlignVCenter + implicitWidth: Math.round(34 * header.u) + implicitHeight: implicitWidth + radius: width / 2 + color: look.tile + + Kirigami.Icon { + anchors.centerIn: parent + implicitWidth: Math.round(18 * header.u) + implicitHeight: implicitWidth + // Shipped with the package rather than taken from the + // icon theme, so it is drawn as a mask: only its alpha + // is used and the colour comes from the theme, which + // is what keeps it legible on a light panel and on a + // dark one alike. + source: Qt.resolvedUrl("../icons/dipstick.svg") + isMask: true + Accessible.ignored: true + color: look.ink + } + } + + // What this is, and which account the percentages belong to. + ColumnLayout { + Layout.fillWidth: true + Layout.alignment: Qt.AlignVCenter + spacing: 2 * header.u + + PlasmaComponents.Label { + Layout.fillWidth: true + elide: Text.ElideRight + text: i18n("Claude usage") + color: look.ink + font.family: look.uiFamily + font.pixelSize: Math.round(15 * header.u) + font.weight: Font.Medium + } + PlasmaComponents.Label { + Layout.fillWidth: true + visible: text !== "" + elide: Text.ElideRight + text: header.account ? (header.account.email || header.account.name || "") : "" + color: look.faint + font.family: look.monoFamily + font.pixelSize: Math.round(11 * header.u) + } + } + + // The plan qualifies every percentage below it. + Rectangle { + visible: header.account && header.account.plan + Layout.alignment: Qt.AlignVCenter + implicitWidth: planLabel.implicitWidth + Math.round(22 * header.u) + implicitHeight: Math.round(24 * header.u) + radius: height / 2 + color: look.ink + + PlasmaComponents.Label { + id: planLabel + anchors.centerIn: parent + // A product name, not translated text. + text: header.account ? header.account.plan : "" + color: look.paper + font.family: look.uiFamily + font.pixelSize: Math.round(11 * header.u) + font.weight: Font.Medium + font.letterSpacing: 0.6 * header.u + } + } + + // It asks the daemon for a round; the numbers still arrive + // the usual way, by re-reading the state file. + // + // Button and indicator live in a fixed-size slot rather than + // taking turns in the row: swapping two items of different + // widths would make the heading twitch on every click. + Item { + Layout.alignment: Qt.AlignVCenter + implicitWidth: Math.round(34 * header.u) + implicitHeight: implicitWidth + + PlasmaComponents.ToolButton { + id: refreshButton + anchors.fill: parent + display: PlasmaComponents.AbstractButton.IconOnly + text: i18n("Refresh now") + icon.name: header.refresher.error !== "" ? "dialog-warning" : "view-refresh" + icon.width: Math.round(16 * header.u) + icon.height: Math.round(16 * header.u) + // Hidden rather than removed while the click is in + // flight, so the indicator over it is the only thing + // moving. + opacity: header.refresher.busy ? 0 : 1 + enabled: !header.refresher.busy + onClicked: header.refresher.trigger() + + background: Rectangle { + radius: width / 2 + color: refreshButton.hovered || refreshButton.visualFocus + ? look.tileHover : look.tile + } + + PlasmaComponents.ToolTip.visible: hovered + PlasmaComponents.ToolTip.delay: Kirigami.Units.toolTipDelay + PlasmaComponents.ToolTip.text: header.refresher.error !== "" + ? header.refresher.error + : i18n("Refresh now") + } + + PlasmaComponents.BusyIndicator { + anchors.centerIn: parent + implicitWidth: Kirigami.Units.iconSizes.small + implicitHeight: Kirigami.Units.iconSizes.small + visible: header.refresher.busy + running: visible + } + } + } +} diff --git a/plasmoid/contents/ui/TokensCard.qml b/plasmoid/contents/ui/TokensCard.qml index a365a7f..3ad6dc4 100644 --- a/plasmoid/contents/ui/TokensCard.qml +++ b/plasmoid/contents/ui/TokensCard.qml @@ -3,6 +3,8 @@ * chart and its legend. Tokens, not quota: there is no limit to measure them * against, so nothing here is coloured as a warning. */ +pragma ComponentBehavior: Bound + import QtQuick import QtQuick.Layouts import org.kde.plasma.components as PlasmaComponents diff --git a/plasmoid/contents/ui/main.qml b/plasmoid/contents/ui/main.qml index 6a991b7..23589e7 100644 --- a/plasmoid/contents/ui/main.qml +++ b/plasmoid/contents/ui/main.qml @@ -22,7 +22,7 @@ PlasmoidItem { StateSource { id: stateSource // The click is done waiting when the numbers have actually changed. - onUpdated: refresher.settle() + onUpdated: root.refresher.settle() } // Owned by the root and not by the popup, which Plasma destroys and diff --git a/translations/dipstick.pot b/translations/dipstick.pot index d1eaeb5..6765dd4 100644 --- a/translations/dipstick.pot +++ b/translations/dipstick.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: dipstick\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-10-22 14:04+0200\n" +"POT-Creation-Date: 2026-10-22 14:17+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,83 +17,64 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: plasmoid/contents/ui/CompactRepresentation.qml:82 -#: plasmoid/contents/ui/FullRepresentation.qml:293 +#: plasmoid/contents/ui/CompactRepresentation.qml:99 +#: plasmoid/contents/ui/NearestLimit.qml:34 #: plasmoid/contents/ui/QuotaRow.qml:84 msgctxt "percentage of quota used" msgid "%1%" msgstr "" -#: plasmoid/contents/ui/DailyChart.qml:147 -#: plasmoid/contents/ui/TokensCard.qml:56 +#: plasmoid/contents/ui/DailyChart.qml:152 +#: plasmoid/contents/ui/TokensCard.qml:58 msgid "today" msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:80 +#: plasmoid/contents/ui/FullRepresentation.qml:88 msgid "No data from the dipstick daemon" msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:83 +#: plasmoid/contents/ui/FullRepresentation.qml:91 msgid "Daemon and widget versions do not match" msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:86 +#: plasmoid/contents/ui/FullRepresentation.qml:94 msgid "The state file is unreadable" msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:89 +#: plasmoid/contents/ui/FullRepresentation.qml:97 msgid "Not signed in" msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:91 +#: plasmoid/contents/ui/FullRepresentation.qml:99 msgid "Quota unavailable" msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:95 +#: plasmoid/contents/ui/FullRepresentation.qml:103 msgid "Start it with: systemctl --user start dipstick" msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:98 +#: plasmoid/contents/ui/FullRepresentation.qml:106 msgid "Reinstall dipstick so both halves are on the same version." msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:101 +#: plasmoid/contents/ui/FullRepresentation.qml:109 #: plasmoid/contents/ui/main.qml:73 msgid "Sign in with: dipstick auth" msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:122 +#: plasmoid/contents/ui/FullRepresentation.qml:130 msgid "From local transcripts (tokens, not quota):" msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:128 +#: plasmoid/contents/ui/FullRepresentation.qml:136 msgid "%1 in the last 5h · %2 this week" msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:191 -#: plasmoid/contents/ui/main.qml:64 -msgid "Claude usage" -msgstr "" - -#: plasmoid/contents/ui/FullRepresentation.qml:245 -#: plasmoid/contents/ui/FullRepresentation.qml:266 -msgid "Refresh now" -msgstr "" - -#: plasmoid/contents/ui/FullRepresentation.qml:313 -msgid "Nearest limit" -msgstr "" - -#: plasmoid/contents/ui/FullRepresentation.qml:330 -msgctxt "which window, and when it resets" -msgid "%1 · %2" -msgstr "" - -#: plasmoid/contents/ui/FullRepresentation.qml:372 +#: plasmoid/contents/ui/FullRepresentation.qml:213 msgid "Quota data may be out of date." msgstr "" -#: plasmoid/contents/ui/FullRepresentation.qml:387 +#: plasmoid/contents/ui/FullRepresentation.qml:228 msgid "Extra usage credits are enabled: reaching 100% will not block you." msgstr "" @@ -107,6 +88,10 @@ msgctxt "quota window, its percentage and when it resets" msgid "%1: %2% — %3" msgstr "" +#: plasmoid/contents/ui/main.qml:64 plasmoid/contents/ui/PopupHeader.qml:67 +msgid "Claude usage" +msgstr "" + #: plasmoid/contents/ui/main.qml:65 msgid "Claude quota unavailable" msgstr "" @@ -115,6 +100,20 @@ msgstr "" msgid "The dipstick daemon is not running" msgstr "" +#: plasmoid/contents/ui/NearestLimit.qml:54 +msgid "Nearest limit" +msgstr "" + +#: plasmoid/contents/ui/NearestLimit.qml:71 +msgctxt "which window, and when it resets" +msgid "%1 · %2" +msgstr "" + +#: plasmoid/contents/ui/PopupHeader.qml:121 +#: plasmoid/contents/ui/PopupHeader.qml:142 +msgid "Refresh now" +msgstr "" + #: plasmoid/contents/ui/QuotaRow.qml:82 msgctxt "how much of a quota window is consumed; %1 is the percentage" msgid "%1 used" @@ -132,15 +131,15 @@ msgstr "" msgid "The daemon did not answer" msgstr "" -#: plasmoid/contents/ui/TokensCard.qml:39 +#: plasmoid/contents/ui/TokensCard.qml:41 msgid "Tokens used" msgstr "" -#: plasmoid/contents/ui/TokensCard.qml:57 +#: plasmoid/contents/ui/TokensCard.qml:59 msgid "this week" msgstr "" -#: plasmoid/contents/ui/TokensCard.qml:58 +#: plasmoid/contents/ui/TokensCard.qml:60 msgid "this month" msgstr "" diff --git a/translations/it.po b/translations/it.po index b312fc3..3638241 100644 --- a/translations/it.po +++ b/translations/it.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: dipstick 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-10-22 14:04+0200\n" +"POT-Creation-Date: 2026-10-22 14:17+0200\n" "PO-Revision-Date: 2026-08-27 14:00+0200\n" "Last-Translator: Claudio Quaglia\n" "Language-Team: Italiano\n" @@ -17,83 +17,64 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: plasmoid/contents/ui/CompactRepresentation.qml:82 -#: plasmoid/contents/ui/FullRepresentation.qml:293 +#: plasmoid/contents/ui/CompactRepresentation.qml:99 +#: plasmoid/contents/ui/NearestLimit.qml:34 #: plasmoid/contents/ui/QuotaRow.qml:84 msgctxt "percentage of quota used" msgid "%1%" msgstr "%1%" -#: plasmoid/contents/ui/DailyChart.qml:147 -#: plasmoid/contents/ui/TokensCard.qml:56 +#: plasmoid/contents/ui/DailyChart.qml:152 +#: plasmoid/contents/ui/TokensCard.qml:58 msgid "today" msgstr "oggi" -#: plasmoid/contents/ui/FullRepresentation.qml:80 +#: plasmoid/contents/ui/FullRepresentation.qml:88 msgid "No data from the dipstick daemon" msgstr "Nessun dato dal demone dipstick" -#: plasmoid/contents/ui/FullRepresentation.qml:83 +#: plasmoid/contents/ui/FullRepresentation.qml:91 msgid "Daemon and widget versions do not match" msgstr "Le versioni di demone e widget non coincidono" -#: plasmoid/contents/ui/FullRepresentation.qml:86 +#: plasmoid/contents/ui/FullRepresentation.qml:94 msgid "The state file is unreadable" msgstr "Il file di stato non e' leggibile" -#: plasmoid/contents/ui/FullRepresentation.qml:89 +#: plasmoid/contents/ui/FullRepresentation.qml:97 msgid "Not signed in" msgstr "Accesso non effettuato" -#: plasmoid/contents/ui/FullRepresentation.qml:91 +#: plasmoid/contents/ui/FullRepresentation.qml:99 msgid "Quota unavailable" msgstr "Quota non disponibile" -#: plasmoid/contents/ui/FullRepresentation.qml:95 +#: plasmoid/contents/ui/FullRepresentation.qml:103 msgid "Start it with: systemctl --user start dipstick" msgstr "Avvialo con: systemctl --user start dipstick" -#: plasmoid/contents/ui/FullRepresentation.qml:98 +#: plasmoid/contents/ui/FullRepresentation.qml:106 msgid "Reinstall dipstick so both halves are on the same version." msgstr "Reinstalla dipstick per allineare le due meta'." -#: plasmoid/contents/ui/FullRepresentation.qml:101 +#: plasmoid/contents/ui/FullRepresentation.qml:109 #: plasmoid/contents/ui/main.qml:73 msgid "Sign in with: dipstick auth" msgstr "Accedi con: dipstick auth" -#: plasmoid/contents/ui/FullRepresentation.qml:122 +#: plasmoid/contents/ui/FullRepresentation.qml:130 msgid "From local transcripts (tokens, not quota):" msgstr "Dai transcript locali (token, non quota):" -#: plasmoid/contents/ui/FullRepresentation.qml:128 +#: plasmoid/contents/ui/FullRepresentation.qml:136 msgid "%1 in the last 5h · %2 this week" msgstr "%1 nelle ultime 5h · %2 questa settimana" -#: plasmoid/contents/ui/FullRepresentation.qml:191 -#: plasmoid/contents/ui/main.qml:64 -msgid "Claude usage" -msgstr "Consumo Claude" - -#: plasmoid/contents/ui/FullRepresentation.qml:245 -#: plasmoid/contents/ui/FullRepresentation.qml:266 -msgid "Refresh now" -msgstr "Aggiorna adesso" - -#: plasmoid/contents/ui/FullRepresentation.qml:313 -msgid "Nearest limit" -msgstr "Il limite più vicino" - -#: plasmoid/contents/ui/FullRepresentation.qml:330 -msgctxt "which window, and when it resets" -msgid "%1 · %2" -msgstr "%1 · %2" - -#: plasmoid/contents/ui/FullRepresentation.qml:372 +#: plasmoid/contents/ui/FullRepresentation.qml:213 msgid "Quota data may be out of date." msgstr "I dati della quota potrebbero non essere aggiornati." -#: plasmoid/contents/ui/FullRepresentation.qml:387 +#: plasmoid/contents/ui/FullRepresentation.qml:228 msgid "Extra usage credits are enabled: reaching 100% will not block you." msgstr "I crediti aggiuntivi sono attivi: toccare il 100% non ti bloccherà." @@ -107,6 +88,10 @@ msgctxt "quota window, its percentage and when it resets" msgid "%1: %2% — %3" msgstr "%1: %2% — %3" +#: plasmoid/contents/ui/main.qml:64 plasmoid/contents/ui/PopupHeader.qml:67 +msgid "Claude usage" +msgstr "Consumo Claude" + #: plasmoid/contents/ui/main.qml:65 msgid "Claude quota unavailable" msgstr "Quota Claude non disponibile" @@ -115,6 +100,20 @@ msgstr "Quota Claude non disponibile" msgid "The dipstick daemon is not running" msgstr "Il demone dipstick non e' in esecuzione" +#: plasmoid/contents/ui/NearestLimit.qml:54 +msgid "Nearest limit" +msgstr "Il limite più vicino" + +#: plasmoid/contents/ui/NearestLimit.qml:71 +msgctxt "which window, and when it resets" +msgid "%1 · %2" +msgstr "%1 · %2" + +#: plasmoid/contents/ui/PopupHeader.qml:121 +#: plasmoid/contents/ui/PopupHeader.qml:142 +msgid "Refresh now" +msgstr "Aggiorna adesso" + #: plasmoid/contents/ui/QuotaRow.qml:82 msgctxt "how much of a quota window is consumed; %1 is the percentage" msgid "%1 used" @@ -132,15 +131,15 @@ msgstr "Aggiornamento non riuscito" msgid "The daemon did not answer" msgstr "Il demone non ha risposto" -#: plasmoid/contents/ui/TokensCard.qml:39 +#: plasmoid/contents/ui/TokensCard.qml:41 msgid "Tokens used" msgstr "Token consumati" -#: plasmoid/contents/ui/TokensCard.qml:57 +#: plasmoid/contents/ui/TokensCard.qml:59 msgid "this week" msgstr "questa settimana" -#: plasmoid/contents/ui/TokensCard.qml:58 +#: plasmoid/contents/ui/TokensCard.qml:60 msgid "this month" msgstr "questo mese" -- knotmirror 0.0.1