Add global locale change event, application now automatically change language when the event is triggered

This commit is contained in:
Xuan Sang LE
2018-03-10 12:22:01 +01:00
parent 45c89be5be
commit 1b9e6e88fa
38 changed files with 255 additions and 219 deletions

View File

@ -242,12 +242,12 @@ class NotePad extends this.OS.GUI.BaseApplication
menu: () ->
me = @
menu = [{
text: __("File"),
text: "__(File)",
child: [
{ text: __("New"), dataid: "#{@name}-New", shortcut: "A-N" },
{ text: __("Open"), dataid: "#{@name}-Open", shortcut: "A-O" },
{ text: __("Save"), dataid: "#{@name}-Save", shortcut: "C-S" },
{ text: __("Save as"), dataid: "#{@name}-Saveas", shortcut: "A-W" }
{ text: "__(New)", dataid: "#{@name}-New", shortcut: "A-N" },
{ text: "__(Open)", dataid: "#{@name}-Open", shortcut: "A-O" },
{ text: "__(Save)", dataid: "#{@name}-Save", shortcut: "C-S" },
{ text: "__(Save as)", dataid: "#{@name}-Saveas", shortcut: "A-W" }
],
onmenuselect: (e) -> me.actionFile e.item.data.dataid
}]