forked from phcode-dev/staging.phcode.dev
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.js
More file actions
1 lines (1 loc) · 836 Bytes
/
main.js
File metadata and controls
1 lines (1 loc) · 836 Bytes
1
require.config({paths:{text:"lib/text",i18n:"lib/i18n"},locale:brackets.getLocale()}),define(function(require,exports,module){var CommandManager=brackets.getModule("command/CommandManager"),Menus=brackets.getModule("command/Menus"),Dialogs=brackets.getModule("widgets/Dialogs"),Mustache=brackets.getModule("thirdparty/mustache/mustache"),browserWrapperHtml=require("text!htmlContent/sampleHTMLFragment.html"),Strings=require("strings");function testCommand(){window.alert(Strings.ALERT_MESSAGE);var localizedTemplate=Mustache.render(browserWrapperHtml,Strings);Dialogs.showModalDialogUsingTemplate(localizedTemplate)}var myCommandID="localizationExample.command",menu;CommandManager.register(Strings.COMMAND_NAME,myCommandID,testCommand),Menus.getMenu(Menus.AppMenuBar.EDIT_MENU).addMenuItem(myCommandID,null,Menus.AFTER,myCommandID)});