       setTimeout(@delaySettings, 0)
     else
 
-  delaySettings: () ->
+  delaySettings: () =>
     try
       panel = document.querySelector('.settings-view .panels-menu')
-      for d in _defS.Settings.menu
+      for d in @defS.Settings.menu
         el = panel.querySelector("[name='#{d.label}']>a")
         applyTextWithOrg el, d.value
 

    atom.commands.add 'atom-workspace', 'settings-view:open', =>
      @updateSettings(true)

  updateMenu: (menuList) ->
    return if not _defM.Menu
    for menu in menuList
      continue if not menu.label
      key = menu.label
      set = _defM.Menu[key]
      continue if not set
      menu.label = set.value if set?
      if menu.submenu?

class JapaneseMenu

  constructor: ->
    CSON = require 'cson'
    @defM = CSON.load __dirname + "/../def/menu_#{process.platform}.cson"
    @defC = CSON.load __dirname + "/../def/context.cson"
    @defS = CSON.load __dirname + "/../def/settings.cson"

  activate: (state) ->
    setTimeout(@delay, 0)

  delay: () =>
    # Menu
    @updateMenu(atom.menu.template, @defM.Menu)
    atom.menu.update()

    # ContextMenu
