@@ -24,10 +24,6 @@ import Ubuntu.Components.Popups 0.1
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"
31 function onPowerKeyPressed() {
27 function onPowerKeyPressed() {
32 // FIXME: event.isAutoRepeat is always false on Nexus 4.
28 // FIXME: event.isAutoRepeat is always false on Nexus 4.
33 // So we use powerKeyTimer.running to avoid the PowerOff key repeat
29 // So we use powerKeyTimer.running to avoid the PowerOff key repeat
@@ -71,17 +67,17 @@ Item {
71 id: logoutDialog
67 id: logoutDialog
73 id: dialogueLogout
69 id: dialogueLogout
74− title: i18n.dtr(root.domain, "Log out")
70+ title: i18n.tr("Log out")
75− text: i18n.dtr(root.domain, "Are you sure you want to log out?")
71+ text: i18n.tr("Are you sure you want to log out?")
77− text: i18n.dtr(root.domain, "No")
73+ text: i18n.tr("No")
78 onClicked: {
74 onClicked: {
79 PopupUtils.close(dialogueLogout);
75 PopupUtils.close(dialogueLogout);
80 d.dialogShown = false;
76 d.dialogShown = false;
84− text: i18n.dtr(root.domain, "Yes")
80+ text: i18n.tr("Yes")
85 onClicked: {
81 onClicked: {
86 DBusUnitySessionService.Logout();
82 DBusUnitySessionService.Logout();
87 PopupUtils.close(dialogueLogout);
83 PopupUtils.close(dialogueLogout);
@@ -95,17 +91,17 @@ Item {
95 id: shutdownDialog
91 id: shutdownDialog
97 id: dialogueShutdown
93 id: dialogueShutdown
98− title: i18n.dtr(root.domain, "Shut down")
94+ title: i18n.tr("Shut down")
99− text: i18n.dtr(root.domain, "Are you sure you want to shut down?")
95+ text: i18n.tr("Are you sure you want to shut down?")
101− text: i18n.dtr(root.domain, "No")
97+ text: i18n.tr("No")
102 onClicked: {
98 onClicked: {
103 PopupUtils.close(dialogueShutdown);
99 PopupUtils.close(dialogueShutdown);
104 d.dialogShown = false;
100 d.dialogShown = false;
108− text: i18n.dtr(root.domain, "Yes")
104+ text: i18n.tr("Yes")
109 onClicked: {
105 onClicked: {
110 dBusUnitySessionServiceConnection.closeAllApps();
106 dBusUnitySessionServiceConnection.closeAllApps();
111 DBusUnitySessionService.Shutdown();
107 DBusUnitySessionService.Shutdown();
@@ -120,17 +116,17 @@ Item {
120 id: rebootDialog
116 id: rebootDialog
122 id: dialogueReboot
118 id: dialogueReboot
123− title: i18n.dtr(root.domain, "Reboot")
119+ title: i18n.tr("Reboot")
124− text: i18n.dtr(root.domain, "Are you sure you want to reboot?")
120+ text: i18n.tr("Are you sure you want to reboot?")
126− text: i18n.dtr(root.domain, "No")
122+ text: i18n.tr("No")
127 onClicked: {
123 onClicked: {
128 PopupUtils.close(dialogueReboot)
124 PopupUtils.close(dialogueReboot)
129 d.dialogShown = false;
125 d.dialogShown = false;
133− text: i18n.dtr(root.domain, "Yes")
129+ text: i18n.tr("Yes")
134 onClicked: {
130 onClicked: {
135 dBusUnitySessionServiceConnection.closeAllApps();
131 dBusUnitySessionServiceConnection.closeAllApps();
136 DBusUnitySessionService.Reboot();
132 DBusUnitySessionService.Reboot();
@@ -145,10 +141,10 @@ Item {
145 id: powerDialog
141 id: powerDialog
147 id: dialoguePower
143 id: dialoguePower
148− title: i18n.dtr(root.domain, "Power")
144+ title: i18n.tr("Power")
149− text: i18n.dtr(root.domain, "Are you sure you would like\nto power off?")
145+ text: i18n.tr("Are you sure you would like\nto power off?")
151− text: i18n.dtr(root.domain, "Power off")
147+ text: i18n.tr("Power off")
152 onClicked: {
148 onClicked: {
153 dBusUnitySessionServiceConnection.closeAllApps();
149 dBusUnitySessionServiceConnection.closeAllApps();
154 PopupUtils.close(dialoguePower);
150 PopupUtils.close(dialoguePower);
@@ -158,7 +154,7 @@ Item {
158 color: UbuntuColors.red
154 color: UbuntuColors.red
161− text: i18n.dtr(root.domain, "Restart")
157+ text: i18n.tr("Restart")
162 onClicked: {
158 onClicked: {
163 dBusUnitySessionServiceConnection.closeAllApps();
159 dBusUnitySessionServiceConnection.closeAllApps();
164 DBusUnitySessionService.Reboot();
160 DBusUnitySessionService.Reboot();
@@ -168,7 +164,7 @@ Item {
168 color: UbuntuColors.green
164 color: UbuntuColors.green
171− text: i18n.dtr(root.domain, "Cancel")
167+ text: i18n.tr("Cancel")
172 onClicked: {
168 onClicked: {
173 PopupUtils.close(dialoguePower);
169 PopupUtils.close(dialoguePower);
174 d.dialogShown = false;
170 d.dialogShown = false;