Very early KDE 6 release.

This commit is contained in:
wackyideas 2024-08-09 03:20:25 +02:00
parent 7cc4ccabbc
commit 686046d4f7
6272 changed files with 140920 additions and 529657 deletions

View file

@ -0,0 +1,10 @@
import QtQuick 2.15
import org.kde.plasma.configuration
ConfigModel {
ConfigCategory {
name: i18n("General")
icon: "preferences-desktop-color"
source: "config/ConfigGeneral.qml"
}
}

View file

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0 http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<kcfgfile name=""/>
<group name="General">
<entry name="click_action" type="string">
<default>run_command</default>
</entry>
<entry name="click_command" type="string">
<default>qdbus6 org.kde.kglobalaccel /component/kwin invokeShortcut "MinimizeAll"</default>
</entry>
<entry name="mousewheel_action" type="string">
<default>run_commands</default>
</entry>
<entry name="mousewheel_up" type="string">
<default>qdbus6 org.kde.kglobalaccel /component/kmix invokeShortcut "increase_volume"</default>
</entry>
<entry name="mousewheel_down" type="string">
<default>qdbus6 org.kde.kglobalaccel /component/kmix invokeShortcut "decrease_volume"</default>
</entry>
<entry name="size" type="int">
<default>9</default>
</entry>
<entry name="peekingEnabled" type="bool">
<default>true</default>
</entry>
<entry name="peekingThreshold" type="int">
<default>750</default>
</entry>
<entry name="edgeColor" type="string">
<default></default>
</entry>
<entry name="hoveredColor" type="string">
<default></default>
</entry>
<entry name="pressedColor" type="string">
<default></default>
</entry>
</group>
</kcfg>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,19 @@
import QtQuick 2.15
import org.kde.kirigami as Kirigami
import org.kde.plasma.plasmoid
QtObject {
id: config
// Colors
function alpha(c, newAlpha) {
return Qt.rgba(c.r, c.g, c.b, newAlpha)
}
property color defaultEdgeColor: alpha(Kirigami.Theme.textColor, 0.4)
property color defaultHoveredColor: Kirigami.Theme.backgroundColor
property color defaultPressedColor: Kirigami.Theme.hoverColor
property color edgeColor: Plasmoid.configuration.edgeColor || defaultEdgeColor
property color hoveredColor: Plasmoid.configuration.hoveredColor || defaultHoveredColor
property color pressedColor: Plasmoid.configuration.pressedColor || defaultPressedColor
}

View file

@ -0,0 +1,25 @@
/*
SPDX-FileCopyrightText: 2022 ivan (@ratijas) tkachenko <me@ratijas.tk>
SPDX-License-Identifier: GPL-2.0-or-later
*/
import org.kde.plasma.plasmoid 2.0
Controller {
id: controller
titleInactive: i18nc("@action:button", "Run custom command")
titleActive: titleInactive
descriptionActive: i18nc("@info:tooltip", "Run user-defined command when pressed")
descriptionInactive: descriptionActive
active: false
// override
function toggle() {
root.exec(Plasmoid.configuration.click_command);
}
}

View file

@ -0,0 +1,26 @@
/*
SPDX-FileCopyrightText: 2022 ivan (@ratijas) tkachenko <me@ratijas.tk>
SPDX-License-Identifier: GPL-2.0-or-later
*/
import QtQml 2.15
QtObject {
/**
* Whether the effect is currently active, and can be deactivated.
*/
property bool active
property string titleActive
property string titleInactive
property string descriptionActive
property string descriptionInactive
readonly property string title: active ? titleActive : titleInactive
readonly property string description: active ? descriptionActive : descriptionInactive
// virtual
function toggle() {}
}

View file

@ -0,0 +1,93 @@
/*
SPDX-FileCopyrightText: 2015 Sebastian Kügler <sebas@kde.org>
SPDX-FileCopyrightText: 2016 Anthony Fieroni <bvbfan@abv.bg>
SPDX-FileCopyrightText: 2018 David Edmundson <davidedmundson@kde.org>
SPDX-FileCopyrightText: 2022 ivan (@ratijas) tkachenko <me@ratijas.tk>
SPDX-License-Identifier: GPL-2.0-or-later
*/
import QtQml 2.15
import org.kde.taskmanager 0.1 as TaskManager
Controller {
id: controller
titleActive: i18nc("@action:button", "Restore All Minimized Windows")
titleInactive: i18nc("@action:button", "Minimize All Windows")
descriptionActive: i18nc("@info:tooltip", "Restores the previously minimized windows")
descriptionInactive: i18nc("@info:tooltip", "Shows the Desktop by minimizing all windows")
readonly property QtObject tasksModel: TaskManager.TasksModel {
id: tasksModel
sortMode: TaskManager.TasksModel.SortDisabled
groupMode: TaskManager.TasksModel.GroupDisabled
}
readonly property Connections activeTaskChangedConnection: Connections {
target: tasksModel
enabled: controller.active
function onActiveTaskChanged() {
if (tasksModel.activeTask.valid) { // to suppress changing focus to non windows, such as the desktop
controller.active = false;
controller.minimizedClients = [];
}
}
function onVirtualDesktopChanged() {
controller.deactivate();
}
function onActivityChanged() {
controller.deactivate();
}
}
/**
* List of persistent model indexes from task manager model of
* clients minimized by us
*/
property var minimizedClients: []
function activate() {
const clients = [];
for (let i = 0; i < tasksModel.count; i++) {
const idx = tasksModel.makeModelIndex(i);
if (!tasksModel.data(idx, TaskManager.AbstractTasksModel.IsHidden)) {
tasksModel.requestToggleMinimized(idx);
clients.push(tasksModel.makePersistentModelIndex(i));
}
}
minimizedClients = clients;
active = true;
}
function deactivate() {
active = false;
for (let i = 0; i < minimizedClients.length; i++) {
const idx = minimizedClients[i];
// client deleted, do nothing
if (!idx.valid) {
continue;
}
// if the user has restored it already, do nothing
if (!tasksModel.data(idx, TaskManager.AbstractTasksModel.IsHidden)) {
continue;
}
tasksModel.requestToggleMinimized(idx);
}
minimizedClients = [];
}
// override
function toggle() {
if (active) {
deactivate();
} else {
activate();
}
}
}

View file

@ -0,0 +1,30 @@
/*
SPDX-FileCopyrightText: 2022 ivan (@ratijas) tkachenko <me@ratijas.tk>
SPDX-License-Identifier: GPL-2.0-or-later
*/
import org.kde.plasma.private.showdesktop 0.1
import org.kde.plasma.plasmoid 2.0
Controller {
id: controller
titleInactive: i18nc("@action:button", "Peek at Desktop")
titleActive: Plasmoid.containment.corona.editMode ? titleInactive : i18nc("@action:button", "Stop Peeking at Desktop")
descriptionActive: i18nc("@info:tooltip", "Moves windows back to their original positions")
descriptionInactive: i18nc("@info:tooltip", "Temporarily shows the desktop by moving windows away")
active: showdesktop.showingDesktop
// override
function toggle() {
showdesktop.toggleDesktop();
}
readonly property ShowDesktop showdesktop: ShowDesktop {
id: showdesktop
}
}

View file

