Commit f945ad4b authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Rename wallpaper translation catalogs to follow pattern

Summary:
The wallpaper loading code expects the catalogs to follow the pattern
"plasma_wallpaper_" + pluginid. While in config QML the domain needs
to be explicitly set using i18nd, as the default textdomain is set to
that of the config container, it is not needed in the wallpaper QML.

While using a catalog with plasma_applet_* prefix works if setting
the domain explicitly, the usage goes against the design of the
naming patterns. So to give a good example and also properly marking
the usage of the catalog, the names are switched.

Reviewers: #plasma, davidedmundson

Reviewed By: #plasma, davidedmundson

Subscribers: davidedmundson, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D10850
parent 5af288fa
#! /usr/bin/env bash
$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.color.pot
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_wallpaper_org.kde.color.pot
rm -f rc.cpp
......@@ -31,7 +31,7 @@ Column {
id: colorDialog
modality: Qt.WindowModal
showAlphaChannel: false
title: i18nd("plasma_applet_org.kde.color", "Select Background Color")
title: i18nd("plasma_wallpaper_org.kde.color", "Select Background Color")
}
Row {
......@@ -41,7 +41,7 @@ Column {
width: formAlignment - units.largeSpacing
anchors.verticalCenter: colorButton.verticalCenter
horizontalAlignment: Text.AlignRight
text: i18nd("plasma_applet_org.kde.color", "Color:")
text: i18nd("plasma_wallpaper_org.kde.color", "Color:")
}
QtControls.Button {
id: colorButton
......
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_applet_org.kde.image\")
add_definitions(-DTRANSLATION_DOMAIN=\"plasma_wallpaper_org.kde.image\")
set(image_SRCS
image.cpp
......
#! /usr/bin/env bash
$EXTRACTRC `find . -name \*.rc -o -name \*.ui -o -name \*.kcfg` >> rc.cpp
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_applet_org.kde.image.pot
$XGETTEXT `find . -name \*.js -o -name \*.qml -o -name \*.cpp` -o $podir/plasma_wallpaper_org.kde.image.pot
rm -f rc.cpp
......@@ -112,7 +112,7 @@ MouseArea {
margins: units.smallSpacing
}
iconSource: "list-remove"
tooltip: i18nd("plasma_applet_org.kde.image", "Remove wallpaper")
tooltip: i18nd("plasma_wallpaper_org.kde.image", "Remove wallpaper")
flat: false
visible: model.removable && !model.pendingDeletion
onClicked: {
......@@ -137,7 +137,7 @@ MouseArea {
margins: units.smallSpacing
}
iconSource: "document-open-folder"
tooltip: i18nd("plasma_applet_org.kde.image", "Open Containing Folder")
tooltip: i18nd("plasma_wallpaper_org.kde.image", "Open Containing Folder")
flat: false
onClicked: imageWallpaper.wallpaperModel.openContainingFolder(index)
opacity: wallpaperDelegate.containsMouse ? 1 : 0
......@@ -156,7 +156,7 @@ MouseArea {
margins: units.smallSpacing
}
iconSource: "edit-undo"
tooltip: i18nd("plasma_applet_org.kde.image", "Restore wallpaper")
tooltip: i18nd("plasma_wallpaper_org.kde.image", "Restore wallpaper")
flat: false
visible: model.pendingDeletion
onClicked: imageWallpaper.wallpaperModel.setPendingDeletion(index, !model.pendingDeletion)
......@@ -194,7 +194,7 @@ MouseArea {
onTriggered: {
if (model.author) {
Tooltip.showText(wallpaperDelegate, Qt.point(wallpaperDelegate.mouseX, wallpaperDelegate.mouseY),
i18nd("plasma_applet_org.kde.image", "%1 by %2", model.display, model.author));
i18nd("plasma_wallpaper_org.kde.image", "%1 by %2", model.display, model.author));
} else {
Tooltip.showText(wallpaperDelegate, Qt.point(wallpaperDelegate.mouseX, wallpaperDelegate.mouseY),
model.display);
......
......@@ -82,7 +82,7 @@ ColumnLayout {
anchors {
verticalCenter: resizeComboBox.verticalCenter
}
text: i18nd("plasma_applet_org.kde.image", "Positioning:")
text: i18nd("plasma_wallpaper_org.kde.image", "Positioning:")
horizontalAlignment: Text.AlignRight
}
QtControls.ComboBox {
......@@ -91,23 +91,23 @@ ColumnLayout {
width: theme.mSize(theme.defaultFont).width * textLength
model: [
{
'label': i18nd("plasma_applet_org.kde.image", "Scaled and Cropped"),
'label': i18nd("plasma_wallpaper_org.kde.image", "Scaled and Cropped"),
'fillMode': Image.PreserveAspectCrop
},
{
'label': i18nd("plasma_applet_org.kde.image","Scaled"),
'label': i18nd("plasma_wallpaper_org.kde.image","Scaled"),
'fillMode': Image.Stretch
},
{
'label': i18nd("plasma_applet_org.kde.image","Scaled, Keep Proportions"),
'label': i18nd("plasma_wallpaper_org.kde.image","Scaled, Keep Proportions"),
'fillMode': Image.PreserveAspectFit
},
{
'label': i18nd("plasma_applet_org.kde.image", "Centered"),
'label': i18nd("plasma_wallpaper_org.kde.image", "Centered"),
'fillMode': Image.Pad
},
{
'label': i18nd("plasma_applet_org.kde.image","Tiled"),
'label': i18nd("plasma_wallpaper_org.kde.image","Tiled"),
'fillMode': Image.Tile
}
]
......@@ -139,11 +139,11 @@ ColumnLayout {
width: formAlignment - units.largeSpacing
anchors.verticalCenter: blurRadioButton.verticalCenter
horizontalAlignment: Text.AlignRight
text: i18nd("plasma_applet_org.kde.image", "Background:")
text: i18nd("plasma_wallpaper_org.kde.image", "Background:")
}
QtControls.RadioButton {
id: blurRadioButton
text: i18nd("plasma_applet_org.kde.image", "Blur")
text: i18nd("plasma_wallpaper_org.kde.image", "Blur")
exclusiveGroup: backgroundGroup
}
}
......@@ -152,7 +152,7 @@ ColumnLayout {
id: colorDialog
modality: Qt.WindowModal
showAlphaChannel: false
title: i18nd("plasma_applet_org.kde.image", "Select Background Color")
title: i18nd("plasma_wallpaper_org.kde.image", "Select Background Color")
}
Row {
......@@ -164,7 +164,7 @@ ColumnLayout {
}
QtControls.RadioButton {
id: colorRadioButton
text: i18nd("plasma_applet_org.kde.image", "Solid color")
text: i18nd("plasma_wallpaper_org.kde.image", "Solid color")
exclusiveGroup: backgroundGroup
checked: !cfg_Blur
}
......@@ -202,7 +202,7 @@ ColumnLayout {
Layout.minimumWidth: formAlignment - units.largeSpacing
anchors.verticalCenter: parent.verticalCenter
horizontalAlignment: Text.AlignRight
text: i18nd("plasma_applet_org.kde.image","Change every:")
text: i18nd("plasma_wallpaper_org.kde.image","Change every:")
}
QtControls.SpinBox {
id: hoursInterval
......@@ -217,7 +217,7 @@ ColumnLayout {
}
QtControls.Label {
anchors.verticalCenter: parent.verticalCenter
text: i18nd("plasma_applet_org.kde.image","Hours")
text: i18nd("plasma_wallpaper_org.kde.image","Hours")
}
Item {
Layout.preferredWidth: units.gridUnit
......@@ -235,7 +235,7 @@ ColumnLayout {
}
QtControls.Label {
anchors.verticalCenter: parent.verticalCenter
text: i18nd("plasma_applet_org.kde.image","Minutes")
text: i18nd("plasma_wallpaper_org.kde.image","Minutes")
}
Item {
Layout.preferredWidth: units.gridUnit
......@@ -253,7 +253,7 @@ ColumnLayout {
}
QtControls.Label {
anchors.verticalCenter: parent.verticalCenter
text: i18nd("plasma_applet_org.kde.image","Seconds")
text: i18nd("plasma_wallpaper_org.kde.image","Seconds")
}
}
QtControls.ScrollView {
......@@ -389,18 +389,18 @@ ColumnLayout {
QtControls.Button {
visible: (configDialog.currentWallpaper == "org.kde.slideshow")
iconName: "list-add"
text: i18nd("plasma_applet_org.kde.image","Add Folder...")
text: i18nd("plasma_wallpaper_org.kde.image","Add Folder...")
onClicked: imageWallpaper.showAddSlidePathsDialog()
}
QtControls.Button {
visible: (configDialog.currentWallpaper == "org.kde.image")
iconName: "list-add"
text: i18nd("plasma_applet_org.kde.image","Add Image...")
text: i18nd("plasma_wallpaper_org.kde.image","Add Image...")
onClicked: imageWallpaper.showFileDialog();
}
QtControls.Button {
iconName: "get-hot-new-stuff"
text: i18nd("plasma_applet_org.kde.image","Get New Wallpapers...")
text: i18nd("plasma_wallpaper_org.kde.image","Get New Wallpapers...")
visible: KAuthorized.authorize("ghns")
onClicked: imageWallpaper.getNewWallpaper(this);
}
......
......@@ -175,8 +175,8 @@ Item {
Component.onCompleted: {
if (wallpaper.pluginName == "org.kde.slideshow") {
wallpaper.setAction("open", i18nd("plasma_applet_org.kde.image", "Open Wallpaper Image"), "document-open");
wallpaper.setAction("next", i18nd("plasma_applet_org.kde.image","Next Wallpaper Image"),"user-desktop");
wallpaper.setAction("open", i18n("Open Wallpaper Image"), "document-open");
wallpaper.setAction("next", i18n("Next Wallpaper Image"), "user-desktop");
}
}
......
......@@ -86,7 +86,7 @@ MouseArea {
margins: units.smallSpacing
}
iconSource: "list-remove"
tooltip: i18nd("plasma_applet_org.kde.image", "Remove wallpaper")
tooltip: i18nd("plasma_wallpaper_org.kde.image", "Remove wallpaper")
flat: false
visible: model.removable
onClicked: imageWallpaper.removeWallpaper(model.packageName)
......@@ -116,7 +116,7 @@ MouseArea {
onTriggered: {
Tooltip.showText(wallpaperDelegate, Qt.point(wallpaperDelegate.mouseX, wallpaperDelegate.mouseY),
i18nd("plasma_applet_org.kde.image", "%1 by %2", model.display, model.author));
i18nd("plasma_wallpaper_org.kde.image", "%1 by %2", model.display, model.author));
}
}
......
......@@ -77,7 +77,7 @@ Item {
horizontalCenter: parent.horizontalCenter
}
iconName: "list-add"
text: i18nd("plasma_applet_org.kde.image","Add Custom Wallpaper")
text: i18nd("plasma_wallpaper_org.kde.image","Add Custom Wallpaper")
onClicked: customWallpaperLoader.source = Qt.resolvedUrl("customwallpaper.qml")
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment