 
   updateContextMenu: () ->
     for itemSet in atom.contextMenu.itemSets
-      set = _defC.Context[itemSet.selector]
+      set = @defC.Context[itemSet.selector]
       continue if not set
       for item in itemSet.items
         continue if item.type is "separator"

      applyTextWithOrg ext, "設定フォルダを開く"

      sp = document.querySelector('.settings-panel')
      for d in _defS.Settings.settings
        applyTextContentBySettingsId(d)
    catch e
      console.error "日本語化に失敗しました。", e

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