@ -0,0 +1,224 @@
import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.1
import org.kde.kirigami as Kirigami
import ".."
import "../lib"
ConfigPage {
id: page
showAppletVersion: true
property string cfg_click_action: 'showdesktop'
property alias cfg_click_command: click_command.text
property string cfg_mousewheel_action: 'run_commands'
property alias cfg_mousewheel_up: mousewheel_up.text
property alias cfg_mousewheel_down: mousewheel_down.text
property bool showDebug: false
property int indentWidth: 24
AppletConfig {
id: config
}
function setClickCommand(command) {
cfg_click_action = 'run_command'
clickGroup_runcommand.checked = true
cfg_click_command = command
}
function setMouseWheelCommands(up, down) {
cfg_mousewheel_action = 'run_commands'
mousewheelGroup_runcommands.checked = true
cfg_mousewheel_up = up
cfg_mousewheel_down = down
}
ConfigSection {
title: i18n("Look")
Kirigami.FormLayout {
Layout.fillWidth: true
ConfigSpinBox {
Kirigami.FormData.label: i18n("Size:")
configKey: 'size'
suffix: i18n("px")
}
ConfigColor {
Kirigami.FormData.label: i18n("Edge Color:")
configKey: "edgeColor"
defaultColor: config.defaultEdgeColor
label: ""
}
ConfigColor {
Kirigami.FormData.label: i18n("Hovered Color:")
configKey: "hoveredColor"
defaultColor: config.defaultHoveredColor
label: ""
}
ConfigColor {
Kirigami.FormData.label: i18n("Pressed Color:")
configKey: "pressedColor"
defaultColor: config.defaultPressedColor
label: ""
}
}
}
ButtonGroup { id: clickGroup }
ConfigSection {
title: i18n("Click")
RadioButton {
ButtonGroup.group: clickGroup
checked: cfg_click_action == 'showdesktop'
text: i18nd("plasma_applet_org.kde.plasma.showdesktop", "Show Desktop")
onClicked: {
cfg_click_action = 'showdesktop'
}
}
RadioButton {
ButtonGroup.group: clickGroup
checked: cfg_click_action == 'minimizeall'
text: i18ndc("plasma_applet_org.kde.plasma.showdesktop", "@action", "Minimize All Windows")
onClicked: {
cfg_click_action = 'minimizeall'
}
}
RadioButton {
id: clickGroup_runcommand
ButtonGroup.group: clickGroup
checked: cfg_click_action == 'run_command'
text: i18n("Run Command")
onClicked: {
cfg_click_action = 'run_command'
}
}
RowLayout {
Layout.fillWidth: true
Text { width: indentWidth } // indent
TextField {
Layout.fillWidth: true
id: click_command
}
}
RadioButton {
ButtonGroup.group: clickGroup
checked: false
text: i18nd("kwin_effects", "Toggle Present Windows (All desktops)")
property string command: 'qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "ExposeAll"'
onClicked: setClickCommand(command)
}
RadioButton {
ButtonGroup.group: clickGroup
checked: false
text: i18nd("kwin_effects", "Toggle Present Windows (Current desktop)")
property string command: 'qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "Expose"'
onClicked: setClickCommand(command)
}
RadioButton {
ButtonGroup.group: clickGroup
checked: false
text: i18nd("kwin_effects", "Toggle Present Windows (Window class)")
property string command: 'qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "ExposeClass"'
onClicked: setClickCommand(command)
}
}
ButtonGroup { id: mousewheelGroup }
ConfigSection {
title: i18n("Mouse Wheel")
RadioButton {
id: mousewheelGroup_runcommands
ButtonGroup.group: mousewheelGroup
checked: cfg_mousewheel_action == 'run_commands'
text: i18n("Run Commands")
onClicked: {
cfg_mousewheel_action = 'run_commands'
}
}
RowLayout {
Layout.fillWidth: true
Text { width: indentWidth } // indent
Label {
text: i18n("Scroll Up:")
}
TextField {
Layout.fillWidth: true
id: mousewheel_up
}
}
RowLayout {
Layout.fillWidth: true
Text { width: indentWidth } // indent
Label {
text: i18n("Scroll Down:")
}
TextField {
Layout.fillWidth: true
id: mousewheel_down
}
}
RadioButton {
ButtonGroup.group: mousewheelGroup
checked: false
text: i18n("Volume (No UI) (amixer)")
onClicked: setMouseWheelCommands('amixer -q sset Master 10%+', 'amixer -q sset Master 10%-')
}
RadioButton {
ButtonGroup.group: mousewheelGroup
checked: false
text: i18n("Volume (UI) (qdbus)")
property string upCommand: 'qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "increase_volume"'
property string downCommand: 'qdbus org.kde.kglobalaccel /component/kmix invokeShortcut "decrease_volume"'
onClicked: setMouseWheelCommands(upCommand, downCommand)
}
RadioButton {
ButtonGroup.group: mousewheelGroup
checked: false
text: i18n("Switch Desktop (qdbus)")
property string upCommand: 'qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "Switch One Desktop to the Left"'
property string downCommand: 'qdbus org.kde.kglobalaccel /component/kwin invokeShortcut "Switch One Desktop to the Right"'
onClicked: setMouseWheelCommands(upCommand, downCommand)
}
}
ConfigSection {
title: i18n("Peek")
Kirigami.FormLayout {
Layout.fillWidth: true
ConfigCheckBox {
Kirigami.FormData.label: i18n("Show desktop on hover:")
configKey: "peekingEnabled"
text: i18n("Enable")
}
ConfigSpinBox {
Kirigami.FormData.label: i18n("Peek threshold:")
configKey: 'peekingThreshold'
suffix: i18n("ms")
stepSize: 50
from: 0
}
}
}
}

View file

@ -0,0 +1,50 @@
import QtQuick 2.15
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3
import org.kde.plasma.plasma5support as Plasma5Support
import org.kde.plasma.plasmoid
Item {
implicitWidth: label.implicitWidth
implicitHeight: label.implicitHeight
property string version: "?"
property string metadataFilepath: Plasmoid.file("", "../metadata.desktop")
Plasma5Support.DataSource {
id: executable
engine: "executable"
connectedSources: []
onNewData: {
var exitCode = data["exit code"]
var exitStatus = data["exit status"]
var stdout = data["stdout"]
var stderr = data["stderr"]
exited(exitCode, exitStatus, stdout, stderr)
disconnectSource(sourceName) // cmd finished
}
function exec(cmd) {
connectSource(cmd)
}
signal exited(int exitCode, int exitStatus, string stdout, string stderr)
}
Connections {
target: executable
function onExited() {
version = stdout.replace('\n', ' ').trim()
}
}
Label {
id: label
text: i18n("<b>Version:</b> %1", version)
}
Component.onCompleted: {
var cmd = 'kreadconfig6 --file "' + metadataFilepath + '" --group "Desktop Entry" --key "X-KDE-PluginInfo-Version"'
executable.exec(cmd)
}
}

View file

@ -0,0 +1,18 @@
import QtQuick 2.15
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.components as PlasmaComponents
import org.kde.plasma.plasmoid
import ".."
CheckBox {
id: configCheckBox
property string configKey: ''
checked: Plasmoid.configuration[configKey]
onClicked: Plasmoid.configuration[configKey] = !Plasmoid.configuration[configKey]
}

View file

@ -0,0 +1,110 @@
import QtQuick 2.15
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3
import QtQuick.Dialogs
import QtQuick.Window 2.12
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.components as PlasmaComponents
import org.kde.kirigami as Kirigami
import org.kde.plasma.plasmoid
import ".."
RowLayout {
id: configColor
spacing: 2
// Layout.fillWidth: true
Layout.maximumWidth: 300
property alias label: label.text
property alias horizontalAlignment: label.horizontalAlignment
property string configKey: ''
property string defaultColor: ''
property string value: {
if (configKey) {
return Plasmoid.configuration[configKey]
} else {
return "#000"
}
}
readonly property color defaultColorValue: defaultColor
readonly property color valueColor: {
if (value == '' && defaultColor) {
return defaultColor
} else {
return value
}
}
onValueChanged: {
if (!textField.activeFocus) {
textField.text = configColor.value
}
if (configKey) {
if (value == defaultColorValue) {
Plasmoid.configuration[configKey] = ""
} else {
Plasmoid.configuration[configKey] = value
}
}
}
function setValue(newColor) {
textField.text = newColor
}
Label {
id: label
text: "Label"
Layout.fillWidth: horizontalAlignment == Text.AlignRight
horizontalAlignment: Text.AlignLeft
}
MouseArea {
id: mouseArea
width: textField.height
height: textField.height
hoverEnabled: true
onClicked: dialog.open()
Rectangle {
anchors.fill: parent
color: configColor.valueColor
border.width: 2
border.color: parent.containsMouse ? Kirigami.Theme.highlightColor : "#BB000000"
}
}
TextField {
id: textField
placeholderText: defaultColor ? defaultColor : "#AARRGGBB"
Layout.fillWidth: label.horizontalAlignment == Text.AlignLeft
onTextChanged: {
// Make sure the text is:
// Empty (use default)
// or #123 or #112233 or #11223344 before applying the color.
if (text.length === 0
|| (text.indexOf('#') === 0 && (text.length == 4 || text.length == 7 || text.length == 9))
) {
configColor.value = text
}
}
}
ColorDialog {
id: dialog
visible: false
modality: Qt.WindowModal
title: configColor.label
flags: ColorDialog.ShowAlphaChannel
selectedColor: configColor.valueColor
onAccepted: {
configColor.value = selectedColor
}
}
}

View file

@ -0,0 +1,39 @@
// Version 4
import QtQuick 2.15
import QtQuick.Layouts 1.3
import org.kde.kcmutils as KCM
KCM.SimpleKCM {
id: page
Layout.fillWidth: true
default property alias _contentChildren: content.data
implicitHeight: content.implicitHeight
ColumnLayout {
id: content
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
// Workaround for crash when using default on a Layout.
// https://bugreports.qt.io/browse/QTBUG-52490
// Still affecting Qt 5.7.0
Component.onDestruction: {
while (children.length > 0) {
children[children.length - 1].parent = page
}
}
}
property alias showAppletVersion: appletVersionLoader.active
Loader {
id: appletVersionLoader
active: false
visible: active
source: "AppletVersion.qml"
anchors.right: parent.right
anchors.bottom: parent.top
}
}

View file

