From 9c717567389c3141ce69cf41d771d9ff06a5ca95 Mon Sep 17 00:00:00 2001 From: Mario Pietsch Date: Sat, 20 Sep 2014 10:21:27 +0200 Subject: [PATCH] fix bld-languages.sh --- bin/bld-languages.sh | 37 +++++++++++++++++++++++++------ core/modules/commands/setfield.js | 3 +-- 2 files changed, 31 insertions(+), 9 deletions(-) mode change 100755 => 100644 core/modules/commands/setfield.js diff --git a/bin/bld-languages.sh b/bin/bld-languages.sh index 606980f4c..19561c08e 100755 --- a/bin/bld-languages.sh +++ b/bin/bld-languages.sh @@ -15,13 +15,6 @@ fi echo "Using TW5_BUILD_OUTPUT as [$TW5_BUILD_OUTPUT]" -# Make the CNAME file that GitHub Pages requires - -echo "tiddlywiki.com" > $TW5_BUILD_OUTPUT/CNAME - -# The tw5.com wiki -# index.html: the main file, including content - # /languages/de-AT/index.html Demo wiki with de-AT language # /languages/de-AT/empty.html Empty wiki with de-AT language node ./tiddlywiki.js \ @@ -40,3 +33,33 @@ node ./tiddlywiki.js \ --build favicon empty static index \ || exit 1 +# /languages/fr-FR/index.html Demo wiki with fr-FR language +# /languages/fr-FR/empty.html Empty wiki with fr-FR language +node ./tiddlywiki.js \ + ./editions/fr-FR \ + --verbose \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all languages/fr-FR/index.html text/plain \ + --rendertiddler $:/core/save/empty languages/fr-FR/empty.html text/plain \ + || exit 1 + +# /languages/zh-Hans/index.html Demo wiki with zh-Hans language +# /languages/zh-Hans/empty.html Empty wiki with zh-Hans language +node ./tiddlywiki.js \ + ./editions/zh-Hans \ + --verbose \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all languages/zh-Hans/index.html text/plain \ + --rendertiddler $:/core/save/empty languages/zh-Hans/empty.html text/plain \ + || exit 1 + +# /languages/zh-Hant/index.html Demo wiki with zh-Hant language +# /languages/zh-Hant/empty.html Empty wiki with zh-Hant language +node ./tiddlywiki.js \ + ./editions/zh-Hant \ + --verbose \ + --output $TW5_BUILD_OUTPUT \ + --rendertiddler $:/core/save/all languages/zh-Hant/index.html text/plain \ + --rendertiddler $:/core/save/empty languages/zh-Hant/empty.html text/plain \ + || exit 1 + diff --git a/core/modules/commands/setfield.js b/core/modules/commands/setfield.js old mode 100755 new mode 100644 index 928b7847b..3f8ec1d14 --- a/core/modules/commands/setfield.js +++ b/core/modules/commands/setfield.js @@ -35,7 +35,6 @@ Command.prototype.execute = function() { fieldname = this.params[1] || "text", templatetitle = this.params[2], rendertype = this.params[3] || "text/plain", - rawtext= this.params[4] || "", tiddlers = wiki.filterTiddlers(filter); $tw.utils.each(tiddlers,function(title) { var parser = wiki.parseTiddler(templatetitle), @@ -47,7 +46,7 @@ Command.prototype.execute = function() { widgetNode.render(container,null); newFields[fieldname] = rendertype === "text/html" ? container.innerHTML : container.textContent; } else { - newFields[fieldname] = rawtext ? rawtext : undefined; + newFields[fieldname] = undefined; } wiki.addTiddler(new $tw.Tiddler(tiddler,newFields)); });