Skip to content
Snippets Groups Projects
Commit ec972309 authored by Frank Steinberg's avatar Frank Steinberg
Browse files

Fixes.

parent c3c98226
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ check: bjcp-2015-styleguide-orig.xml bjcp-2015-styleguide-de.xml
install: bjcp-2015-styleguide-de-edit.html
ssh z "if [ ! -d /var/www/bjcp-styleguide ] ; then sudo mkdir /var/www/bjcp-styleguide ; sudo chown frank.www-data /var/www/bjcp-styleguide ; sudo chmod u+rwx,g+rwxs /var/www/bjcp-styleguide ; touch /var/www/bjcp-styleguide/logfile ; mkdir /var/www/bjcp-styleguide/snippets; fi"
scp bjcp-2015-styleguide-de-edit.html web/bjcp-styleguide.css web/edit.css web/edit.js web/pell.css web/pell.js web/save.cgi z:/var/www/bjcp-styleguide/
ssh z "cd /var/www/bjcp-styleguide ; rm -rf bjcp-2015-styleguide ; git clone https://github.com/frsteinb/bjcp-2015-styleguide.git ; cd bjcp-2015-styleguide ; make"
ssh z "cd /var/www/bjcp-styleguide ; rm -rf bjcp-2015-styleguide ; git clone https://github.com/frsteinb/bjcp-2015-styleguide.git ; cd bjcp-2015-styleguide ; make bjcp-2015-styleguide-orig.xml"
clean:
@rm -rf orig
......
......@@ -120,6 +120,7 @@ function dosave() {
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
editor.style.display = "none";
editelem.innerHTML = x;
}
}
......
......@@ -11,8 +11,8 @@ import datetime
DIR = "/var/www/bjcp-styleguide"
LOGFILE = "%s/logfile" % DIR
SNIPPETDIR = "/var/www/bjcp-styleguide/snippets"
REPODIR = "/var/www/bjcp-styleguide/bjcp-2015-styleguide"
SNIPPETDIR = "%s/snippets" % DIR
REPODIR = "%s/bjcp-2015-styleguide" % DIR
LANG = "de"
......@@ -111,13 +111,17 @@ origfilename = "%s/orig/%s.xml" % (REPODIR, id)
translatedfilename = "%s/%s/%s.xml" % (REPODIR, LANG, id)
if os.path.isfile(translatedfilename):
log("creating new translation file %s/%s.xml from orig/%s.xml and snippet" % (LANG, id, id))
log("updating translation file %s/%s.xml based on snippet" % (LANG, id))
cmd = "xsltproc --stringparam snippet %s %s/xsl/bjcp-2015-styleguide-merge.xsl %s > %s.tmp ; mv %s.tmp %s" % (snippetfilename, REPODIR, translatedfilename, translatedfilename, translatedfilename, translatedfilename)
os.system(cmd)
if os.path.isfile(origfilename):
log("updating translation file %s/%s.xml based on snippet" % (LANG, id))
cmd = "make -C %s && cp %s/bjcp-2015-styleguide-de-edit.html %s/bjcp-2015-styleguide-de-edit.html" % (REPODIR, REPODIR, DIR)
os.system(cmd)
elif os.path.isfile(origfilename):
log("creating new translation file %s/%s.xml from orig/%s.xml and snippet" % (LANG, id, id))
cmd = "xsltproc --stringparam snippet %s %s/xsl/bjcp-2015-styleguide-merge.xsl %s > %s" % (snippetfilename, REPODIR, origfilename, translatedfilename)
os.system(cmd)
cmd = "make -C %s && cp %s/bjcp-2015-styleguide-de-edit.html %s/bjcp-2015-styleguide-de-edit.html" % (REPODIR, REPODIR, DIR)
os.system(cmd)
else:
log("neither orig file %s nor translated file %s for id %s exists" % (origfilename, translatedfilename, id))
......
......@@ -109,7 +109,7 @@
<!-- suppress these tags in translations -->
<xsl:template match="tags|specs">
<xsl:template match="bjcp:tags|bjcp:specs">
</xsl:template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment