diff --git a/Gemfile.lock b/Gemfile.lock index 382397f9..b04a0f10 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - jekyll-theme-conference (2.3.1) + jekyll-theme-conference (2.4.0) jekyll (~> 4.0) GEM diff --git a/_data/lang.yml b/_data/lang.yml index 9ca38305..f49bd870 100644 --- a/_data/lang.yml +++ b/_data/lang.yml @@ -1,4 +1,4 @@ -version: 1 +version: 2 en: pronoun: @@ -12,6 +12,8 @@ en: directions: Directions talks: Talks in this room no_talks: no talks planned + focus_conf: Center map on conference location + focus_me: Show my current location program: title: Program legend: Caption @@ -34,6 +36,8 @@ de: directions: Anfahrt talks: Vorträge in diesem Raum no_talks: keine Vorträge geplant + focus_conf: Karte auf den Konferenz-Ort zentrieren + focus_me: Meinen aktuellen Standort anzeigen program: title: Programm legend: Legende @@ -56,6 +60,8 @@ fr: directions: Indications talks: Présentations dans cette salle no_talks: pas des présentations prévues + focus_conf: Centrer la carte sur le lieu de la conférence + focus_me: Afficher ma localisation actuelle program: title: Programme legend: Légende @@ -78,6 +84,8 @@ pt: directions: Indicações talks: Apresentações nesta sala no_talks: não estão previstas apresentações + focus_conf: Centralizar o mapa para o local da conferência + focus_me: Mostrar minha localização atual program: title: Programa legend: Legenda diff --git a/_includes/js/conference-map.js b/_includes/js/conference-map.js index 39ce9b5e..6cccc8c7 100644 --- a/_includes/js/conference-map.js +++ b/_includes/js/conference-map.js @@ -12,8 +12,13 @@ var map; L.easyButton('far fa-star', function(){ map.setView(home_coord, default_zoom); - }).addTo(map); + }, '{{ site.data.lang[site.conference.lang].location.focus_conf | default: "Center map on conference location" }}').addTo(map); - L.control.locate().addTo(map); + L.control.locate({ + flyTo: true, + strings: { + title: '{{ site.data.lang[site.conference.lang].location.focus_me | default: "Show me where I am" }}' + } + }).addTo(map); } })(); diff --git a/_includes/partials/checks.html b/_includes/partials/checks.html index f135f8fb..3a7994a3 100644 --- a/_includes/partials/checks.html +++ b/_includes/partials/checks.html @@ -4,7 +4,7 @@ {% unless site.conference.lang == "en" %} {% assign errors = errors | push : "The internationalization file containing different strings for this template seems to be missing. Have you copied the `_data/lang.yml` file from the [theme's repository](https://github.com/DigitaleGesellschaft/jekyll-theme-conference/blob/master/_data/lang.yml) to you local website folder?" %} {% endunless %} -{% elsif site.data.lang.version < 1 %} +{% elsif site.data.lang.version < 2 %} {% assign errors = errors | push : "The internationalization file in `_data/lang.yml` seems to be outdated and does not correspond to the current version of the theme. Grab the current version from the [theme's repository](https://github.com/DigitaleGesellschaft/jekyll-theme-conference/blob/master/_data/lang.yml)." %} {% endunless %} {% unless site.conference.lang == "en" or site.conference.lang == "de" or site.conference.lang == "fr" or site.conference.lang == "pt" %} diff --git a/jekyll-theme-conference.gemspec b/jekyll-theme-conference.gemspec index 8f6bd7db..73f2eb32 100644 --- a/jekyll-theme-conference.gemspec +++ b/jekyll-theme-conference.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "jekyll-theme-conference" - spec.version = "2.3.1" + spec.version = "2.4.0" spec.authors = ["Lorenz Schmid"] spec.email = ["lorenzschmid@users.noreply.github.com"]