From 4e6b015b95d2b9a435676c773e9f5d0d619945ba Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Wed, 27 Mar 2019 02:11:28 +0200 Subject: [PATCH] update translation strings for percentage values --this way each language will be able to set its own format to show a numbered percentage --- indicators/default/package/config/config.qml | 2 +- .../configuration/pages/AppearanceConfig.qml | 18 +++++++++--------- .../configuration/pages/EffectsConfig.qml | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/indicators/default/package/config/config.qml b/indicators/default/package/config/config.qml index 50005373e..aff7123be 100644 --- a/indicators/default/package/config/config.qml +++ b/indicators/default/package/config/config.qml @@ -174,7 +174,7 @@ ColumnLayout { } PlasmaComponents.Label { - text: glowOpacitySlider.value + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(glowOpacitySlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 diff --git a/shell/package/contents/configuration/pages/AppearanceConfig.qml b/shell/package/contents/configuration/pages/AppearanceConfig.qml index 871ef02ab..ee71a13d3 100644 --- a/shell/package/contents/configuration/pages/AppearanceConfig.qml +++ b/shell/package/contents/configuration/pages/AppearanceConfig.qml @@ -203,7 +203,7 @@ PlasmaComponents.Page { } PlasmaComponents.Label { - text: appletsSizeSlider.value + " px." + text: i18nc("number in pixels, e.g. 12 px.", "%0 px.").arg(appletsSizeSlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 @@ -255,7 +255,7 @@ PlasmaComponents.Page { PlasmaComponents.Label { text: proportionSizeSlider.value !== proportionSizeSlider.from ? - proportionSizeSlider.value.toFixed(1) + " %" : "--- %" + i18nc("number in percentage, e.g. 85 %","%0 %").arg(proportionSizeSlider.value.toFixed(1)) : i18nc("no value in percentage","--- %") horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 @@ -309,7 +309,7 @@ PlasmaComponents.Page { } PlasmaComponents.Label { - text: Number((zoomSlider.value * 100) - 100).toFixed(0) + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(Number((zoomSlider.value * 100) - 100).toFixed(0)) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 @@ -400,7 +400,7 @@ PlasmaComponents.Page { } PlasmaComponents.Label { - text: maxLengthSlider.value + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(maxLengthSlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 @@ -460,7 +460,7 @@ PlasmaComponents.Page { } PlasmaComponents.Label { - text: offsetSlider.value + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(offsetSlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 @@ -517,7 +517,7 @@ PlasmaComponents.Page { } PlasmaComponents.Label { - text: lengthExtMarginSlider.value + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(lengthExtMarginSlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 @@ -569,7 +569,7 @@ PlasmaComponents.Page { } PlasmaComponents.Label { - text: thickMarginSlider.value + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(thickMarginSlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 @@ -765,7 +765,7 @@ PlasmaComponents.Page { PlasmaComponents.Label { enabled: showBackground.checked - text: panelSizeSlider.value + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(panelSizeSlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 @@ -817,7 +817,7 @@ PlasmaComponents.Page { PlasmaComponents.Label { enabled: transparencySlider.enabled - text: transparencySlider.value + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(transparencySlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 diff --git a/shell/package/contents/configuration/pages/EffectsConfig.qml b/shell/package/contents/configuration/pages/EffectsConfig.qml index b122ccaaf..f569a9af5 100644 --- a/shell/package/contents/configuration/pages/EffectsConfig.qml +++ b/shell/package/contents/configuration/pages/EffectsConfig.qml @@ -116,7 +116,7 @@ PlasmaComponents.Page { PlasmaComponents.Label { enabled: showAppletShadow.checked - text: shadowSizeSlider.value + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(shadowSizeSlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 @@ -163,7 +163,7 @@ PlasmaComponents.Page { PlasmaComponents.Label { enabled: showAppletShadow.checked - text: shadowOpacitySlider.value + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(shadowOpacitySlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4 @@ -572,7 +572,7 @@ PlasmaComponents.Page { } PlasmaComponents.Label { - text: lengthIntMarginSlider.value + " %" + text: i18nc("number in percentage, e.g. 85 %","%0 %").arg(lengthIntMarginSlider.value) horizontalAlignment: Text.AlignRight Layout.minimumWidth: theme.mSize(theme.defaultFont).width * 4 Layout.maximumWidth: theme.mSize(theme.defaultFont).width * 4