@ -0,0 +1,24 @@
import QtQuick 2.15
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3
GroupBox {
id: configSection
Layout.fillWidth: true
default property alias _contentChildren: content.data
ColumnLayout {
id: content
anchors.left: parent.left
anchors.right: parent.right
// Workaround for crash when using default on a Layout.
// https://bugreports.qt.io/browse/QTBUG-52490
// Still affecting Qt 5.7.0
Component.onDestruction: {
while (children.length > 0) {
children[children.length - 1].parent = configSection
}
}
}
}

View file

@ -0,0 +1,54 @@
import QtQuick 2.15
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3
import org.kde.plasma.plasmoid
RowLayout {
id: configSpinBox
property string configKey: ''
property alias to: spinBox.to
property alias from: spinBox.from
property alias prefix: spinBox.prefix
property alias stepSize: spinBox.stepSize
property alias suffix: spinBox.suffix
property alias value: spinBox.value
property alias before: labelBefore.text
property alias after: labelAfter.text
Label {
id: labelBefore
text: ""
visible: text
}
SpinBox {
id: spinBox
property string prefix
property string suffix
value: Plasmoid.configuration[configKey]
// onValueChanged: Plasmoid.configuration[configKey] = value
onValueChanged: serializeTimer.start()
to: 2147483647
textFromValue: function(value) {
return prefix + value + suffix;
}
}
Label {
id: labelAfter
text: ""
visible: text
}
Timer { // throttle
id: serializeTimer
interval: 300
onTriggered: Plasmoid.configuration[configKey] = value
}
}

View file

