Commit cc8682a1 authored by Dave Lane's avatar Dave Lane
Browse files

completed French bits of footer boilerplate

parent fb449977
......@@ -220,9 +220,13 @@ function setAppMeta(head) {
setMetaName(head, "snapshot-generation-time", getTimestamp());
}
function getGenerator() {
function getGenerator(lang='') {
var ts = getTimestamp();
var gen = '<a href="' + GENERATOR_URL + '" title="Created by ' + GENERATOR + ' version ' + VERSION + '">' + GENERATOR + '</a>, updated ' + ts;
var gen = '';
if (lang == 'fr_FR') {
gen = '<a href="' + GENERATOR_URL + '" title="Généré par ' + GENERATOR + ' version ' + VERSION + '">' + GENERATOR + '</a>, mise à jour ' + ts;
} else {
gen = '<a href="' + GENERATOR_URL + '" title="Created by ' + GENERATOR + ' version ' + VERSION + '">' + GENERATOR + '</a>, updated ' + ts;
return gen;
}
......@@ -240,17 +244,19 @@ function getNotices(outlineItem, iconsrc) {
disclaimer = ` ${divider} <a href="${opt['--disclaimer']}">${disclaimertext}</a>`;
}
var notices = `<div class="links"><a href="${terms}">${termstext}</a>${divider}<a href="${privacy}">${privacytext}</a>${divider}<a href="https://wikieducator.org${outlineItem.wkpage}?action=history">${authortext}</a>${disclaimer}</div>`;
var generator = getGenerator();
var generator = getGenerator(); // default option
var outline_link = opt.OUTLINE;
if (opt['--language'] && opt['--language'] == 'fr_FR') {
notices += `<div class="copyright"><a href="${contentURL}" title="original content in WikiEducator" target="WikiEducator">(FR translation) Content</a>`;
notices += ` (FR translation) available under the <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/" title="CC-BY-SA 4.0 International">Creative Commons Attribution-ShareAlike</a> license.`;
notices += ` <a href="https://creativecommons.org/licenses/by-sa/4.0/"><img class="cc" src="${iconsrc}" alt="Creative Commons Attribution-ShareAlike license"></a></div>`; notices += `<div class="generator">${generator} from this <a href="${outline_link}">Outline</a>.</div>`;
generator = getGenerator(opt['--language']); // special option
notices += `<div class="copyright"><a href="${contentURL}" title="original content in WikiEducator" target="WikiEducator">Œuvres</a>`;
notices += ` disponibles sous licence <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/" title="CC-BY-SA 4.0 Internationale">Creative Commons CC-BY-SA</a> (Attribution - Partage dans les mêmes conditions).`;
notices += ` <a href="https://creativecommons.org/licenses/by-sa/4.0/"><img class="cc" src="${iconsrc}" alt="Creative Commons CC-BY-SA (Attribution - Partage dans les mêmes conditions)"></a></div>`;
notices += `<div class="generator">${generator} à partir de cet <a href="${outline_link}">aperçu</a>.</div>`;
} else {
notices += `<div class="copyright"><a href="${contentURL}" title="original content in WikiEducator" target="WikiEducator">Content</a>`;
notices += ` available under the <a rel="license" href="https://creativecommons.org/licenses/by-sa/4.0/" title="CC-BY-SA 4.0 International">Creative Commons Attribution-ShareAlike</a> license.`;
notices += ` <a href="https://creativecommons.org/licenses/by-sa/4.0/"><img class="cc" src="${iconsrc}" alt="Creative Commons Attribution-ShareAlike license"></a></div>`;
notices += `<div class="generator">${generator} from this <a href="${outline_link}">Outline</a>.</div>`;
notices += `<div class="generator">${generator} from this <a href="${outline_link}">outline</a>.</div>`;
}
return notices;
}
......@@ -259,7 +265,8 @@ function getTimestamp() {
if (timestamp != "") {
var d = new Date();
// timestamp = d.toLocaleString(); // "8/12/2013 18.55.38"
timestamp = d.toUTCString(); // "Sun, 08 Dec 2013 17:55:38 GMT"
// strip the day off - first 5 characters
timestamp = d.toUTCString().slice(5); // "Sun, 08 Dec 2013 17:55:38 GMT"
}
return timestamp;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment