mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 23:52:26 +01:00
More polyglotization.
This commit is contained in:
@@ -203,9 +203,9 @@ var Abbreviations = Module("abbreviations", {
|
|||||||
let list = <table>
|
let list = <table>
|
||||||
<tr highlight="Title">
|
<tr highlight="Title">
|
||||||
<td/>
|
<td/>
|
||||||
<td style="padding-right: 1em;"><!--L-->Mode</td>
|
<td style="padding-right: 1em;">{_("title.Mode")}</td>
|
||||||
<td style="padding-right: 1em;"><!--L-->Abbrev</td>
|
<td style="padding-right: 1em;">{_("title.Abbrev")}</td>
|
||||||
<td style="padding-right: 1em;"><!--L-->Replacement</td>
|
<td style="padding-right: 1em;">{_("title.Replacement")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<col style="min-width: 6em; padding-right: 1em;"/>
|
<col style="min-width: 6em; padding-right: 1em;"/>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1629,7 +1629,7 @@ var ItemList = Class("ItemList", {
|
|||||||
_init: function _init() {
|
_init: function _init() {
|
||||||
this._div = this._dom(
|
this._div = this._dom(
|
||||||
<div class="ex-command-output" highlight="Normal" style="white-space: nowrap">
|
<div class="ex-command-output" highlight="Normal" style="white-space: nowrap">
|
||||||
<div highlight="Completions" key="noCompletions"><span highlight="Title"><!--L-->No Completions</span></div>
|
<div highlight="Completions" key="noCompletions"><span highlight="Title">{_("completion.noCompletions")}</span></div>
|
||||||
<div key="completions"/>
|
<div key="completions"/>
|
||||||
<div highlight="Completions">
|
<div highlight="Completions">
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -689,7 +689,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
unescape(encodeURI( // UTF-8 handling hack.
|
unescape(encodeURI( // UTF-8 handling hack.
|
||||||
<document xmlns={NS}
|
<document xmlns={NS}
|
||||||
name="plugins" title={config.appName + " Plugins"}>
|
name="plugins" title={config.appName + " Plugins"}>
|
||||||
<h1 tag="using-plugins"><!--L-->Using Plugins</h1>
|
<h1 tag="using-plugins">{_("help.title.Using Plugins")}</h1>
|
||||||
<toc start="2"/>
|
<toc start="2"/>
|
||||||
|
|
||||||
{body}
|
{body}
|
||||||
@@ -1078,7 +1078,7 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
* These are set and accessed with the "g:" prefix.
|
* These are set and accessed with the "g:" prefix.
|
||||||
*/
|
*/
|
||||||
_globalVariables: {},
|
_globalVariables: {},
|
||||||
globalVariables: deprecated(/*L*/"the options system", {
|
globalVariables: deprecated(_("deprecated.for.theOptionsSystem"), {
|
||||||
get: function globalVariables() this._globalVariables
|
get: function globalVariables() this._globalVariables
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@@ -1967,11 +1967,11 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
commandline.commandOutput(
|
commandline.commandOutput(
|
||||||
<table>
|
<table>
|
||||||
<tr highlight="Title" align="left">
|
<tr highlight="Title" align="left">
|
||||||
<th colspan="3"><!--L-->Code execution summary</th>
|
<th colspan="3">{_("title.Code execution summary")}</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td>  Executed:</td><td align="right"><span class="times-executed">{count}</span></td><td>times</td></tr>
|
<tr><td>  {_("title.Executed")}:</td><td align="right"><span class="times-executed">{count}</span></td><td><!--L-->times</td></tr>
|
||||||
<tr><td>  Average time:</td><td align="right"><span class="time-average">{each.toFixed(2)}</span></td><td>{eachUnits}</td></tr>
|
<tr><td>  {_("title.Average time")}:</td><td align="right"><span class="time-average">{each.toFixed(2)}</span></td><td>{eachUnits}</td></tr>
|
||||||
<tr><td>  Total time:</td><td align="right"><span class="time-total">{total.toFixed(2)}</span></td><td>{totalUnits}</td></tr>
|
<tr><td>  {_("title.Total time")}:</td><td align="right"><span class="time-total">{total.toFixed(2)}</span></td><td>{totalUnits}</td></tr>
|
||||||
</table>);
|
</table>);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ var Editor = Module("editor", {
|
|||||||
try {
|
try {
|
||||||
var tmpfile = io.createTempFile();
|
var tmpfile = io.createTempFile();
|
||||||
if (!tmpfile)
|
if (!tmpfile)
|
||||||
throw Error(/*L*/"Couldn't create temporary file");
|
throw Error(_("io.cantCreateTempFile"));
|
||||||
|
|
||||||
if (textBox) {
|
if (textBox) {
|
||||||
highlight.highlightNode(textBox, origGroup + " EditorEditing");
|
highlight.highlightNode(textBox, origGroup + " EditorEditing");
|
||||||
@@ -329,8 +329,7 @@ var Editor = Module("editor", {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!tmpfile.write(text))
|
if (!tmpfile.write(text))
|
||||||
throw Error(/*L*/"Input contains characters not valid in the current " +
|
throw Error(_("io.cantEncode"));
|
||||||
"file encoding");
|
|
||||||
|
|
||||||
var lastUpdate = Date.now();
|
var lastUpdate = Date.now();
|
||||||
|
|
||||||
|
|||||||
@@ -219,7 +219,7 @@ var History = Module("history", {
|
|||||||
description: "The sort order of the results",
|
description: "The sort order of the results",
|
||||||
completer: function (context, args) {
|
completer: function (context, args) {
|
||||||
context.compare = CompletionContext.Sort.unsorted;
|
context.compare = CompletionContext.Sort.unsorted;
|
||||||
return /*L*/array.flatten([
|
return array.flatten([
|
||||||
"annotation",
|
"annotation",
|
||||||
"date",
|
"date",
|
||||||
"date added",
|
"date added",
|
||||||
@@ -230,8 +230,8 @@ var History = Module("history", {
|
|||||||
"uri",
|
"uri",
|
||||||
"visitcount"
|
"visitcount"
|
||||||
].map(function (order) [
|
].map(function (order) [
|
||||||
["+" + order.replace(" ", ""), "Sort by " + order + " ascending"],
|
["+" + order.replace(" ", ""), /*L*/"Sort by " + order + " ascending"],
|
||||||
["-" + order.replace(" ", ""), "Sort by " + order + " descending"]
|
["-" + order.replace(" ", ""), /*L*/"Sort by " + order + " descending"]
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -431,9 +431,9 @@ var Mappings = Module("mappings", {
|
|||||||
let list = <table>
|
let list = <table>
|
||||||
<tr highlight="Title">
|
<tr highlight="Title">
|
||||||
<td/>
|
<td/>
|
||||||
<td style="padding-right: 1em;"><!--L-->Mode</td>
|
<td style="padding-right: 1em;">{_("title.Mode")}</td>
|
||||||
<td style="padding-right: 1em;"><!--L-->Command</td>
|
<td style="padding-right: 1em;">{_("title.Command")}</td>
|
||||||
<td style="padding-right: 1em;"><!--L-->Action</td>
|
<td style="padding-right: 1em;">{_("title.Action")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<col style="min-width: 6em; padding-right: 1em;"/>
|
<col style="min-width: 6em; padding-right: 1em;"/>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -100,11 +100,14 @@ command.set.unknownOption-1 = E518: Unknown option: %S
|
|||||||
command.yank.yankedLine-1 = Yanked %S line
|
command.yank.yankedLine-1 = Yanked %S line
|
||||||
command.yank.yankedLines-1 = Yanked %S lines
|
command.yank.yankedLines-1 = Yanked %S lines
|
||||||
|
|
||||||
|
completion.additional = (additional)
|
||||||
|
completion.generating = Generating results...
|
||||||
|
completion.noCompletions = No Completions
|
||||||
completion.waitingFor-1 = Waiting for %S
|
completion.waitingFor-1 = Waiting for %S
|
||||||
completion.waitingForKeyPress = Waiting for key press
|
completion.waitingForKeyPress = Waiting for key press
|
||||||
completion.matchIndex-2 = match %S of %S
|
completion.matchIndex-2 = match %S of %S
|
||||||
completion.generating = Generating results...
|
|
||||||
|
|
||||||
|
dactyl.created-1 = "(created %S)"
|
||||||
dactyl.parsingCommandLine-1 = Parsing command line options: %S
|
dactyl.parsingCommandLine-1 = Parsing command line options: %S
|
||||||
dactyl.notCommand-2 = E492: Not a %S command: %S
|
dactyl.notCommand-2 = E492: Not a %S command: %S
|
||||||
dactyl.sourcingPlugins-1 = Sourcing plugin directory: %S...
|
dactyl.sourcingPlugins-1 = Sourcing plugin directory: %S...
|
||||||
@@ -117,6 +120,8 @@ dactyl.sourced-1 = Sourced: %S
|
|||||||
dactyl.prompt.openMany-1 = This will open %S new tabs. Would you like to continue? (yes/[no]):
|
dactyl.prompt.openMany-1 = This will open %S new tabs. Would you like to continue? (yes/[no]):
|
||||||
dactyl.yank-1 = Yank %S
|
dactyl.yank-1 = Yank %S
|
||||||
|
|
||||||
|
deprecated.for.theOptionsSystem = the options system
|
||||||
|
|
||||||
dialog.notAvailable-1 = Dialog %S not available
|
dialog.notAvailable-1 = Dialog %S not available
|
||||||
|
|
||||||
# TODO: merge with addon.*?
|
# TODO: merge with addon.*?
|
||||||
@@ -155,8 +160,10 @@ group.invalidName-1 = Invalid group name: %S
|
|||||||
group.noCurrent = No current group
|
group.noCurrent = No current group
|
||||||
|
|
||||||
help.dontPanic = E478: Don't panic!
|
help.dontPanic = E478: Don't panic!
|
||||||
|
help.Example = Example
|
||||||
help.noFile-1 = Sorry, help file %S not found
|
help.noFile-1 = Sorry, help file %S not found
|
||||||
help.noTopic-1 = Sorry, no help for %S
|
help.noTopic-1 = Sorry, no help for %S
|
||||||
|
help.title.Using Plugins = Using Plugins
|
||||||
|
|
||||||
hints.noMatcher-1 = Invalid 'hintmatching' type: %S
|
hints.noMatcher-1 = Invalid 'hintmatching' type: %S
|
||||||
|
|
||||||
@@ -164,23 +171,29 @@ history.noMatching-1 = No history matching %S
|
|||||||
history.none = No history set
|
history.none = No history set
|
||||||
history.noURL = URL not found in history
|
history.noURL = URL not found in history
|
||||||
|
|
||||||
io.noSuchDir-1 = E344: Can't find directory %S
|
io.callingShell-1 = Calling shell to execute: %S
|
||||||
io.noPrevDir = E186: No previous directory
|
io.cantCreateTempFile = Couldn't create temporary file
|
||||||
io.notReadable-1 = Can't open file %S
|
io.cantEncode = Input contains characters not valid in the current file encoding
|
||||||
io.notWriteable-1 = Can't open file %S for writing
|
io.commandFailed = E472: Command failed
|
||||||
|
io.definedAt = Defined at %S
|
||||||
|
io.downloadFinished-2 = Download of %S to %S finished
|
||||||
|
io.eNotDir = Not a directory
|
||||||
io.exists = File exists (add ! to override)
|
io.exists = File exists (add ! to override)
|
||||||
io.exists-1 = File %S exists (add ! to override)
|
io.exists-1 = File %S exists (add ! to override)
|
||||||
io.noCommand-1 = Command not found: %S
|
io.noCommand-1 = Command not found: %S
|
||||||
io.commandFailed = E472: Command failed
|
io.noPrevDir = E186: No previous directory
|
||||||
io.oneFileAllowed = E172: Only one file name allowed
|
io.noSuchDir-1 = E344: Can't find directory %S
|
||||||
io.callingShell-1 = Calling shell to execute: %S
|
io.noSuchFile = File does not exist
|
||||||
io.sourcing-1 = sourcing %S
|
|
||||||
io.sourcingEnd-1 = finished sourcing %S
|
|
||||||
io.notInRTP-1 = not found in 'runtimepath': %S
|
io.notInRTP-1 = not found in 'runtimepath': %S
|
||||||
|
io.notReadable-1 = Can't open file %S
|
||||||
|
io.notWriteable-1 = Can't open file %S for writing
|
||||||
|
io.oneFileAllowed = E172: Only one file name allowed
|
||||||
io.searchingFor-1 = Searching for %S
|
io.searchingFor-1 = Searching for %S
|
||||||
io.searchingFor-2 = Searching for %S in %S
|
io.searchingFor-2 = Searching for %S in %S
|
||||||
io.downloadFinished-2 = Download of %S to %S finished
|
|
||||||
io.shellReturn-1 = shell returned %S
|
io.shellReturn-1 = shell returned %S
|
||||||
|
io.sourcing-1 = sourcing %S
|
||||||
|
io.sourcingEnd-1 = finished sourcing %S
|
||||||
|
io.sourcingError-1 = Sourcing file: %S
|
||||||
|
|
||||||
macro.canceled-1 = Canceled playback of macro '%S'
|
macro.canceled-1 = Canceled playback of macro '%S'
|
||||||
macro.recorded-1 = Recorded macro '%S'
|
macro.recorded-1 = Recorded macro '%S'
|
||||||
@@ -246,6 +259,7 @@ plugin.searchingFor-1 = Searching for %S
|
|||||||
plugin.searchingForIn-2 = Searching for %S in %S
|
plugin.searchingForIn-2 = Searching for %S in %S
|
||||||
plugin.notReplacingContext-1 = Not replacing plugin context for %S
|
plugin.notReplacingContext-1 = Not replacing plugin context for %S
|
||||||
|
|
||||||
|
pref.hostPreferences-1 = %S Preferences
|
||||||
pref.prompt.resetAll-1 = Warning: Resetting all preferences may make %S unusable. Would you like to continue (yes/[no]):
|
pref.prompt.resetAll-1 = Warning: Resetting all preferences may make %S unusable. Would you like to continue (yes/[no]):
|
||||||
pref.safeSet.warnChanged-1 = Warning: Setting preference %S, but it's changed from its default value.
|
pref.safeSet.warnChanged-1 = Warning: Setting preference %S, but it's changed from its default value.
|
||||||
|
|
||||||
@@ -273,13 +287,33 @@ style.inline = inline
|
|||||||
|
|
||||||
time.total-1 = Total time: %S
|
time.total-1 = Total time: %S
|
||||||
|
|
||||||
|
title.Abbrev = Abbrev
|
||||||
|
title.Action = Action
|
||||||
|
title.Args = Args
|
||||||
|
title.Average time = Average time
|
||||||
|
title.CSS = CSS
|
||||||
|
title.Code execution summary = Code execution summary
|
||||||
|
title.Command = Command
|
||||||
|
title.Complete = Complete
|
||||||
|
title.Definition = Definition
|
||||||
|
title.Description = Description
|
||||||
|
title.Executed = Executed
|
||||||
|
title.Filter = Filter
|
||||||
|
title.Jump = Jump
|
||||||
|
title.Mode = Mode
|
||||||
|
title.Name = Name
|
||||||
title.Progress = Progress
|
title.Progress = Progress
|
||||||
|
title.Range = Range
|
||||||
|
title.Replacement = Replacement
|
||||||
title.Source = Source
|
title.Source = Source
|
||||||
title.Speed = Speed
|
title.Speed = Speed
|
||||||
title.Status = Status
|
title.Status = Status
|
||||||
title.Time remaining = Time remaining
|
title.Time remaining = Time remaining
|
||||||
title.Title = Title
|
title.Title = Title
|
||||||
|
title.Total time = Total time
|
||||||
title.Totals = Totals
|
title.Totals = Totals
|
||||||
|
title.URI = URI
|
||||||
|
title.Version = Version
|
||||||
|
|
||||||
variable.none = No variables found
|
variable.none = No variables found
|
||||||
|
|
||||||
|
|||||||
@@ -282,11 +282,11 @@ var AddonList = Class("AddonList", {
|
|||||||
XML.ignoreWhitespace = true;
|
XML.ignoreWhitespace = true;
|
||||||
util.xmlToDom(<table highlight="Addons" key="list" xmlns={XHTML}>
|
util.xmlToDom(<table highlight="Addons" key="list" xmlns={XHTML}>
|
||||||
<tr highlight="AddonHead">
|
<tr highlight="AddonHead">
|
||||||
<td><!--L-->Name</td>
|
<td>{_("title.Name")}</td>
|
||||||
<td><!--L-->Version</td>
|
<td>{_("title.Version")}</td>
|
||||||
<td><!--L-->Status</td>
|
<td>{_("title.Status")}</td>
|
||||||
<td/>
|
<td/>
|
||||||
<td><!--L-->Description</td>
|
<td>{_("title.Description")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>, this.document, this.nodes);
|
</table>, this.document, this.nodes);
|
||||||
|
|
||||||
|
|||||||
@@ -194,8 +194,10 @@ function require(obj, name, from) {
|
|||||||
if (arguments.length === 1)
|
if (arguments.length === 1)
|
||||||
[obj, name] = [{}, obj];
|
[obj, name] = [{}, obj];
|
||||||
|
|
||||||
|
let caller = Components.stack.caller;
|
||||||
|
|
||||||
if (!loaded[name])
|
if (!loaded[name])
|
||||||
defineModule.loadLog.push((from || "require") + ": loading " + name + (obj.NAME ? " into " + obj.NAME : ""));
|
defineModule.loadLog.push((from || "require") + ": loading " + name + " into " + (obj.NAME || caller.filename + ":" + caller.lineNumber));
|
||||||
|
|
||||||
JSMLoader.load(name + ".jsm", obj);
|
JSMLoader.load(name + ".jsm", obj);
|
||||||
return obj;
|
return obj;
|
||||||
|
|||||||
@@ -660,11 +660,11 @@ var Commands = Module("commands", {
|
|||||||
<tr highlight="Title">
|
<tr highlight="Title">
|
||||||
<td/>
|
<td/>
|
||||||
<td style="padding-right: 1em;"></td>
|
<td style="padding-right: 1em;"></td>
|
||||||
<td style="padding-right: 1ex;"><!--L-->Name</td>
|
<td style="padding-right: 1ex;">{_("title.Name")}</td>
|
||||||
<td style="padding-right: 1ex;"><!--L-->Args</td>
|
<td style="padding-right: 1ex;">{_("title.Args")}</td>
|
||||||
<td style="padding-right: 1ex;"><!--L-->Range</td>
|
<td style="padding-right: 1ex;">{_("title.Range")}</td>
|
||||||
<td style="padding-right: 1ex;"><!--L-->Complete</td>
|
<td style="padding-right: 1ex;">{_("title.Complete")}</td>
|
||||||
<td style="padding-right: 1ex;"><!--L-->Definition</td>
|
<td style="padding-right: 1ex;">{_("title.Definition")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<col style="min-width: 6em; padding-right: 1em;"/>
|
<col style="min-width: 6em; padding-right: 1em;"/>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -960,7 +960,7 @@ var Completion = Module("completion", {
|
|||||||
context.title = ["URL", "Title"];
|
context.title = ["URL", "Title"];
|
||||||
|
|
||||||
context.fork("additional", 0, this, function (context) {
|
context.fork("additional", 0, this, function (context) {
|
||||||
context.title[0] += /*L*/" (additional)";
|
context.title[0] += " " + _("completion.additional");
|
||||||
context.filter = context.parent.filter; // FIXME
|
context.filter = context.parent.filter; // FIXME
|
||||||
context.completions = context.parent.completions;
|
context.completions = context.parent.completions;
|
||||||
// For items whose URL doesn't exactly match the filter,
|
// For items whose URL doesn't exactly match the filter,
|
||||||
|
|||||||
@@ -31,13 +31,14 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
loadStyles: function loadStyles() {
|
loadStyles: function loadStyles(force) {
|
||||||
const { highlight } = require("highlight");
|
const { highlight } = require("highlight");
|
||||||
|
const { _ } = require("messages");
|
||||||
|
|
||||||
highlight.styleableChrome = this.styleableChrome;
|
highlight.styleableChrome = this.styleableChrome;
|
||||||
|
|
||||||
highlight.loadCSS(this.CSS);
|
highlight.loadCSS(this.CSS.replace(/__MSG_(.*?)__/g, function (m0, m1) _(m1)));
|
||||||
highlight.loadCSS(this.helpCSS);
|
highlight.loadCSS(this.helpCSS.replace(/__MSG_(.*?)__/g, function (m0, m1) _(m1)));
|
||||||
|
|
||||||
if (!util.haveGecko("2b"))
|
if (!util.haveGecko("2b"))
|
||||||
highlight.loadCSS(<![CDATA[
|
highlight.loadCSS(<![CDATA[
|
||||||
@@ -181,7 +182,7 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
"--template=hg{rev}-" + this.branch + " ({date|isodate})"]).output;
|
"--template=hg{rev}-" + this.branch + " ({date|isodate})"]).output;
|
||||||
let version = this.addon.version;
|
let version = this.addon.version;
|
||||||
if ("@DATE@" !== "@" + "DATE@")
|
if ("@DATE@" !== "@" + "DATE@")
|
||||||
version += /*L*/" (created: @DATE@)";
|
version += " " + _("dactyl.created", "@DATE@");
|
||||||
return version;
|
return version;
|
||||||
}),
|
}),
|
||||||
|
|
||||||
@@ -646,7 +647,7 @@ var ConfigBase = Class("ConfigBase", {
|
|||||||
HelpEx;;;FontCode display: inline-block; color: #527BBD;
|
HelpEx;;;FontCode display: inline-block; color: #527BBD;
|
||||||
|
|
||||||
HelpExample display: block; margin: 1em 0;
|
HelpExample display: block; margin: 1em 0;
|
||||||
HelpExample::before content: /*L*/"Example: "; font-weight: bold;
|
HelpExample::before content: "__MSG_help.Example__: "; font-weight: bold;
|
||||||
|
|
||||||
HelpInfo display: block; width: 20em; margin-left: auto;
|
HelpInfo display: block; width: 20em; margin-left: auto;
|
||||||
HelpInfoLabel display: inline-block; width: 6em; color: magenta; font-weight: bold; vertical-align: text-top;
|
HelpInfoLabel display: inline-block; width: 6em; color: magenta; font-weight: bold; vertical-align: text-top;
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ var IO = Module("io", {
|
|||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
dactyl.reportError(e);
|
dactyl.reportError(e);
|
||||||
let message = /*L*/"Sourcing file: " + (e.echoerr || file.path + ": " + e);
|
let message = _("io.sourcingError", e.echoerr || file.path + ": " + e);
|
||||||
if (!params.silent)
|
if (!params.silent)
|
||||||
dactyl.echoerr(message);
|
dactyl.echoerr(message);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ try {
|
|||||||
Components.utils.import("resource://dactyl/bootstrap.jsm");
|
Components.utils.import("resource://dactyl/bootstrap.jsm");
|
||||||
defineModule("overlay", {
|
defineModule("overlay", {
|
||||||
exports: ["ModuleBase"],
|
exports: ["ModuleBase"],
|
||||||
require: ["config", "services", "util"]
|
require: ["config", "io", "services", "util"]
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return template.options(/*L*/config.host + " Preferences", prefs.call(this));
|
return template.options(_("pref.hostPreferences", config.host), prefs.call(this));
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -321,9 +321,9 @@ var File = Class("File", {
|
|||||||
*/
|
*/
|
||||||
iterDirectory: function () {
|
iterDirectory: function () {
|
||||||
if (!this.exists())
|
if (!this.exists())
|
||||||
throw Error(/*L*/"File does not exist");
|
throw Error(_("io.noSuchFile"));
|
||||||
if (!this.isDirectory())
|
if (!this.isDirectory())
|
||||||
throw Error(/*L*/"Not a directory");
|
throw Error(_("io.eNotDir"));
|
||||||
for (let file in iter(this.directoryEntries))
|
for (let file in iter(this.directoryEntries))
|
||||||
yield File(file);
|
yield File(file);
|
||||||
},
|
},
|
||||||
@@ -362,7 +362,7 @@ var File = Class("File", {
|
|||||||
*/
|
*/
|
||||||
readDirectory: function (sort) {
|
readDirectory: function (sort) {
|
||||||
if (!this.isDirectory())
|
if (!this.isDirectory())
|
||||||
throw Error(/*L*/"Not a directory");
|
throw Error(_("io.eNotDir"));
|
||||||
|
|
||||||
let array = [e for (e in this.iterDirectory())];
|
let array = [e for (e in this.iterDirectory())];
|
||||||
if (sort)
|
if (sort)
|
||||||
@@ -515,7 +515,7 @@ var File = Class("File", {
|
|||||||
DoesNotExist: function (path, error) ({
|
DoesNotExist: function (path, error) ({
|
||||||
path: path,
|
path: path,
|
||||||
exists: function () false,
|
exists: function () false,
|
||||||
__noSuchMethod__: function () { throw error || Error(/*L*/"Does not exist"); }
|
__noSuchMethod__: function () { throw error || Error("Does not exist"); }
|
||||||
}),
|
}),
|
||||||
|
|
||||||
defaultEncoding: "UTF-8",
|
defaultEncoding: "UTF-8",
|
||||||
|
|||||||
@@ -312,9 +312,9 @@ var Styles = Module("Styles", {
|
|||||||
<tr highlight="Title">
|
<tr highlight="Title">
|
||||||
<td/>
|
<td/>
|
||||||
<td/>
|
<td/>
|
||||||
<td style="padding-right: 1em;"><!--L-->Name</td>
|
<td style="padding-right: 1em;">{_("title.Name")}</td>
|
||||||
<td style="padding-right: 1em;"><!--L-->Filter</td>
|
<td style="padding-right: 1em;">{_("title.Filter")}</td>
|
||||||
<td style="padding-right: 1em;"><!--L-->CSS</td>
|
<td style="padding-right: 1em;">{_("title.CSS")}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<col style="min-width: 4em; padding-right: 1em;"/>
|
<col style="min-width: 4em; padding-right: 1em;"/>
|
||||||
<col style="min-width: 1em; text-align: center; color: red; font-weight: bold;"/>
|
<col style="min-width: 1em; text-align: center; color: red; font-weight: bold;"/>
|
||||||
|
|||||||
@@ -363,9 +363,9 @@ var Template = Module("Template", {
|
|||||||
// <e4x>
|
// <e4x>
|
||||||
return <table>
|
return <table>
|
||||||
<tr style="text-align: left;" highlight="Title">
|
<tr style="text-align: left;" highlight="Title">
|
||||||
<th colspan="2"><!--L-->Jump</th>
|
<th colspan="2">{_("title.Jump")}</th>
|
||||||
<th><!--L-->Title</th>
|
<th>{_("title.Title")}</th>
|
||||||
<th><!--L-->URI</th>
|
<th>{_("title.URI")}</th>
|
||||||
</tr>
|
</tr>
|
||||||
{
|
{
|
||||||
this.map(Iterator(elems), function ([idx, val])
|
this.map(Iterator(elems), function ([idx, val])
|
||||||
@@ -496,7 +496,7 @@ var Template = Module("Template", {
|
|||||||
let (name = item.name || item.names[0], frame = item.definedAt)
|
let (name = item.name || item.names[0], frame = item.definedAt)
|
||||||
!frame ? name :
|
!frame ? name :
|
||||||
template.helpLink(help(item), name, "Title") +
|
template.helpLink(help(item), name, "Title") +
|
||||||
<span highlight="LinkInfo" xmlns:dactyl={NS}><!--L-->Defined at {sourceLink(frame)}</span>
|
<span highlight="LinkInfo" xmlns:dactyl={NS}>{_("io.definedAt", sourceLink(frame))}</span>
|
||||||
}</span>
|
}</span>
|
||||||
</td>
|
</td>
|
||||||
{ item.columns ? template.map(item.columns, function (c) <td>{c}</td>) : "" }
|
{ item.columns ? template.map(item.columns, function (c) <td>{c}</td>) : "" }
|
||||||
|
|||||||
Reference in New Issue
Block a user