@ -0,0 +1,320 @@
/*
SPDX-FileCopyrightText: 2014 Ashish Madeti <ashishmadeti@gmail.com>
SPDX-FileCopyrightText: 2016 Kai Uwe Broulik <kde@privat.broulik.de>
SPDX-FileCopyrightText: 2019 Chris Holland <zrenfire@gmail.com>
SPDX-FileCopyrightText: 2022 ivan (@ratijas) tkachenko <me@ratijas.tk>
SPDX-License-Identifier: GPL-2.0-or-later
*/
import QtQuick 2.15
import QtQuick.Layouts 1.3
import org.kde.plasma.core as PlasmaCore
import org.kde.plasma.plasma5support as Plasma5Support
import org.kde.kirigami as Kirigami
import org.kde.ksvg as KSvg
import org.kde.plasma.plasmoid
PlasmoidItem {
id: root
preferredRepresentation: fullRepresentation
toolTipSubText: activeController.description
Plasmoid.icon: "transform-move"
Plasmoid.title: activeController.title
Plasmoid.onActivated: {
peekTimer.stop();
if (isPeeking) {
isPeeking = false;
if(peekController.active)
peekController.toggle();
}
activeController.toggle();
}
Plasmoid.backgroundHints: PlasmaCore.Types.NoBackground
Layout.minimumWidth: Kirigami.Units.iconSizes.medium
Layout.minimumHeight: Kirigami.Units.iconSizes.medium
Layout.maximumWidth: vertical ? Layout.minimumWidth : Math.max(1, Plasmoid.configuration.size)
Layout.maximumHeight: vertical ? Math.max(1, Plasmoid.configuration.size) : Layout.minimumHeight
Layout.preferredWidth: Layout.maximumWidth
Layout.preferredHeight: Layout.maximumHeight
Plasmoid.constraintHints: Plasmoid.CanFillArea
readonly property bool inPanel: [PlasmaCore.Types.TopEdge, PlasmaCore.Types.RightEdge, PlasmaCore.Types.BottomEdge, PlasmaCore.Types.LeftEdge]
.includes(Plasmoid.location)
readonly property bool vertical: Plasmoid.location === PlasmaCore.Types.RightEdge || Plasmoid.location === PlasmaCore.Types.LeftEdge
readonly property Controller primaryController: {
if (Plasmoid.configuration.click_action == "minimizeall") {
return minimizeAllController;
} else if (Plasmoid.configuration.click_action == "showdesktop") {
return peekController;
} else {
return commandController;
}
}
readonly property Controller activeController: {
return primaryController;
if (minimizeAllController.active) {
return minimizeAllController;
} else {
return primaryController;
}
}
property bool isPeeking: false
MouseArea {
id: mouseArea
anchors.fill: parent
anchors.rightMargin: -Kirigami.Units.smallSpacing - Kirigami.Units.smallSpacing/2;
activeFocusOnTab: true
hoverEnabled: true
onClicked: Plasmoid.activated();
onEntered: {
if (Plasmoid.configuration.peekingEnabled)
peekTimer.start();
}
onExited: {
peekTimer.stop();
if (isPeeking) {
isPeeking = false;
if(peekController.active)
peekController.toggle();
}
}
// org.kde.plasma.volume
property int wheelDelta: 0
onWheel: wheel => {
const delta = (wheel.inverted ? -1 : 1) * (wheel.angleDelta.y ? wheel.angleDelta.y : -wheel.angleDelta.x);
wheelDelta += delta;
// Magic number 120 for common "one click"
// See: https://qt-project.org/doc/qt-5/qml-qtquick-wheelevent.html#angleDelta-prop
while (wheelDelta >= 120) {
wheelDelta -= 120;
performMouseWheelUp();
}
while (wheelDelta <= -120) {
wheelDelta += 120;
performMouseWheelDown();
}
}
Keys.onPressed: {
switch (event.key) {
case Qt.Key_Space:
case Qt.Key_Enter:
case Qt.Key_Return:
case Qt.Key_Select:
Plasmoid.activated();
break;
}
}
Accessible.name: Plasmoid.title
Accessible.description: toolTipSubText
Accessible.role: Accessible.Button
PeekController {
id: peekController
}
MinimizeAllController {
id: minimizeAllController
}
CommandController {
id: commandController
}
Kirigami.Icon {
anchors.fill: parent
active: mouseArea.containsMouse || activeController.active
visible: Plasmoid.containment.corona.editMode
source: Plasmoid.icon
}
// also activate when dragging an item over the plasmoid so a user can easily drag data to the desktop
DropArea {
anchors.fill: parent
onEntered: activateTimer.start()
onExited: activateTimer.stop()
}
Timer {
id: activateTimer
interval: 250 // to match TaskManager
onTriggered: Plasmoid.activated()
}
Timer {
id: peekTimer
interval: Plasmoid.configuration.peekingThreshold
onTriggered: {
if (!minimizeAllController.active && !peekController.active) {
isPeeking = true;
peekController.toggle();
}
}
}
state: {
if (mouseArea.containsPress) {
return "selected";
} else if (mouseArea.containsMouse || mouseArea.activeFocus) {
return "hover";
} else {
return "normal";
}
}
component ButtonSurface : Rectangle {
property var containerMargins: {
let item = this;
while (item.parent) {
item = item.parent;
if (item.isAppletContainer) {
return item.getMargins;
}
}
return undefined;
}
anchors {
fill: parent
property bool returnAllMargins: true
// The above makes sure margin is returned even for side margins
// that would be otherwise turned off.
topMargin: !vertical && containerMargins ? -containerMargins('top', returnAllMargins) : 0
leftMargin: vertical && containerMargins ? -containerMargins('left', returnAllMargins) : 0
rightMargin: vertical && containerMargins ? -containerMargins('right', returnAllMargins) : 0
bottomMargin: !vertical && containerMargins ? -containerMargins('bottom', returnAllMargins) : 0
}
Behavior on opacity { OpacityAnimator { duration: Kirigami.Units.longDuration; easing.type: Easing.OutCubic } }
}
KSvg.FrameSvgItem {
anchors {
fill: parent;
}
imagePath: Qt.resolvedUrl("svgs/showdesktop.svg")
prefix: mouseArea.state
}
/*ButtonSurface {
id: hoverSurface
color: Plasmoid.configuration.hoveredColor
opacity: mouseArea.state === "hover" ? 1 : 0
}
ButtonSurface {
id: pressedSurface
color: Plasmoid.configuration.pressedColor
opacity: mouseArea.state === "pressed" ? 1 : 0
}
ButtonSurface {
id: edgeLine
border.color: Plasmoid.configuration.edgeColor
color: "transparent"
border.width: 1
KSvg.FrameSvgItem {
anchors {
fill: parent;
}
imagePath: Qt.resolvedUrl("svgs/showdesktop.svg")
prefix: {
return "normal"
}
}
}*/
/*PlasmaCore.ToolTipArea {
id: toolTip
anchors.fill: parent
mainText: Plasmoid.title
subText: toolTipSubText
textFormat: Text.PlainText
}*/
}
// org.kde.plasma.mediacontrollercompact
Plasma5Support.DataSource {
id: executeSource
engine: "executable"
connectedSources: []
onNewData: (sourceName, data) => {
disconnectSource(sourceName)
} // cmd finished
function getUniqueId(cmd) {
// Note: we assume that 'cmd' is executed quickly so that a previous call
// with the same 'cmd' has already finished (otherwise no new cmd will be
// added because it is already in the list)
// Workaround: We append spaces onto the user's command to workaround this.
var cmd2 = cmd
for (var i = 0; i < 10; i++) {
if (executeSource.connectedSources.includes(cmd2)) {
cmd2 += ' '
}
}
return cmd2
}
}
function exec(cmd) {
executeSource.connectSource(executeSource.getUniqueId(cmd))
}
function performMouseWheelUp() {
root.exec(Plasmoid.configuration.mousewheel_up)
}
function performMouseWheelDown() {
root.exec(Plasmoid.configuration.mousewheel_down)
}
Plasmoid.contextualActions: [
PlasmaCore.Action {
text: i18n("Toggle Lock Widgets")
icon.name: "object-locked"
onTriggered: {
var cmd = 'qdbus org.kde.plasmashell /PlasmaShell evaluateScript "lockCorona(!locked)"'
root.exec(cmd)
}
},
PlasmaCore.Action {
text: minimizeAllController.titleInactive
checkable: true
checked: minimizeAllController.active
toolTip: minimizeAllController.description
enabled: !peekController.active
onTriggered: minimizeAllController.toggle()
},
PlasmaCore.Action {
text: peekController.titleInactive
checkable: true
checked: peekController.active
toolTip: peekController.description
enabled: !minimizeAllController.active
onTriggered: peekController.toggle()
}
]
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 130 KiB

View file

@ -0,0 +1,91 @@
{
"KPackageStructure": "Plasma/Applet",
"KPlugin": {
"Authors": [
{
"Email": "mklapetek@kde.org",
"Name": "Martin Klapetek"
},
{
"Email": "zrenfire@gmail.com",
"Name": "Chris Holland"
},
{
"Email": "wackyideas@disroot.org",
"Name": "wackyideas"
}
],
"BugReportUrl": "https://gitgud.io/wackyideas/aerothemeplasma/issues",
"Category": "Windows and Tasks",
"Description": "Show the Plasma desktop",
"Description[ar]": "أظهر سطح مكتب بلازما",
"Description[bs]": "Prikazi plazma površ",
"Description[ca]": "Mostra l'escriptori Plasma",
"Description[ca@valencia]": "Mostra l'escriptori Plasma",
"Description[cs]": "Zobrazení plochy Plasmy",
"Description[da]": "Viser Plasmas skrivebord.",
"Description[de]": "Die Plasma-Arbeitsfläche anzeigen",
"Description[el]": "Εμφάνιση της επιφάνειας εργασίας plasma",
"Description[en_GB]": "Show the Plasma desktop",
"Description[es]": "Mostrar el escritorio de Plasma",
"Description[et]": "Plasma töölaua näitamine",
"Description[eu]": "Erakutsi Plasma mahaigaina",
"Description[fi]": "Näyttää työpöydän",
"Description[fr]": "Afficher le bureau Plasma",
"Description[ga]": "Taispeáin an deasc Plasma",
"Description[gl]": "Mostra o escritorio Plasma",
"Description[he]": "מציג את שולחן העבודה Plasma",
"Description[hr]": "Prikaži radnu površinu Plasme",
"Description[hu]": "A Plazma munkaasztal megjelenítése",
"Description[is]": "Sýna Plasmaskjáborðið",
"Description[it]": "Mostra il desktop di Plasma",
"Description[ja]": "Plasma デスクトップを表示します",
"Description[kk]": "Plasma үстелінің бетін көрсету",
"Description[km]": "បង្ហាញ​ផ្ទៃតុ​ប្លាស្មា",
"Description[ko]": "Plasma 데스크톱 보이기",
"Description[ku]": "Sermase ya Plasma nîşan bide",
"Description[lt]": "Rodo Plasma darbalaukį",
"Description[lv]": "Parāda Plasma darbvirsmu",
"Description[mr]": "प्लाज्मा डेस्कटॉप दर्शवा",
"Description[nb]": "Vis Plasma-skrivebordet",
"Description[nds]": "Den Plasma-Schriefdisch wiesen",
"Description[nl]": "Toont het Plasma-bureaublad",
"Description[nn]": "Vis Plasma-skrivebordet",
"Description[pa]": "ਪਲਾਜ਼ਮਾ ਡੈਸਕਟਾਪ ਵੇਖੋ",
"Description[pl]": "Pokazuje pulpit Plazmy",
"Description[pt]": "Mostrar o ecrã do Plasma",
"Description[pt_BR]": "Mostra a área de trabalho do Plasma",
"Description[ro]": "Arată biroul Plasma",
"Description[ru]": "Показать рабочий стол Plasma",
"Description[sk]": "Zobrazenie plochy Plasmy",
"Description[sl]": "Pokaži namizje Plasma",
"Description[sr]": "Баците поглед на плазма површ",
"Description[sr@ijekavian]": "Баците поглед на плазма површ",
"Description[sr@ijekavianlatin]": "Bacite pogled na plasma površ",
"Description[sr@latin]": "Bacite pogled na plasma površ",
"Description[sv]": "Visa Plasmas skrivbord",
"Description[th]": "แสดงพื้นที่ทำงานของพลาสมา",
"Description[tr]": "Plasma masaüstünü göster",
"Description[uk]": "Показує стільницю Плазми",
"Description[wa]": "Mostrer l' sicribanne Plasma",
"Description[x-test]": "xxShow the Plasma desktopxx",
"Description[zh_CN]": "显示 Plasma 桌面",
"Description[zh_TW]": "顯示 Plasma 桌面",
"FormFactors": [
"tablet",
"handset",
"desktop"
],
"Icon": "user-desktop",
"Id": "io.gitgud.wackyideas.win7showdesktop",
"License": "AGPL-v3",
"Name": "Show Desktop (Aero)",
"Website": "https://gitgud.io/wackyideas/aerothemeplasma"
},
"X-KDE-ParentApp": "org.kde.plasmashell",
"X-Plasma-API-Minimum-Version": "6.0",
"X-Plasma-Provides": [
"org.kde.plasma.windowmanagement"
]
}

View file

@ -0,0 +1,43 @@
> Version 7 of Zren's i18n scripts.
With KDE Frameworks v5.37 and above, translations are bundled with the `*.plasmoid` file downloaded from the store.
## Install Translations
Go to `~/.local/share/plasma/plasmoids/org.kde.plasma.win7showdesktop/translate/` and run `sh ./build --restartplasma`.
## New Translations
1. Fill out [`template.pot`](template.pot) with your translations then open a [new issue](https://github.com/Zren/plasma-applet-win7showdesktop/issues/new), name the file `spanish.txt`, attach the txt file to the issue (drag and drop).
Or if you know how to make a pull request
1. Copy the `template.pot` file and name it your locale's code (Eg: `en`/`de`/`fr`) with the extension `.po`. Then fill out all the `msgstr ""`.
## Scripts
* `sh ./merge` will parse the `i18n()` calls in the `*.qml` files and write it to the `template.pot` file. Then it will merge any changes into the `*.po` language files.
* `sh ./build` will convert the `*.po` files to it's binary `*.mo` version and move it to `contents/locale/...` which will bundle the translations in the `*.plasmoid` without needing the user to manually install them.
* `sh ./plasmoidlocaletest` will run `./build` then `plasmoidviewer` (part of `plasma-sdk`).
## Links
* https://zren.github.io/kde/docs/widget/#translations-i18n
* https://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems
* https://api.kde.org/frameworks/ki18n/html/prg_guide.html
## Examples
* https://l10n.kde.org/stats/gui/trunk-kf5/team/fr/plasma-desktop/
* https://github.com/psifidotos/nowdock-plasmoid/tree/master/po
* https://github.com/kotelnik/plasma-applet-redshift-control/tree/master/translations
## Status
| Locale | Lines | % Done|
|----------|---------|-------|
| Template | 35 | |
| ar | 5/35 | 14% |
| es | 25/35 | 71% |
| fr | 5/35 | 14% |
| nl | 25/35 | 71% |
| pt_BR | 20/35 | 57% |

View file

@ -0,0 +1,166 @@
# Translation of win7showdesktop in ar
# Copyright (C) 2022
# This file is distributed under the same license as the win7showdesktop package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
msgid ""
msgstr ""
"Project-Id-Version: win7showdesktop\n"
"Report-Msgid-Bugs-To: https://github.com/Zren/plasma-applet-win7showdesktop\n"
"POT-Creation-Date: 2024-03-14 18:09+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: ar <LL@li.org>\n"
"Language: ar\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../metadata.desktop
msgid "Show Desktop (Win7)"
msgstr "أظهر سطح المكتب (Win7)"
#: ../metadata.desktop
msgid "Show the Plasma desktop"
msgstr "أظهر سطح مكتب بلازما"
#: ../contents/config/config.qml
msgid "General"
msgstr "عامّ"
#: ../contents/ui/CommandController.qml
msgctxt "@action:button"
msgid "Run custom command"
msgstr ""
#: ../contents/ui/CommandController.qml
msgctxt "@info:tooltip"
msgid "Run user-defined command when pressed"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Look"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Size:"
msgstr "الحجم:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "px"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Edge Color:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Hovered Color:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Pressed Color:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Click"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Command"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Mouse Wheel"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Commands"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Up:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Down:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (No UI) (amixer)"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (UI) (qdbus)"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Switch Desktop (qdbus)"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Show desktop on hover:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Enable"
msgstr "مكّن"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek threshold:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "ms"
msgstr ""
#: ../contents/ui/lib/AppletVersion.qml
msgid "<b>Version:</b> %1"
msgstr ""
#: ../contents/ui/main.qml
msgid "Toggle Lock Widgets"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Restore All Minimized Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Minimize All Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Restores the previously minimized windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Shows the Desktop by minimizing all windows"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Peek at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Stop Peeking at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Moves windows back to their original positions"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Temporarily shows the desktop by moving windows away"
msgstr ""

View file

@ -0,0 +1,53 @@
#!/bin/sh
# Version: 6
# This script will convert the *.po files to *.mo files, rebuilding the package/contents/locale folder.
# Feature discussion: https://phabricator.kde.org/D5209
# Eg: contents/locale/fr_CA/LC_MESSAGES/plasma_applet_org.kde.plasma.eventcalendar.mo
DIR=`cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd`
plasmoidName=`kreadconfig6 --file="$DIR/../metadata.desktop" --group="Desktop Entry" --key="X-KDE-PluginInfo-Name"`
website=`kreadconfig6 --file="$DIR/../metadata.desktop" --group="Desktop Entry" --key="X-KDE-PluginInfo-Website"`
bugAddress="$website"
packageRoot=".." # Root of translatable sources
projectName="plasma_applet_${plasmoidName}" # project name
#---
if [ -z "$plasmoidName" ]; then
echo "[build] Error: Couldn't read plasmoidName."
exit
fi
if [ -z "$(which msgfmt)" ]; then
echo "[build] Error: msgfmt command not found. Need to install gettext"
echo "[build] Running 'sudo apt install gettext'"
sudo apt install gettext
echo "[build] gettext installation should be finished. Going back to installing translations."
fi
#---
echo "[build] Compiling messages"
catalogs=`find . -name '*.po' | sort`
for cat in $catalogs; do
echo "$cat"
catLocale=`basename ${cat%.*}`
msgfmt -o "${catLocale}.mo" "$cat"
installPath="$DIR/../contents/locale/${catLocale}/LC_MESSAGES/${projectName}.mo"
echo "[build] Install to ${installPath}"
mkdir -p "$(dirname "$installPath")"
mv "${catLocale}.mo" "${installPath}"
done
echo "[build] Done building messages"
if [ "$1" = "--restartplasma" ]; then
echo "[build] Restarting plasmashell"
killall plasmashell
kstart plasmashell
echo "[build] Done restarting plasmashell"
else
echo "[build] (re)install the plasmoid and restart plasmashell to test."
fi

View file

@ -0,0 +1,168 @@
# Translation of win7showdesktop in spanish
# Copyright (C) 2019
# This file is distributed under the same license as the win7showdesktop package.
# WUniversales <universales@protonmail.com>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: win7showdesktop \n"
"Report-Msgid-Bugs-To: https://github.com/Zren/plasma-applet-win7showdesktop\n"
"POT-Creation-Date: 2024-03-14 18:09+0000\n"
"PO-Revision-Date: 2019-10-19 12:36\n"
"Last-Translator: wunivesales <universales@protonmail.com>\n"
"Language-Team: Spanish <LL@li.org>\n"
"Language: Spanish \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../metadata.desktop
msgid "Show Desktop (Win7)"
msgstr "Mostrar el escritorio (Win7)"
#: ../metadata.desktop
msgid "Show the Plasma desktop"
msgstr "Mostrar el escritorio de Plasma"
#: ../contents/config/config.qml
msgid "General"
msgstr "General"
#: ../contents/ui/CommandController.qml
msgctxt "@action:button"
msgid "Run custom command"
msgstr ""
#: ../contents/ui/CommandController.qml
msgctxt "@info:tooltip"
msgid "Run user-defined command when pressed"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Look"
msgstr "Apariencia"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Size:"
msgstr "Tamaño:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "px"
msgstr "px"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Edge Color:"
msgstr "Color del borde:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Hovered Color:"
msgstr "Color del hover:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Pressed Color:"
msgstr "Color al pulsar:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Click"
msgstr "Click"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Command"
msgstr "Ejecutar comando:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Mouse Wheel"
msgstr "Rueda del ratón"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Commands"
msgstr "Ejecutar comandos"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Up:"
msgstr "Desplazarse hacia arriba:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Down:"
msgstr "Desplazarse hacia abajo:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (No UI) (amixer)"
msgstr "Volumen (Sin UI) (amixer)"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (UI) (qdbus)"
msgstr "Volumen (Con UI) (qdbus)"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Switch Desktop (qdbus)"
msgstr "Cambiar escritorio (qdbus)"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek"
msgstr "Previsualizar"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Show desktop on hover:"
msgstr "Mostrar escritorio al pasar el mouse:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Enable"
msgstr "Activar"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek threshold:"
msgstr "Límite de visualización:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "ms"
msgstr "ms"
#: ../contents/ui/lib/AppletVersion.qml
msgid "<b>Version:</b> %1"
msgstr "<b>Versión:</b> %1"
#: ../contents/ui/main.qml
msgid "Toggle Lock Widgets"
msgstr "Alternar widgets bloqueados"
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Restore All Minimized Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Minimize All Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Restores the previously minimized windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Shows the Desktop by minimizing all windows"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Peek at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Stop Peeking at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Moves windows back to their original positions"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Temporarily shows the desktop by moving windows away"
msgstr ""

View file

@ -0,0 +1,166 @@
# Translation of win7showdesktop in fr
# Copyright (C) 2022
# This file is distributed under the same license as the win7showdesktop package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
msgid ""
msgstr ""
"Project-Id-Version: win7showdesktop\n"
"Report-Msgid-Bugs-To: https://github.com/Zren/plasma-applet-win7showdesktop\n"
"POT-Creation-Date: 2024-03-14 18:09+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: fr <LL@li.org>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../metadata.desktop
msgid "Show Desktop (Win7)"
msgstr "Afficher un bureau (Win7)"
#: ../metadata.desktop
msgid "Show the Plasma desktop"
msgstr "Afficher le bureau Plasma"
#: ../contents/config/config.qml
msgid "General"
msgstr "Général"
#: ../contents/ui/CommandController.qml
msgctxt "@action:button"
msgid "Run custom command"
msgstr ""
#: ../contents/ui/CommandController.qml
msgctxt "@info:tooltip"
msgid "Run user-defined command when pressed"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Look"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Size:"
msgstr "Taille : "
#: ../contents/ui/config/ConfigGeneral.qml
msgid "px"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Edge Color:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Hovered Color:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Pressed Color:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Click"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Command"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Mouse Wheel"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Commands"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Up:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Down:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (No UI) (amixer)"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (UI) (qdbus)"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Switch Desktop (qdbus)"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Show desktop on hover:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Enable"
msgstr "Activer"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek threshold:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "ms"
msgstr ""
#: ../contents/ui/lib/AppletVersion.qml
msgid "<b>Version:</b> %1"
msgstr ""
#: ../contents/ui/main.qml
msgid "Toggle Lock Widgets"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Restore All Minimized Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Minimize All Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Restores the previously minimized windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Shows the Desktop by minimizing all windows"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Peek at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Stop Peeking at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Moves windows back to their original positions"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Temporarily shows the desktop by moving windows away"
msgstr ""

View file

@ -0,0 +1,239 @@
#!/bin/sh
# Version: 22
# https://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems
# https://techbase.kde.org/Development/Tutorials/Localization/i18n_Build_Systems/Outside_KDE_repositories
# https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/extract-messages.sh
DIR=`cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd`
plasmoidName=`kreadconfig6 --file="$DIR/../metadata.desktop" --group="Desktop Entry" --key="X-KDE-PluginInfo-Name"`
widgetName="${plasmoidName##*.}" # Strip namespace
website=`kreadconfig6 --file="$DIR/../metadata.desktop" --group="Desktop Entry" --key="X-KDE-PluginInfo-Website"`
bugAddress="$website"
packageRoot=".." # Root of translatable sources
projectName="plasma_applet_${plasmoidName}" # project name
#---
if [ -z "$plasmoidName" ]; then
echo "[merge] Error: Couldn't read plasmoidName."
exit
fi
if [ -z "$(which xgettext)" ]; then
echo "[merge] Error: xgettext command not found. Need to install gettext"
echo "[merge] Running 'sudo apt install gettext'"
sudo apt install gettext
echo "[merge] gettext installation should be finished. Going back to merging translations."
fi
#---
echo "[merge] Extracting messages"
potArgs="--from-code=UTF-8 --width=200 --add-location=file"
# Note: xgettext v0.20.1 (Kubuntu 20.04) and below will attempt to translate Icon,
# so we need to specify Name, GenericName, Comment, and Keywords.
# https://github.com/Zren/plasma-applet-lib/issues/1
# https://savannah.gnu.org/support/?108887
find "${packageRoot}" -name '*.desktop' | sort > "${DIR}/infiles.list"
xgettext \
${potArgs} \
--files-from="${DIR}/infiles.list" \
--language=Desktop \
-k -kName -kGenericName -kComment -kKeywords \
-D "${packageRoot}" \
-D "${DIR}" \
-o "template.pot.new" \
|| \
{ echo "[merge] error while calling xgettext. aborting."; exit 1; }
sed -i 's/"Content-Type: text\/plain; charset=CHARSET\\n"/"Content-Type: text\/plain; charset=UTF-8\\n"/' "template.pot.new"
# See Ki18n's extract-messages.sh for a full example:
# https://invent.kde.org/sysadmin/l10n-scripty/-/blob/master/extract-messages.sh#L25
# The -kN_ and -kaliasLocale keywords are mentioned in the Outside_KDE_repositories wiki.
# We don't need -kN_ since we don't use intltool-extract but might as well keep it.
# I have no idea what -kaliasLocale is used for. Googling aliasLocale found only listed kde1 code.
# We don't need to parse -ki18nd since that'll extract messages from other domains.
find "${packageRoot}" -name '*.cpp' -o -name '*.h' -o -name '*.c' -o -name '*.qml' -o -name '*.js' | sort > "${DIR}/infiles.list"
xgettext \
${potArgs} \
--files-from="${DIR}/infiles.list" \
-C -kde \
-ci18n \
-ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 \
-kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 \
-kxi18n:1 -kxi18nc:1c,2 -kxi18np:1,2 -kxi18ncp:1c,2,3 \
-kkxi18n:1 -kkxi18nc:1c,2 -kkxi18np:1,2 -kkxi18ncp:1c,2,3 \
-kI18N_NOOP:1 -kI18NC_NOOP:1c,2 \
-kI18N_NOOP2:1c,2 -kI18N_NOOP2_NOSTRIP:1c,2 \
-ktr2i18n:1 -ktr2xi18n:1 \
-kN_:1 \
-kaliasLocale \
--package-name="${widgetName}" \
--msgid-bugs-address="${bugAddress}" \
-D "${packageRoot}" \
-D "${DIR}" \
--join-existing \
-o "template.pot.new" \
|| \
{ echo "[merge] error while calling xgettext. aborting."; exit 1; }
sed -i 's/# SOME DESCRIPTIVE TITLE./'"# Translation of ${widgetName} in LANGUAGE"'/' "template.pot.new"
sed -i 's/# Copyright (C) YEAR THE PACKAGE'"'"'S COPYRIGHT HOLDER/'"# Copyright (C) $(date +%Y)"'/' "template.pot.new"
if [ -f "template.pot" ]; then
newPotDate=`grep "POT-Creation-Date:" template.pot.new | sed 's/.\{3\}$//'`
oldPotDate=`grep "POT-Creation-Date:" template.pot | sed 's/.\{3\}$//'`
sed -i 's/'"${newPotDate}"'/'"${oldPotDate}"'/' "template.pot.new"
changes=`diff "template.pot" "template.pot.new"`
if [ ! -z "$changes" ]; then
# There's been changes
sed -i 's/'"${oldPotDate}"'/'"${newPotDate}"'/' "template.pot.new"
mv "template.pot.new" "template.pot"
addedKeys=`echo "$changes" | grep "> msgid" | cut -c 9- | sort`
removedKeys=`echo "$changes" | grep "< msgid" | cut -c 9- | sort`
echo ""
echo "Added Keys:"
echo "$addedKeys"
echo ""
echo "Removed Keys:"
echo "$removedKeys"
echo ""
else
# No changes
rm "template.pot.new"
fi
else
# template.pot didn't already exist
mv "template.pot.new" "template.pot"
fi
potMessageCount=`expr $(grep -Pzo 'msgstr ""\n(\n|$)' "template.pot" | grep -c 'msgstr ""')`
echo "| Locale | Lines | % Done|" > "./Status.md"
echo "|----------|---------|-------|" >> "./Status.md"
entryFormat="| %-8s | %7s | %5s |"
templateLine=`perl -e "printf(\"$entryFormat\", \"Template\", \"${potMessageCount}\", \"\")"`
echo "$templateLine" >> "./Status.md"
rm "${DIR}/infiles.list"
echo "[merge] Done extracting messages"
#---
echo "[merge] Merging messages"
catalogs=`find . -name '*.po' | sort`
for cat in $catalogs; do
echo "[merge] $cat"
catLocale=`basename ${cat%.*}`
widthArg=""
catUsesGenerator=`grep "X-Generator:" "$cat"`
if [ -z "$catUsesGenerator" ]; then
widthArg="--width=400"
fi
compendiumArg=""
if [ ! -z "$COMPENDIUM_DIR" ]; then
langCode=`basename "${cat%.*}"`
compendiumPath=`realpath "$COMPENDIUM_DIR/compendium-${langCode}.po"`
if [ -f "$compendiumPath" ]; then
echo "compendiumPath=$compendiumPath"
compendiumArg="--compendium=$compendiumPath"
fi
fi
cp "$cat" "$cat.new"
sed -i 's/"Content-Type: text\/plain; charset=CHARSET\\n"/"Content-Type: text\/plain; charset=UTF-8\\n"/' "$cat.new"
msgmerge \
${widthArg} \
--add-location=file \
--no-fuzzy-matching \
${compendiumArg} \
-o "$cat.new" \
"$cat.new" "${DIR}/template.pot"
sed -i 's/# SOME DESCRIPTIVE TITLE./'"# Translation of ${widgetName} in ${catLocale}"'/' "$cat.new"
sed -i 's/# Translation of '"${widgetName}"' in LANGUAGE/'"# Translation of ${widgetName} in ${catLocale}"'/' "$cat.new"
sed -i 's/# Copyright (C) YEAR THE PACKAGE'"'"'S COPYRIGHT HOLDER/'"# Copyright (C) $(date +%Y)"'/' "$cat.new"
poEmptyMessageCount=`expr $(grep -Pzo 'msgstr ""\n(\n|$)' "$cat.new" | grep -c 'msgstr ""')`
poMessagesDoneCount=`expr $potMessageCount - $poEmptyMessageCount`
poCompletion=`perl -e "printf(\"%d\", $poMessagesDoneCount * 100 / $potMessageCount)"`
poLine=`perl -e "printf(\"$entryFormat\", \"$catLocale\", \"${poMessagesDoneCount}/${potMessageCount}\", \"${poCompletion}%\")"`
echo "$poLine" >> "./Status.md"
# mv "$cat" "$cat.old"
mv "$cat.new" "$cat"
done
echo "[merge] Done merging messages"
#---
echo "[merge] Updating .desktop file"
# Generate LINGUAS for msgfmt
if [ -f "$DIR/LINGUAS" ]; then
rm "$DIR/LINGUAS"
fi
touch "$DIR/LINGUAS"
for cat in $catalogs; do
catLocale=`basename ${cat%.*}`
echo "${catLocale}" >> "$DIR/LINGUAS"
done
cp -f "$DIR/../metadata.desktop" "$DIR/template.desktop"
sed -i '/^Name\[/ d; /^GenericName\[/ d; /^Comment\[/ d; /^Keywords\[/ d' "$DIR/template.desktop"
msgfmt \
--desktop \
--template="$DIR/template.desktop" \
-d "$DIR/" \
-o "$DIR/new.desktop"
# Delete empty msgid messages that used the po header
if [ ! -z "$(grep '^Name=$' "$DIR/new.desktop")" ]; then
echo "[merge] Name in metadata.desktop is empty!"
sed -i '/^Name\[/ d' "$DIR/new.desktop"
fi
if [ ! -z "$(grep '^GenericName=$' "$DIR/new.desktop")" ]; then
echo "[merge] GenericName in metadata.desktop is empty!"
sed -i '/^GenericName\[/ d' "$DIR/new.desktop"
fi
if [ ! -z "$(grep '^Comment=$' "$DIR/new.desktop")" ]; then
echo "[merge] Comment in metadata.desktop is empty!"
sed -i '/^Comment\[/ d' "$DIR/new.desktop"
fi
if [ ! -z "$(grep '^Keywords=$' "$DIR/new.desktop")" ]; then
echo "[merge] Keywords in metadata.desktop is empty!"
sed -i '/^Keywords\[/ d' "$DIR/new.desktop"
fi
# Place translations at the bottom of the desktop file.
translatedLines=`cat "$DIR/new.desktop" | grep "]="`
if [ ! -z "${translatedLines}" ]; then
sed -i '/^Name\[/ d; /^GenericName\[/ d; /^Comment\[/ d; /^Keywords\[/ d' "$DIR/new.desktop"
if [ "$(tail -c 2 "$DIR/new.desktop" | wc -l)" != "2" ]; then
# Does not end with 2 empty lines, so add an empty line.
echo "" >> "$DIR/new.desktop"
fi
echo "${translatedLines}" >> "$DIR/new.desktop"
fi
# Cleanup
mv "$DIR/new.desktop" "$DIR/../metadata.desktop"
rm "$DIR/template.desktop"
rm "$DIR/LINGUAS"
#---
# Populate ReadMe.md
echo "[merge] Updating translate/ReadMe.md"
sed -i -E 's`share\/plasma\/plasmoids\/(.+)\/translate`share/plasma/plasmoids/'"${plasmoidName}"'/translate`' ./ReadMe.md
if [[ "$website" == *"github.com"* ]]; then
sed -i -E 's`\[new issue\]\(https:\/\/github\.com\/(.+)\/(.+)\/issues\/new\)`[new issue]('"${website}"'/issues/new)`' ./ReadMe.md
fi
sed -i '/^|/ d' ./ReadMe.md # Remove status table from ReadMe
cat ./Status.md >> ./ReadMe.md
rm ./Status.md
echo "[merge] Done"

View file

@ -0,0 +1,169 @@
# Translation of win7showdesktop in nl
# Copyright (C) 2019
# This file is distributed under the same license as the win7showdesktop package.
#
# Heimen Stoffels <vistausss@outlook.com>, 2019.
msgid ""
msgstr ""
"Project-Id-Version: win7showdesktop\n"
"Report-Msgid-Bugs-To: https://github.com/Zren/plasma-applet-win7showdesktop\n"
"POT-Creation-Date: 2024-03-14 18:09+0000\n"
"PO-Revision-Date: 2020-03-30 13:57+0200\n"
"Last-Translator: Heimen Stoffels <vistausss@outlook.com>\n"
"Language-Team: Dutch <vistausss@outlook.com>\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 2.3\n"
#: ../metadata.desktop
msgid "Show Desktop (Win7)"
msgstr "Bureaublad tonen (Win7)"
#: ../metadata.desktop
msgid "Show the Plasma desktop"
msgstr "Toont het Plasma-bureaublad"
#: ../contents/config/config.qml
msgid "General"
msgstr "Algemeen"
#: ../contents/ui/CommandController.qml
msgctxt "@action:button"
msgid "Run custom command"
msgstr ""
#: ../contents/ui/CommandController.qml
msgctxt "@info:tooltip"
msgid "Run user-defined command when pressed"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Look"
msgstr "Uiterlijk"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Size:"
msgstr "Grootte:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "px"
msgstr "px"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Edge Color:"
msgstr "Randkleur:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Hovered Color:"
msgstr "Kleur bij tonen zonder klikken:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Pressed Color:"
msgstr "Kleur bij indrukken:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Click"
msgstr "Klikken"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Command"
msgstr "Opdracht uitvoeren"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Mouse Wheel"
msgstr "Scrollwiel"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Commands"
msgstr "Opdrachten uitvoeren"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Up:"
msgstr "Omhoogscrollen:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Down:"
msgstr "Omlaagscrollen:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (No UI) (amixer)"
msgstr "Volume (zonder venster - amixer)"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (UI) (qdbus)"
msgstr "Volume (met venster - qdbus)"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Switch Desktop (qdbus)"
msgstr "Overschakelen naar ander bureaublad (qdbus)"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek"
msgstr "Gluren"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Show desktop on hover:"
msgstr "Bureaublad tonen zonder klikken:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Enable"
msgstr "Inschakelen"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek threshold:"
msgstr "Gluurvertraging:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "ms"
msgstr "ms"
#: ../contents/ui/lib/AppletVersion.qml
msgid "<b>Version:</b> %1"
msgstr "<b>Versie:</b> %1"
#: ../contents/ui/main.qml
msgid "Toggle Lock Widgets"
msgstr "Widgets ver-/ontgrendelen"
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Restore All Minimized Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Minimize All Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Restores the previously minimized windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Shows the Desktop by minimizing all windows"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Peek at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Stop Peeking at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Moves windows back to their original positions"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Temporarily shows the desktop by moving windows away"
msgstr ""

View file

@ -0,0 +1,181 @@
#!/bin/bash
# Version 9
# Requires plasmoidviewer v5.13.0
function checkIfLangInstalled {
if [ -x "$(command -v dpkg)" ]; then
dpkg -l ${1} >/dev/null 2>&1 || ( \
echo -e "${1} not installed.\nInstalling now before continuing.\n" \
; sudo apt install ${1} \
) || ( \
echo -e "\nError trying to install ${1}\nPlease run 'sudo apt install ${1}'\n" \
; exit 1 \
)
elif [ -x "$(command -v pacman)" ]; then
# TODO: run `locale -a` and check if the locale is enabled.
if false; then
# https://wiki.archlinux.org/index.php/Locale
# Uncomment the locale in /etc/locale.gen
# Then run `locale-gen`
echo -e "\nPlease install this locale in System Settings first.\n"
exit 1
else
echo ""
fi
else
echo -e "\nPackage manager not recognized. If the widget is not translated, please install the package '${1}'\n"
fi
}
langInput="${1}"
lang=""
languagePack=""
if [[ "$langInput" =~ ":" ]]; then # String contains a colon so assume it's a locale code.
lang="${langInput}"
IFS=: read -r l1 l2 <<< "${lang}"
languagePack="language-pack-${l2}"
fi
# https://stackoverflow.com/questions/3191664/list-of-all-locales-and-their-short-codes/28357857#28357857
declare -a langArr=(
"af_ZA:af:Afrikaans (South Africa)"
"ak_GH:ak:Akan (Ghana)"
"am_ET:am:Amharic (Ethiopia)"
"ar_EG:ar:Arabic (Egypt)"
"as_IN:as:Assamese (India)"
"az_AZ:az:Azerbaijani (Azerbaijan)"
"be_BY:be:Belarusian (Belarus)"
"bem_ZM:bem:Bemba (Zambia)"
"bg_BG:bg:Bulgarian (Bulgaria)"
"bo_IN:bo:Tibetan (India)"
"bs_BA:bs:Bosnian (Bosnia and Herzegovina)"
"ca_ES:ca:Catalan (Spain)"
"chr_US:ch:Cherokee (United States)"
"cs_CZ:cs:Czech (Czech Republic)"
"cy_GB:cy:Welsh (United Kingdom)"
"da_DK:da:Danish (Denmark)"
"de_DE:de:German (Germany)"
"el_GR:el:Greek (Greece)"
"es_MX:es:Spanish (Mexico)"
"et_EE:et:Estonian (Estonia)"
"eu_ES:eu:Basque (Spain)"
"fa_IR:fa:Persian (Iran)"
"ff_SN:ff:Fulah (Senegal)"
"fi_FI:fi:Finnish (Finland)"
"fo_FO:fo:Faroese (Faroe Islands)"
"fr_CA:fr:French (Canada)"
"ga_IE:ga:Irish (Ireland)"
"gl_ES:gl:Galician (Spain)"
"gu_IN:gu:Gujarati (India)"
"gv_GB:gv:Manx (United Kingdom)"
"ha_NG:ha:Hausa (Nigeria)"
"he_IL:he:Hebrew (Israel)"
"hi_IN:hi:Hindi (India)"
"hr_HR:hr:Croatian (Croatia)"
"hu_HU:hu:Hungarian (Hungary)"
"hy_AM:hy:Armenian (Armenia)"
"id_ID:id:Indonesian (Indonesia)"
"ig_NG:ig:Igbo (Nigeria)"
"is_IS:is:Icelandic (Iceland)"
"it_IT:it:Italian (Italy)"
"ja_JP:ja:Japanese (Japan)"
"ka_GE:ka:Georgian (Georgia)"
"kk_KZ:kk:Kazakh (Kazakhstan)"
"kl_GL:kl:Kalaallisut (Greenland)"
"km_KH:km:Khmer (Cambodia)"
"kn_IN:kn:Kannada (India)"
"ko_KR:ko:Korean (South Korea)"
"ko_KR:ko:Korean (South Korea)"
"lg_UG:lg:Ganda (Uganda)"
"lt_LT:lt:Lithuanian (Lithuania)"
"lv_LV:lv:Latvian (Latvia)"
"mg_MG:mg:Malagasy (Madagascar)"
"mk_MK:mk:Macedonian (Macedonia)"
"ml_IN:ml:Malayalam (India)"
"mr_IN:mr:Marathi (India)"
"ms_MY:ms:Malay (Malaysia)"
"mt_MT:mt:Maltese (Malta)"
"my_MM:my:Burmese (Myanmar [Burma])"
"nb_NO:nb:Norwegian Bokmål (Norway)"
"ne_NP:ne:Nepali (Nepal)"
"nl_NL:nl:Dutch (Netherlands)"
"nn_NO:nn:Norwegian Nynorsk (Norway)"
"om_ET:om:Oromo (Ethiopia)"
"or_IN:or:Oriya (India)"
"pa_PK:pa:Punjabi (Pakistan)"
"pl_PL:pl:Polish (Poland)"
"ps_AF:ps:Pashto (Afghanistan)"
"pt_BR:pt:Portuguese (Brazil)"
"ro_RO:ro:Romanian (Romania)"
"ru_RU:ru:Russian (Russia)"
"rw_RW:rw:Kinyarwanda (Rwanda)"
"si_LK:si:Sinhala (Sri Lanka)"
"sk_SK:sk:Slovak (Slovakia)"
"sl_SI:sl:Slovenian (Slovenia)"
"so_SO:so:Somali (Somalia)"
"sq_AL:sq:Albanian (Albania)"
"sr_RS:sr:Serbian (Serbia)"
"sv_SE:sv:Swedish (Sweden)"
"sw_KE:sw:Swahili (Kenya)"
"ta_IN:ta:Tamil (India)"
"te_IN:te:Telugu (India)"
"th_TH:th:Thai (Thailand)"
"ti_ER:ti:Tigrinya (Eritrea)"
"to_TO:to:Tonga (Tonga)"
"tr_TR:tr:Turkish (Turkey)"
"uk_UA:uk:Ukrainian (Ukraine)"
"ur_IN:ur:Urdu (India)"
"uz_UZ:uz:Uzbek (Uzbekistan)"
"vi_VN:vi:Vietnamese (Vietnam)"
"yo_NG:yo:Yoruba (Nigeria)"
"yo_NG:yo:Yoruba (Nigeria)"
"yue_HK:yu:Cantonese (Hong Kong)"
"zh_CN:zh:Chinese (China)"
"zu_ZA:zu:Zulu (South Africa)"
)
for i in "${langArr[@]}"; do
IFS=: read -r l1 l2 l3 <<< "$i"
if [ "$langInput" == "$l2" ]; then
lang="${l1}:${l2}"
languagePack="language-pack-${l2}"
fi
done
if [ -z "$lang" ]; then
echo "plasmoidlocaletest doesn't recognize the language '$lang'"
echo "Eg:"
scriptcmd='sh ./plasmoidlocaletest'
for i in "${langArr[@]}"; do
IFS=: read -r l1 l2 l3 <<< "$i"
echo " ${scriptcmd} ${l2} | ${l3}"
done
echo ""
echo "Or use a the full locale code:"
echo " ${scriptcmd} ar_EG:ar"
exit 1
fi
IFS=: read -r l1 l2 <<< "${lang}"
l1="${l1}.UTF-8"
# Check if language is installed
if [ ! -z "$languagePack" ]; then
if [ "$lang" == "zh_CN:zh" ]; then languagePack="language-pack-zh-hans"
fi
checkIfLangInstalled "$languagePack" || exit 1
fi
echo "LANGUAGE=\"${lang}\""
echo "LANG=\"${l1}\""
scriptDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
packageDir="${scriptDir}/.."
# Build local translations for plasmoidviewer
sh "${scriptDir}/build"
LANGUAGE="${lang}" LANG="${l1}" LC_TIME="${l1}" QML_DISABLE_DISK_CACHE=true plasmoidviewer -a "$packageDir" -l topedge -f horizontal -x 0 -y 0

View file

@ -0,0 +1,166 @@
# Translation of win7showdesktop in brazilian portuguese
# Copyright (C) 2019
# This file is distributed under the same license as the win7showdesktop package.
# Andrew Miranda <kryptusql@protonmail.com>, 2020.
msgid ""
msgstr ""
"Project-Id-Version: win7showdesktop \n"
"Report-Msgid-Bugs-To: https://github.com/Zren/plasma-applet-win7showdesktop\n"
"POT-Creation-Date: 2024-03-14 18:09+0000\n"
"PO-Revision-Date: 2020-15-01 10:25-0300\n"
"Last-Translator: Andrew Miranda <kryptusql@protonmail.com>\n"
"Language-Team: Portuguese Brazilian <kryptusql@protonmail.com>\n"
"Language: Portuguese Brazilian \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../metadata.desktop
msgid "Show Desktop (Win7)"
msgstr "Exibir a área de trabalho (Win7)"
#: ../metadata.desktop
msgid "Show the Plasma desktop"
msgstr "Mostra a área de trabalho do Plasma"
#: ../contents/config/config.qml
msgid "General"
msgstr "Geral"
#: ../contents/ui/CommandController.qml
msgctxt "@action:button"
msgid "Run custom command"
msgstr ""
#: ../contents/ui/CommandController.qml
msgctxt "@info:tooltip"
msgid "Run user-defined command when pressed"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Look"
msgstr "Aparência"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Size:"
msgstr "Tamanho:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "px"
msgstr "px"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Edge Color:"
msgstr "Cor da borda:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Hovered Color:"
msgstr "Cor de foco:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Pressed Color:"
msgstr "Cor de clique:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Click"
msgstr "Clique"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Command"
msgstr "Executar comando:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Mouse Wheel"
msgstr "Roda do mouse"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Commands"
msgstr "Executar comandos"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Up:"
msgstr "Rolar para cima:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Down:"
msgstr "Rolar para baixo:"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (No UI) (amixer)"
msgstr "Volume (Sem UI) (amixer)"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (UI) (qdbus)"
msgstr "Volume (Com UI) (qdbus)"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Switch Desktop (qdbus)"
msgstr "Alternar área de trabalho (qdbus)"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Show desktop on hover:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Enable"
msgstr "Ativar"
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek threshold:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "ms"
msgstr ""
#: ../contents/ui/lib/AppletVersion.qml
msgid "<b>Version:</b> %1"
msgstr "<b>Versão:</b> %1"
#: ../contents/ui/main.qml
msgid "Toggle Lock Widgets"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Restore All Minimized Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Minimize All Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Restores the previously minimized windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Shows the Desktop by minimizing all windows"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Peek at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Stop Peeking at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Moves windows back to their original positions"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Temporarily shows the desktop by moving windows away"
msgstr ""

View file

@ -0,0 +1,168 @@
# Translation of win7showdesktop in LANGUAGE
# Copyright (C) 2024
# This file is distributed under the same license as the win7showdesktop package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: win7showdesktop\n"
"Report-Msgid-Bugs-To: https://github.com/Zren/plasma-applet-win7showdesktop\n"
"POT-Creation-Date: 2024-03-14 18:09+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: ../metadata.desktop
msgid "Show Desktop (Win7)"
msgstr ""
#: ../metadata.desktop
msgid "Show the Plasma desktop"
msgstr ""
#: ../contents/config/config.qml
msgid "General"
msgstr ""
#: ../contents/ui/CommandController.qml
msgctxt "@action:button"
msgid "Run custom command"
msgstr ""
#: ../contents/ui/CommandController.qml
msgctxt "@info:tooltip"
msgid "Run user-defined command when pressed"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Look"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Size:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "px"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Edge Color:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Hovered Color:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Pressed Color:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Click"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Command"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Mouse Wheel"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Run Commands"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Up:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Scroll Down:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (No UI) (amixer)"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Volume (UI) (qdbus)"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Switch Desktop (qdbus)"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Show desktop on hover:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Enable"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "Peek threshold:"
msgstr ""
#: ../contents/ui/config/ConfigGeneral.qml
msgid "ms"
msgstr ""
#: ../contents/ui/lib/AppletVersion.qml
msgid "<b>Version:</b> %1"
msgstr ""
#: ../contents/ui/main.qml
msgid "Toggle Lock Widgets"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Restore All Minimized Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@action:button"
msgid "Minimize All Windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Restores the previously minimized windows"
msgstr ""
#: ../contents/ui/MinimizeAllController.qml
msgctxt "@info:tooltip"
msgid "Shows the Desktop by minimizing all windows"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Peek at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@action:button"
msgid "Stop Peeking at Desktop"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Moves windows back to their original positions"
msgstr ""
#: ../contents/ui/PeekController.qml
msgctxt "@info:tooltip"
msgid "Temporarily shows the desktop by moving windows away"
msgstr ""