on xenial help sign in
Add i18n to all the dialog texts
4d88ba4Ying-Chun Liu
qml/Components/Dialogs.qml+13−13
@@ -67,17 +67,17 @@ Item {
67 id: logoutDialog
67 id: logoutDialog
68 Dialog {
68 Dialog {
69 id: dialogueLogout
69 id: dialogueLogout
70− title: "Logout"
70+ title: i18n.tr("Logout")
71− text: "Are you sure that you want to logout?"
71+ text: i18n.tr("Are you sure that you want to logout?")
72 Button {
72 Button {
73− text: "Cancel"
73+ text: i18n.tr("Cancel")
74 onClicked: {
74 onClicked: {
75 PopupUtils.close(dialogueLogout);
75 PopupUtils.close(dialogueLogout);
76 d.dialogShown = false;
76 d.dialogShown = false;
77 }
77 }
78 }
78 }
79 Button {
79 Button {
80− text: "Yes"
80+ text: i18n.tr("Yes")
81 onClicked: {
81 onClicked: {
82 DBusUnitySessionService.Logout();
82 DBusUnitySessionService.Logout();
83 PopupUtils.close(dialogueLogout);
83 PopupUtils.close(dialogueLogout);
@@ -91,17 +91,17 @@ Item {
91 id: shutdownDialog
91 id: shutdownDialog
92 Dialog {
92 Dialog {
93 id: dialogueShutdown
93 id: dialogueShutdown
94− title: "Shutdown"
94+ title: i18n.tr("Shutdown")
95− text: "Are you sure that you want to shutdown?"
95+ text: i18n.tr("Are you sure that you want to shutdown?")
96 Button {
96 Button {
97− text: "Cancel"
97+ text: i18n.tr("Cancel")
98 onClicked: {
98 onClicked: {
99 PopupUtils.close(dialogueShutdown);
99 PopupUtils.close(dialogueShutdown);
100 d.dialogShown = false;
100 d.dialogShown = false;
101 }
101 }
102 }
102 }
103 Button {
103 Button {
104− text: "Yes"
104+ text: i18n.tr("Yes")
105 onClicked: {
105 onClicked: {
106 dBusUnitySessionServiceConnection.closeAllApps();
106 dBusUnitySessionServiceConnection.closeAllApps();
107 DBusUnitySessionService.Shutdown();
107 DBusUnitySessionService.Shutdown();
@@ -116,17 +116,17 @@ Item {
116 id: rebootDialog
116 id: rebootDialog
117 Dialog {
117 Dialog {
118 id: dialogueReboot
118 id: dialogueReboot
119− title: "Reboot"
119+ title: i18n.tr("Reboot")
120− text: "Are you sure that you want to reboot?"
120+ text: i18n.tr("Are you sure that you want to reboot?")
121 Button {
121 Button {
122− text: "Cancel"
122+ text: i18n.tr("Cancel")
123 onClicked: {
123 onClicked: {
124 PopupUtils.close(dialogueReboot)
124 PopupUtils.close(dialogueReboot)
125 d.dialogShown = false;
125 d.dialogShown = false;
126 }
126 }
127 }
127 }
128 Button {
128 Button {
129− text: "Yes"
129+ text: i18n.tr("Yes")
130 onClicked: {
130 onClicked: {
131 dBusUnitySessionServiceConnection.closeAllApps();
131 dBusUnitySessionServiceConnection.closeAllApps();
132 DBusUnitySessionService.Reboot();
132 DBusUnitySessionService.Reboot();
@@ -141,7 +141,7 @@ Item {
141 id: powerDialog
141 id: powerDialog
142 Dialog {
142 Dialog {
143 id: dialoguePower
143 id: dialoguePower
144− title: "Power"
144+ title: i18n.tr("Power")
145 text: i18n.tr("Are you sure you would like to turn power off?")
145 text: i18n.tr("Are you sure you would like to turn power off?")
146 Button {
146 Button {
147 text: i18n.tr("Power off")
147 text: i18n.tr("Power off")