From ce1db47f477234b09ce958e807efcb3b0dbd40a1 Mon Sep 17 00:00:00 2001 From: jon r Date: Fri, 29 Sep 2023 12:57:15 +0200 Subject: [PATCH] Repairing language menu --- app/base/tmpl/index.mustache | 9 +++++++-- app/lib/builder.js | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/base/tmpl/index.mustache b/app/base/tmpl/index.mustache index 5cff7e6..5348ed5 100644 --- a/app/base/tmpl/index.mustache +++ b/app/base/tmpl/index.mustache @@ -62,7 +62,12 @@ {{#langlinks}} | {{#lang_code}} - {{name}} + {{#default}} + {{name}} + {{/default}} + {{^default}} + {{name}} + {{/default}} {{/lang_code}} {{^lang_code}} {{name}} @@ -129,4 +134,4 @@ {{> partial_analytics}} - \ No newline at end of file + diff --git a/app/lib/builder.js b/app/lib/builder.js index 990926d..cd2280d 100644 --- a/app/lib/builder.js +++ b/app/lib/builder.js @@ -79,6 +79,7 @@ function build() { var obj = {name: 'english'}; if (lang_code != 'en') obj.lang_code = 'en'; + obj.default = true; result.push(obj); var obj = {name: 'française'}; if (lang_code != 'fr') @@ -99,7 +100,7 @@ function build() { geoinfo: JSON.stringify(geo_data), agencies: JSON.stringify(agencies), jstexts: JSON.stringify(lang_texts.js), - main_url: "http://apps.opendatacity.de/prism/" + (lang_texts.lang_code == 'de' ? '' : lang_texts.lang_code), + main_url: "https://opendatacity.github.io/prism/" + (lang_texts.lang_code == 'en' ? '' : 'index.' + lang_texts.lang_code + '.html'), screenshot: "http://opendatacity.de/traceprism.jpg" }; } @@ -124,4 +125,3 @@ function build() { } exports.build = build; -