1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-02 13:15:47 +01:00

Annotate most strings which need to be explicitly localified.

This commit is contained in:
Kris Maglione
2011-03-25 22:37:16 -04:00
parent 75bf52f46f
commit 204f8ca25c
26 changed files with 128 additions and 119 deletions

View File

@@ -321,9 +321,9 @@ var File = Class("File", {
*/
iterDirectory: function () {
if (!this.exists())
throw Error("File does not exist");
throw Error(/*L*/"File does not exist");
if (!this.isDirectory())
throw Error("Not a directory");
throw Error(/*L*/"Not a directory");
for (let file in iter(this.directoryEntries))
yield File(file);
},
@@ -362,7 +362,7 @@ var File = Class("File", {
*/
readDirectory: function (sort) {
if (!this.isDirectory())
throw Error("Not a directory");
throw Error(/*L*/"Not a directory");
let array = [e for (e in this.iterDirectory())];
if (sort)
@@ -515,7 +515,7 @@ var File = Class("File", {
DoesNotExist: function (path, error) ({
path: path,
exists: function () false,
__noSuchMethod__: function () { throw error || Error("Does not exist"); }
__noSuchMethod__: function () { throw error || Error(/*L*/"Does not exist"); }
}),
defaultEncoding: "UTF-8",