Localize the edit project error.

This commit is contained in:
Thomas Wilburn 2014-07-11 20:41:47 -07:00
parent 1b513cbbab
commit 9a74355f06
2 changed files with 7 additions and 4 deletions

View file

@ -95,10 +95,12 @@
"dialogDiscard": { "message": "Discard" },
"dialogUnsaved": { "message": "$1 has unsaved work." },
"projectNoCurrentProject": { "message": "No project currently open." },
"paletteExecuting": { "message": "Executing $1..." },
"fileLoaded": { "message": "Loaded $1, $2 bytes" },
"fileAutosaving": { "message": "Executing autosave for all tabs..." },
"editorWordCount": { "message": "$1 characters, $2 words, $3 lines" }
}
}

View file

@ -8,8 +8,9 @@ define([
"ui/contextMenus",
"editor",
"util/template!templates/projectDir.html,templates/projectFile.html",
"util/i18n",
"util/dom2"
], function(Settings, command, sessions, File, M, dialog, context, editor, inflate) {
], function(Settings, command, sessions, File, M, dialog, context, editor, inflate, i18n) {
/*
It's tempting to store projects in local storage, similar to the way that we
@ -463,7 +464,7 @@ define([
editProjectFile: function() {
if (!this.projectFile) {
return dialog("No project opened.");
return dialog(i18n.get("projectNoCurrentProject"));
}
var self = this;
this.projectFile.read(function(err, data) {
@ -511,4 +512,4 @@ define([
return pm;
});
});