diff --git a/js/fc/nls/misc.js b/js/fc/nls/misc.js deleted file mode 100644 index c2845f4..0000000 --- a/js/fc/nls/misc.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; - -define({ - description: 'Miscellaneous strings.', - root: { - "page-load-err": 'Sorry, an error occurred while trying to get the page.', - "publish-err": 'Sorry, an error occurred while trying to publish.', - "facebook-locale": "en_US", - "default-tweet": "Check out the #MozThimble page I just made:", - "tweet": "Tweet" - }, - metadata: { - "facebook-locale": { - help: "Locale passed to Facebook for social media actions." - } - } -}); diff --git a/js/fc/nls/templates.js b/js/fc/nls/ui.js similarity index 56% rename from js/fc/nls/templates.js rename to js/fc/nls/ui.js index da2c3f7..7cebec5 100644 --- a/js/fc/nls/templates.js +++ b/js/fc/nls/ui.js @@ -1,7 +1,16 @@ +"use strict"; + define([ "inline-l10n" ], function(InlineL10n) { - var root = {}; + var root = { + "page-load-err": 'Sorry, an error occurred while trying to get the page.', + "publish-err": 'Sorry, an error occurred while trying to publish.', + "facebook-locale": "en_US", + "default-tweet": "Check out the #MozThimble page I just made:", + "tweet": "Tweet" + }; + if (typeof(document) == "undefined") { // We're running in node. Parse all inline l10n strings out // of all templates. @@ -17,8 +26,14 @@ define([ } }); } + return { - description: "Strings for the UI defined in template files.", - root: root + description: "Strings for the user interface.", + root: root, + metadata: { + "facebook-locale": { + help: "Locale passed to Facebook for social media actions." + } + } }; }); diff --git a/js/fc/ui/publish.js b/js/fc/ui/publish.js index 99b9fd9..7d5e61c 100644 --- a/js/fc/ui/publish.js +++ b/js/fc/ui/publish.js @@ -2,7 +2,7 @@ define(function (require) { var $ = require("jquery"), - i18nBundle = require("i18n!fc/nls/misc"), + i18nBundle = require("i18n!fc/nls/ui"), BackboneEvents = require("backbone-events"), SocialMedia = require("./social-media"), ConfirmDialogTemplate = require("template!confirm-dialog"), diff --git a/js/fc/ui/social-media.js b/js/fc/ui/social-media.js index 82836c9..39723b4 100644 --- a/js/fc/ui/social-media.js +++ b/js/fc/ui/social-media.js @@ -6,7 +6,7 @@ * they click the like button and we don't like that kind of * monitoring behaviour. */ -define(["i18n!fc/nls/misc"], function(i18nBundle) { +define(["i18n!fc/nls/ui"], function(i18nBundle) { return function SocialMedia() { var urlPlaceHolder = "__URL__PLACE__HOLDER__"; diff --git a/js/friendlycode.js b/js/friendlycode.js index 286041f..347f1ae 100644 --- a/js/friendlycode.js +++ b/js/friendlycode.js @@ -1,6 +1,6 @@ define(function(require) { var $ = require("jquery"), - i18nBundle = require("i18n!fc/nls/misc"), + i18nBundle = require("i18n!fc/nls/ui"), Preferences = require("fc/prefs"), Editor = require("fc/ui/editor"), Modals = require("fc/ui/modals"), diff --git a/js/require-plugins/template.js b/js/require-plugins/template.js index 7e6fccb..8df7e13 100644 --- a/js/require-plugins/template.js +++ b/js/require-plugins/template.js @@ -4,7 +4,7 @@ define([ "text", "underscore", "inline-l10n", - "i18n!fc/nls/templates" + "i18n!fc/nls/ui" ], function (module, text, _, InlineL10n, i18nBundle) { var buildMap = {}, masterConfig = module.config(); @@ -29,7 +29,7 @@ define([ if (buildMap[moduleName]) { var content = buildMap[moduleName]; write.asModule(pluginName + "!" + moduleName, - "define(['underscore', 'inline-l10n', 'i18n!fc/nls/templates'], " + + "define(['underscore', 'inline-l10n', 'i18n!fc/nls/ui'], " + "function (_, InlineL10n, i18nBundle) { \n return " + content + ";});\n"); }