Skip to content

Commit

Permalink
Merge branch 'release-1.13.0rc5'
Browse files Browse the repository at this point in the history
* release-1.13.0rc5:
  Update version info.
  lang: update .dtd
  lang: update .properties
  lang: improve localization
  lang: rearrange sb.detail.linked.* entities
  lang: sb.detail => sb.detail.title
  capture: add tooltip for saveDataUri
  capture: add tooltip for fileAsHtml
  core: additional CAPTURE -> SAVE
  core: additional capture.default.* => save.default.*
  core: additional sb.prefs.*capture* -> sb.prefs.*save*
  core: additional key.capture* -> key.save*
  core: rename "capture" to "save"
  lang: remove obsolete entities
  • Loading branch information
danny0838 committed Aug 25, 2016
2 parents c0a623f + 87f4d75 commit 917b460
Show file tree
Hide file tree
Showing 59 changed files with 1,386 additions and 1,369 deletions.
4 changes: 2 additions & 2 deletions chrome/content/scrapbook/capture.js
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ var sbCaptureTask = {

_captureWindow: function(aWindow, aAllowPartial) {
// update info
SB_trace(sbCommonUtils.lang("CAPTURE_START"));
SB_trace(sbCommonUtils.lang("SAVE_START"));

// Disable "Skip" directive before the capture because we cannot reliably terminate
// a capture process once it's started, and it would result in partial saved files.
Expand Down Expand Up @@ -505,7 +505,7 @@ var sbCaptureTask = {
gTitles[this.index] = ret[2];
} else {
if ( gShowDetail ) window.close();
SB_trace(sbCommonUtils.lang("CAPTURE_ABORT"));
SB_trace(sbCommonUtils.lang("SAVE_ABORT"));
this.fail("");
}
},
Expand Down
34 changes: 17 additions & 17 deletions chrome/content/scrapbook/capture.xul
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!DOCTYPE window SYSTEM "chrome://scrapbook/locale/message.dtd">

<window id="sbCaptureWindow"
title="&sb.capture; - ScrapBook"
title="&sb.save; - ScrapBook"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
class="simple"
onload="SB_initCapture();"
Expand All @@ -20,8 +20,8 @@

<popupset id="sbCapturePopupSet">
<menupopup id="sbCapturePopup">
<menuitem id="sbCapturePopupCheck" label="&sb.capture.checkSelection;" oncommand="sbCaptureTask.toggleSelection(true);" />
<menuitem id="sbCapturePopupUncheck" label="&sb.capture.uncheckSelection;" oncommand="sbCaptureTask.toggleSelection(false);" />
<menuitem id="sbCapturePopupCheck" label="&sb.save.checkSelection;" oncommand="sbCaptureTask.toggleSelection(true);" />
<menuitem id="sbCapturePopupUncheck" label="&sb.save.uncheckSelection;" oncommand="sbCaptureTask.toggleSelection(false);" />
</menupopup>
</popupset>

Expand All @@ -42,11 +42,11 @@
<treecols>
<treecol type="checkbox" fixed="true" editable="true" ignoreincolumnpicker="true" />
<splitter class="tree-splitter"/>
<treecol label="&sb.capture.column.address;" flex="35" editable="true" crop="right" persist="width hidden" />
<treecol label="&sb.save.column.address;" flex="35" editable="true" crop="right" persist="width hidden" />
<splitter class="tree-splitter"/>
<treecol label="&sb.capture.column.title;" flex="9" editable="true" persist="width hidden" />
<treecol label="&sb.save.column.title;" flex="9" editable="true" persist="width hidden" />
<splitter class="tree-splitter"/>
<treecol label="&sb.capture.column.status;" flex="5" editable="true" persist="width hidden"/>
<treecol label="&sb.save.column.status;" flex="5" editable="true" persist="width hidden"/>
</treecols>
<treechildren/>
</tree>
Expand All @@ -73,7 +73,7 @@
</hbox>
</hbox>

<checkbox id="sbCaptureFilterToggle" label="&sb.capture.filter;" checked="false" oncommand="sbCaptureTask.toggleFilterBox(event);" />
<checkbox id="sbCaptureFilterToggle" label="&sb.save.filter;" checked="false" oncommand="sbCaptureTask.toggleFilterBox(event);" />

<vbox id="sbCaptureFilterBox" hidden="true">
<hbox>
Expand All @@ -92,9 +92,9 @@
ontextentered="sbCaptureFilter.add();"
tabscrolling="true"
type="autocomplete" />
<button id="sbCaptureFilterAccept" label="&sb.capture.filter.accept;" disabled="true" tooltiptext="&sb.capture.filter.accept.help;" oncommand="sbCaptureFilter.add();" />
<button id="sbCaptureFilterCancel" label="&sb.capture.filter.cancel;" disabled="true" tooltiptext="&sb.capture.filter.cancel.help;" oncommand="sbCaptureFilter.cancel();" />
<button id="sbCaptureFilterDelete" label="&sb.capture.filter.delete;" disabled="true" tooltiptext="&sb.capture.filter.delete.help;" oncommand="sbCaptureFilter.del();" />
<button id="sbCaptureFilterAccept" label="&sb.save.filter.accept;" disabled="true" tooltiptext="&sb.save.filter.accept.help;" oncommand="sbCaptureFilter.add();" />
<button id="sbCaptureFilterCancel" label="&sb.save.filter.cancel;" disabled="true" tooltiptext="&sb.save.filter.cancel.help;" oncommand="sbCaptureFilter.cancel();" />
<button id="sbCaptureFilterDelete" label="&sb.save.filter.delete;" disabled="true" tooltiptext="&sb.save.filter.delete.help;" oncommand="sbCaptureFilter.del();" />
</hbox>
<tree id="sbCaptureFilter"
autostrech="always"
Expand All @@ -103,21 +103,21 @@
seltype="single"
>
<treecols>
<treecol label="&sb.capture.filter.column.rule;" flex="1" editable="true" crop="right" persist="width hidden" />
<treecol label="&sb.save.filter.column.rule;" flex="1" editable="true" crop="right" persist="width hidden" />
<splitter class="tree-splitter" />
<treecol label="&sb.capture.filter.column.content;" flex="10" editable="true" crop="right" persist="width hidden" />
<treecol label="&sb.save.filter.column.content;" flex="10" editable="true" crop="right" persist="width hidden" />
</treecols>
<treechildren/>
</tree>
</vbox>

<hbox>
<button id="sbCaptureSkipButton" label="&sb.capture.skip;" oncommand="sbCaptureTask.next(true);" disabled="true" />
<button id="sbCaptureSkipButton" label="&sb.save.skip;" oncommand="sbCaptureTask.next(true);" disabled="true" />
<spacer flex="1" />
<button id="sbCapturePauseButton" label="&sb.capture.pause;" oncommand="sbCaptureTask.pause();" />
<button id="sbCaptureStartButton" label="&sb.capture.start;" oncommand="sbCaptureTask.activate();" hidden="true" />
<button id="sbCaptureCancelButton" label="&sb.capture.abort;" oncommand="sbCaptureTask.abort();" />
<button id="sbCaptureFinishButton" label="&sb.capture.finish;" oncommand="sbCaptureTask.closeWindow();" hidden="true" />
<button id="sbCapturePauseButton" label="&sb.save.pause;" oncommand="sbCaptureTask.pause();" />
<button id="sbCaptureStartButton" label="&sb.save.start;" oncommand="sbCaptureTask.activate();" hidden="true" />
<button id="sbCaptureCancelButton" label="&sb.save.abort;" oncommand="sbCaptureTask.abort();" />
<button id="sbCaptureFinishButton" label="&sb.save.finish;" oncommand="sbCaptureTask.closeWindow();" hidden="true" />
</hbox>

</window>
2 changes: 1 addition & 1 deletion chrome/content/scrapbook/combine.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ var sbCombineService = {
this.WIZARD.getButton("cancel").disabled = true;
this.option["R"] = document.getElementById("sbCombineOptionRemove").checked;
this.toggleElements(true);
SB_trace(sbCommonUtils.lang("CAPTURE_START"));
SB_trace(sbCommonUtils.lang("SAVE_START"));
setTimeout(function(){ gContentSaver.captureWindow(sbInvisibleBrowser.ELEMENT.contentWindow, false, false, sbFolderSelector2.resURI, 0, null, "combine"); }, 0);
},

Expand Down
60 changes: 30 additions & 30 deletions chrome/content/scrapbook/detail.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,25 @@ var sbCaptureOptions = {
}

// load from preference
document.getElementById("sbDetailOptionImages").checked = sbCommonUtils.getPref("capture.default.images", true);
document.getElementById("sbDetailOptionMedia").checked = sbCommonUtils.getPref("capture.default.media", true);
document.getElementById("sbDetailOptionFonts").checked = sbCommonUtils.getPref("capture.default.fonts", true);
document.getElementById("sbDetailOptionFrames").checked = sbCommonUtils.getPref("capture.default.frames", true);
document.getElementById("sbDetailOptionStyles").checked = sbCommonUtils.getPref("capture.default.styles", true);
document.getElementById("sbDetailOptionScript").checked = sbCommonUtils.getPref("capture.default.script", false);
document.getElementById("sbDetailOptionAsHtml").checked = sbCommonUtils.getPref("capture.default.fileAsHtml", false);
document.getElementById("sbDetailOptionSaveDataURI").checked = sbCommonUtils.getPref("capture.default.saveDataUri", false);
document.getElementById("sbDetailOptionTidyCss").value = sbCommonUtils.getPref("capture.default.tidyCss", 3);
document.getElementById("sbDetailDownLinkMethod").value = sbCommonUtils.getPref("capture.default.downLinkMethod", 0);
document.getElementById("sbDetailDownLinkFilter").value = sbCommonUtils.getPref("capture.default.downLinkFilter", "");
document.getElementById("sbDetailOptionImages").checked = sbCommonUtils.getPref("save.default.images", true);
document.getElementById("sbDetailOptionMedia").checked = sbCommonUtils.getPref("save.default.media", true);
document.getElementById("sbDetailOptionFonts").checked = sbCommonUtils.getPref("save.default.fonts", true);
document.getElementById("sbDetailOptionFrames").checked = sbCommonUtils.getPref("save.default.frames", true);
document.getElementById("sbDetailOptionStyles").checked = sbCommonUtils.getPref("save.default.styles", true);
document.getElementById("sbDetailOptionScript").checked = sbCommonUtils.getPref("save.default.script", false);
document.getElementById("sbDetailOptionAsHtml").checked = sbCommonUtils.getPref("save.default.fileAsHtml", false);
document.getElementById("sbDetailOptionSaveDataURI").checked = sbCommonUtils.getPref("save.default.saveDataUri", false);
document.getElementById("sbDetailOptionTidyCss").value = sbCommonUtils.getPref("save.default.tidyCss", 3);
document.getElementById("sbDetailDownLinkMethod").value = sbCommonUtils.getPref("save.default.downLinkMethod", 0);
document.getElementById("sbDetailDownLinkFilter").value = sbCommonUtils.getPref("save.default.downLinkFilter", "");
if ( this.param.context !== "capture-again-deep" ) {
document.getElementById("sbDetailInDepth").value = sbCommonUtils.getPref("capture.default.inDepthLevels", 0);
document.getElementById("sbDetailInDepth").value = sbCommonUtils.getPref("save.default.inDepthLevels", 0);
}

// init UI
this.updateScriptWarning();
if (this.param.item) {
document.documentElement.getButton("accept").label = sbCommonUtils.lang("CAPTURE_OK_BUTTON");
document.documentElement.getButton("accept").label = sbCommonUtils.lang("SAVE_OK_BUTTON");
this.fillTitleList();
if ( this.param.context == "capture-again" || this.param.context == "capture-again-deep" ) {
document.getElementById("sbDetailFolderRow").collapsed = true;
Expand Down Expand Up @@ -77,19 +77,19 @@ var sbCaptureOptions = {
}

// save to preference
sbCommonUtils.setPref("capture.default.images", this.param.option["images"]);
sbCommonUtils.setPref("capture.default.media", this.param.option["media"]);
sbCommonUtils.setPref("capture.default.fonts", this.param.option["fonts"]);
sbCommonUtils.setPref("capture.default.frames", this.param.option["frames"]);
sbCommonUtils.setPref("capture.default.styles", this.param.option["styles"]);
sbCommonUtils.setPref("capture.default.script", this.param.option["script"]);
sbCommonUtils.setPref("capture.default.fileAsHtml", this.param.option["fileAsHtml"]);
sbCommonUtils.setPref("capture.default.saveDataUri", this.param.option["saveDataUri"]);
sbCommonUtils.setPref("capture.default.tidyCss", this.param.option["tidyCss"]);
sbCommonUtils.setPref("capture.default.downLinkMethod", this.param.option["downLinkMethod"]);
sbCommonUtils.setPref("capture.default.downLinkFilter", this.param.option["downLinkFilter"]);
sbCommonUtils.setPref("save.default.images", this.param.option["images"]);
sbCommonUtils.setPref("save.default.media", this.param.option["media"]);
sbCommonUtils.setPref("save.default.fonts", this.param.option["fonts"]);
sbCommonUtils.setPref("save.default.frames", this.param.option["frames"]);
sbCommonUtils.setPref("save.default.styles", this.param.option["styles"]);
sbCommonUtils.setPref("save.default.script", this.param.option["script"]);
sbCommonUtils.setPref("save.default.fileAsHtml", this.param.option["fileAsHtml"]);
sbCommonUtils.setPref("save.default.saveDataUri", this.param.option["saveDataUri"]);
sbCommonUtils.setPref("save.default.tidyCss", this.param.option["tidyCss"]);
sbCommonUtils.setPref("save.default.downLinkMethod", this.param.option["downLinkMethod"]);
sbCommonUtils.setPref("save.default.downLinkFilter", this.param.option["downLinkFilter"]);
if ( this.param.context !== "capture-again-deep" ) {
sbCommonUtils.setPref("capture.default.inDepthLevels", this.param.option["inDepth"]);
sbCommonUtils.setPref("save.default.inDepthLevels", this.param.option["inDepth"]);
}

// check for regex error
Expand All @@ -101,13 +101,13 @@ var sbCaptureOptions = {
try {
new RegExp("^(?:" + line + ")$", "i");
} catch (ex) {
line = sbCommonUtils.lang("ERR_CAPTURE_DOWNLINKFILTER_LINE", index+1, srcLine);
line = sbCommonUtils.lang("ERR_SAVE_DOWNLINKFILTER_LINE", index+1, srcLine);
errors.push(line);
}
});
if (errors.length) {
var button = sbCommonUtils.PROMPT.STD_YES_NO_BUTTONS;
var text = sbCommonUtils.lang("ERR_CAPTURE_DOWNLINKFILTER", errors.join("\n\n"));
var text = sbCommonUtils.lang("ERR_SAVE_DOWNLINKFILTER", errors.join("\n\n"));
// yes => 0, no => 1, close => 1
return sbCommonUtils.PROMPT.confirmEx(null, "[ScrapBook]", text, button, null, null, null, null, {});
}
Expand Down Expand Up @@ -139,9 +139,9 @@ var sbCaptureOptions = {

resetDownLinkFilters: function() {
var _filter = document.getElementById("sbDetailDownLinkFilter").value;
sbCommonUtils.resetPref("capture.default.downLinkFilter");
document.getElementById("sbDetailDownLinkFilter").value = sbCommonUtils.getPref("capture.default.downLinkFilter", "");
sbCommonUtils.setPref("capture.default.downLinkFilter", _filter);
sbCommonUtils.resetPref("save.default.downLinkFilter");
document.getElementById("sbDetailDownLinkFilter").value = sbCommonUtils.getPref("save.default.downLinkFilter", "");
sbCommonUtils.setPref("save.default.downLinkFilter", _filter);
},

};
Expand Down
8 changes: 4 additions & 4 deletions chrome/content/scrapbook/detail.xul
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<!DOCTYPE dialog SYSTEM "chrome://scrapbook/locale/message.dtd">

<dialog id="sbDetailDialog"
title="ScrapBook - &sb.detail;"
title="ScrapBook - &sb.detail.title;"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
persist="screenX screenY width height"
onload="sbCaptureOptions.init();"
Expand Down Expand Up @@ -55,7 +55,7 @@
<groupbox group="capture-options">
<caption label="&sb.detail.option;" />
<hbox align="center">
<caption label="&sb.detail.option.capture;:" />
<caption label="&sb.detail.option.save;:" />
<checkbox id="sbDetailOptionImages" label="&sb.detail.option.images;" />
<checkbox id="sbDetailOptionMedia" label="&sb.detail.option.media;" />
<checkbox id="sbDetailOptionFonts" label="&sb.detail.option.fonts;" />
Expand All @@ -74,8 +74,8 @@
</menupopup>
</menulist>
</hbox>
<checkbox id="sbDetailOptionSaveDataURI" label="&sb.detail.option.saveDataUri;" />
<checkbox id="sbDetailOptionAsHtml" label="&sb.detail.option.fileAsHtml;" />
<checkbox id="sbDetailOptionSaveDataURI" label="&sb.detail.option.saveDataUri;" tooltiptext="&sb.detail.option.saveDataUri.help;" />
<checkbox id="sbDetailOptionAsHtml" label="&sb.detail.option.fileAsHtml;" tooltiptext="&sb.detail.option.fileAsHtml.help;" />
</groupbox>
<groupbox group="capture-options">
<caption label="&sb.detail.linked.file;" />
Expand Down
2 changes: 1 addition & 1 deletion chrome/content/scrapbook/multiple.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ var sbMultipleService = {

init: function() {
document.documentElement.buttons = "accept,cancel,extra2";
document.documentElement.getButton("accept").label = sbCommonUtils.lang("CAPTURE_OK_BUTTON");
document.documentElement.getButton("accept").label = sbCommonUtils.lang("SAVE_OK_BUTTON");
document.documentElement.getButton("accept").accesskey = "C";
this.TEXTBOX.focus();
sbFolderSelector2.init();
Expand Down
2 changes: 1 addition & 1 deletion chrome/content/scrapbook/multiple.xul
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
title="&sb.tools.multiple; - ScrapBook"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
style="width:400px;"
buttonlabelextra2="&sb.capture.alltabs;"
buttonlabelextra2="&sb.save.alltabs;"
onload="sbMultipleService.init();"
ondialogaccept="sbMultipleService.done();"
ondialogextra2="window.opener.top.sbMenuHandler.execCaptureAllTabs(sbFolderSelector2.resURI); window.close();"
Expand Down
10 changes: 5 additions & 5 deletions chrome/content/scrapbook/overlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ var sbBrowserOverlay = {
var keyMap = {
"key.sidebar": "key_openScrapBookSidebar",
"key.manage": "key_ScrapBookManage",
"key.capture": "key_ScrapBookCapture",
"key.captureAs": "key_ScrapBookCaptureAs",
"key.captureAllTabs": "key_ScrapBookSaveAllTabs",
"key.captureMultiple": "key_ScrapBookCaptureMultiple",
"key.save": "key_ScrapBookCapture",
"key.saveAs": "key_ScrapBookCaptureAs",
"key.saveAllTabs": "key_ScrapBookSaveAllTabs",
"key.saveMultiple": "key_ScrapBookCaptureMultiple",
"key.bookmark": "key_BookmarkWithScrapBook",
};
for (let [pref, id] in Iterator(keyMap)) {
Expand Down Expand Up @@ -175,7 +175,7 @@ var sbBrowserOverlay = {
var icon = sbDataSource.getProperty(res, "icon") || sbCommonUtils.getDefaultIcon(type);

var text = title;
var title = sbCommonUtils.lang("PAGE_CAPTURED", result.length);
var title = sbCommonUtils.lang("PAGE_SAVED", result.length);
var listener = {
observe: function(subject, topic, data) {
if (topic == "alertclickcallback")
Expand Down
Loading

0 comments on commit 917b460

Please sign in to comment.