@@ -24,10 +24,6 @@ import Ubuntu.Components.Popups 0.1
2424Item {
2525 id: root
2626
27− // Explicitly use the right domain for this widget because it might be used
28− // in other applications like the welcome wizard.
29− readonly property string domain: "unity8"
30−
3127 function onPowerKeyPressed() {
3228 // FIXME: event.isAutoRepeat is always false on Nexus 4.
3329 // So we use powerKeyTimer.running to avoid the PowerOff key repeat
@@ -71,17 +67,17 @@ Item {
7167 id: logoutDialog
7268 Dialog {
7369 id: dialogueLogout
74− title: i18n.dtr(root.domain, "Log out")
75− text: i18n.dtr(root.domain, "Are you sure you want to log out?")
70+ title: i18n.tr("Log out")
71+ text: i18n.tr("Are you sure you want to log out?")
7672 Button {
77− text: i18n.dtr(root.domain, "No")
73+ text: i18n.tr("No")
7874 onClicked: {
7975 PopupUtils.close(dialogueLogout);
8076 d.dialogShown = false;
8177 }
8278 }
8379 Button {
84− text: i18n.dtr(root.domain, "Yes")
80+ text: i18n.tr("Yes")
8581 onClicked: {
8682 DBusUnitySessionService.Logout();
8783 PopupUtils.close(dialogueLogout);
@@ -95,17 +91,17 @@ Item {
9591 id: shutdownDialog
9692 Dialog {
9793 id: dialogueShutdown
98− title: i18n.dtr(root.domain, "Shut down")
99− text: i18n.dtr(root.domain, "Are you sure you want to shut down?")
94+ title: i18n.tr("Shut down")
95+ text: i18n.tr("Are you sure you want to shut down?")
10096 Button {
101− text: i18n.dtr(root.domain, "No")
97+ text: i18n.tr("No")
10298 onClicked: {
10399 PopupUtils.close(dialogueShutdown);
104100 d.dialogShown = false;
105101 }
106102 }
107103 Button {
108− text: i18n.dtr(root.domain, "Yes")
104+ text: i18n.tr("Yes")
109105 onClicked: {
110106 dBusUnitySessionServiceConnection.closeAllApps();
111107 DBusUnitySessionService.Shutdown();
@@ -120,17 +116,17 @@ Item {
120116 id: rebootDialog
121117 Dialog {
122118 id: dialogueReboot
123− title: i18n.dtr(root.domain, "Reboot")
124− text: i18n.dtr(root.domain, "Are you sure you want to reboot?")
119+ title: i18n.tr("Reboot")
120+ text: i18n.tr("Are you sure you want to reboot?")
125121 Button {
126− text: i18n.dtr(root.domain, "No")
122+ text: i18n.tr("No")
127123 onClicked: {
128124 PopupUtils.close(dialogueReboot)
129125 d.dialogShown = false;
130126 }
131127 }
132128 Button {
133− text: i18n.dtr(root.domain, "Yes")
129+ text: i18n.tr("Yes")
134130 onClicked: {
135131 dBusUnitySessionServiceConnection.closeAllApps();
136132 DBusUnitySessionService.Reboot();
@@ -145,10 +141,10 @@ Item {
145141 id: powerDialog
146142 Dialog {
147143 id: dialoguePower
148− title: i18n.dtr(root.domain, "Power")
149− text: i18n.dtr(root.domain, "Are you sure you would like\nto power off?")
144+ title: i18n.tr("Power")
145+ text: i18n.tr("Are you sure you would like\nto power off?")
150146 Button {
151− text: i18n.dtr(root.domain, "Power off")
147+ text: i18n.tr("Power off")
152148 onClicked: {
153149 dBusUnitySessionServiceConnection.closeAllApps();
154150 PopupUtils.close(dialoguePower);
@@ -158,7 +154,7 @@ Item {
158154 color: UbuntuColors.red
159155 }
160156 Button {
161− text: i18n.dtr(root.domain, "Restart")
157+ text: i18n.tr("Restart")
162158 onClicked: {
163159 dBusUnitySessionServiceConnection.closeAllApps();
164160 DBusUnitySessionService.Reboot();
@@ -168,7 +164,7 @@ Item {
168164 color: UbuntuColors.green
169165 }
170166 Button {
171− text: i18n.dtr(root.domain, "Cancel")
167+ text: i18n.tr("Cancel")
172168 onClicked: {
173169 PopupUtils.close(dialoguePower);
174170 d.dialogShown = false;