1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

fix bld-languages.sh

This commit is contained in:
Mario Pietsch 2014-09-20 10:21:27 +02:00
parent 8610a9c064
commit 9c71756738
2 changed files with 31 additions and 9 deletions

View File

@ -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

3
core/modules/commands/setfield.js Executable file → Normal file
View File

@ -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));
});