Commit 72a67820 authored by Philipp's avatar Philipp

Changed i18n plugin to grunt-gettext-static-build, converted and added new...

Changed i18n plugin to grunt-gettext-static-build, converted and added new translations for main.js, added pot file, adapted README.md
parent 4e2bd079
This diff is collapsed.
......@@ -198,18 +198,19 @@ Use grunt to create a usable weeWX skin inside the folder `dist/`:
I've introduced i18n features to the build process, so you can easily
translate and build localized versions.
Simply copy and rename `src/i18n/en.json` to match your iso 639-1 language code. e.g: `src/i18n/fr.json`, then edit and translate its contents.
Simply copy and rename `src/locales/en/messages.po` to match your iso 639-1 language code. e.g: `src/locales/fr/messages.po`, then edit and translate its contents.
Alternatively, you can use the included file `src/locales/rabenwetter.pot` with your favourite gettext editor (e.g: [PoEdit](https://poedit.net/))
There's also the humongous forecast file at `src/archive/current.en.json.tmpl`, you may want to translate. Even if you don't want to, you'll have to copy the english version to one matching your countrycode. e.g: `src/archive/current.fr.json.tmpl` or the build process will fail.
There's also the humongous forecast file at `src/locales/en/archive/current.json.tmpl`, you may want to translate. Even if you don't want to, you'll have to copy the english version to one matching your countrycode. e.g: `src/locales/fr/current.json.tmpl` or the build process will fail.
The first time, you're adding a new translation, you'll also have to update Gruntfile.js to build the new distribution files:
1. [line 60](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L60):
`locales: ['de', 'en', 'no'],`
1. [line 272](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L272):
`locales: ['de','en','no'],`
add your language code. e.g:
`locales: ['de', 'en', 'no', 'fr'],`
`locales: ['de','en','no','fr'],`
2. [line 81-86](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L81):
2. [line 59-64](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L59):
Copy the lines right below and replace occurences of `.de.` with your language code. e.g: `.fr.`:
```
'src/index.fr.min.html.tmpl': 'src/i18n/fr/index.html.tmpl',
......@@ -217,19 +218,21 @@ Copy the lines right below and replace occurences of `.de.` with your language c
'src/info.fr.min.html.tmpl': 'src/i18n/fr/info.html.tmpl',
'src/contact.fr.min.html.tmpl': 'src/i18n/fr/contact.html.tmpl',
'src/fullscreen1.fr.min.html.tmpl': 'src/i18n/fr/fullscreen1.html.tmpl',
'src/fullscreen2.fr.min.html.tmpl': 'src/i18n/fr/fullscreen2.html.tmpl',
'src/fullscreen2.fr.min.html.tmpl': 'src/i18n/fr/fullscreen2.html.tmpl'
```
3. [line 201-207](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L201):
3. [line 188-196](https://gitlab.ambhost.net/stimpy/template_rabenwetter/blob/master/Gruntfile.js#L188):
Copy the lines right below and replace occurences of `.en.` with your language code. e.g: `.fr.`:
```
{src: 'src/index.fr.min.html.tmpl', dest: 'dist/i18n/fr/index.html.tmpl'},
{src: 'src/archive.fr.min.html.tmpl', dest: 'dist/i18n/fr/archive.html.tmpl'},
{src: 'src/info.fr.min.html.tmpl', dest: 'dist/i18n/fr/info.html.tmpl'},
{src: 'src/contact.fr.min.html.tmpl', dest: 'dist/i18n/fr/contact.html.tmpl'},
{src: 'src/fullscreen1.fr.min.html.tmpl', dest: 'dist/i18n/fr/fullscreen1.html.tmpl'},
{src: 'src/fullscreen2.fr.min.html.tmpl', dest: 'dist/i18n/fr/fullscreen2.html.tmpl'},
{src: 'src/archive/current.fr.json.tmpl', dest: 'dist/i18n/fr/archive/current.json.tmpl'},
{src: 'src/index.fr.min.html.tmpl', dest: 'dist/i18n/fr/index.html.tmpl'},
{src: 'src/archive.fr.min.html.tmpl', dest: 'dist/i18n/fr/archive.html.tmpl'},
{src: 'src/info.fr.min.html.tmpl', dest: 'dist/i18n/fr/info.html.tmpl'},
{src: 'src/contact.fr.min.html.tmpl', dest: 'dist/i18n/fr/contact.html.tmpl'},
{src: 'src/fullscreen1.fr.min.html.tmpl', dest: 'dist/i18n/fr/fullscreen1.html.tmpl'},
{src: 'src/fullscreen2.fr.min.html.tmpl', dest: 'dist/i18n/fr/fullscreen2.html.tmpl'},
{src: 'src/assets/js/complete.fr.min.js', dest: 'dist/i18n/fr/assets/js/complete.min.js'},
{src: 'src/assets/js/incomplete.fr.min.js', dest: 'dist/i18n/fr/assets/js/incomplete.min.js'},
{src: 'src/locales/fr/current.json.tmpl', dest: 'dist/i18n/fr/archive/current.json.tmpl'},
```
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -4,4 +4,4 @@
#if $varExists('Extras.webcam1_img')
<div class="whitebg"><h3>RabenbergCam</h3><p><a href="index.html" class="imglink"><img src="$Extras.webcam1_img" id="we_campic3" class="img-responsive"></a></p></div>
#end if
<div class="whitebg cams"><h3>Weitere Stationen</h3><div class="whitebg"><h4>$Extras.extracam1_title</h4><p><a href="$Extras.extracam1_link" target="_blank" class="imglink"><img src="$Extras.extracam1_img" id="we_campic4" class="img-responsive"></a></p></div><div class="whitebg"><h4>$Extras.extracam2_title</h4><p><a href="$Extras.extracam2_link" target="_blank" class="imglink"><img src="$Extras.extracam2_img" id="we_campic5" class="img-responsive"></a></p></div><div class="whitebg"><h4>$Extras.extracam3_title</h4><p><a href="$Extras.extracam3_link" target="_blank" class="imglink"><img src="$Extras.extracam3_img" id="we_campic6" class="img-responsive"></a></p></div></div><div class="whitebg links"><h3>Links</h3><p><a href="http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IHESSENR2" target="_blank"><img alt="Weather Underground" src="assets/img/wunderground.gif"></a></p><p><a href="http://deutschland.maps.luftdaten.info/#11/50.4016/8.8717" target="_blank"><img alt="luftdaten.info" src="assets/img/luftdaten.jpg"></a></p><p><a href="http://www.earthcam.com/topten_archive.php?month=05&year=2012" target="_blank"><img alt="EarthCam" src="assets/img/earthcam.png"></a></p><p><a href="http://www.wetteronline.de/webcam/ranstadt" target="_blank"><img alt="Wetter Online" src="assets/img/wetteronline.png"></a></p><p><a href="https://www.lookr.com/de/lookout/1262229573-Ranstadt" target="_blank"><img alt="Lookr" src="assets/img/lookr.jpg"></a></p><p><a href="http://de.webcams.travel/webcam/1262229573" target="_blank"><img alt="webcams.travel" src="assets/img/wctravel.jpg"></a></p><p><a href="https://www.pwsweather.com/obs/RABENWTTR.html" target="_blank"><img alt="PWS" src="assets/img/pws.jpg"></a></p><p><a href="https://www.awekas.at/de/instrument.php?id=14471" target="_blank"><img alt="awekas" src="assets/img/awekas.jpg"></a></p><p><a href="https://opensensemap.org/explore/5abd54e0850005001b223316" target="_blank"><img alt="OpenSenseMap" src="assets/img/sensemap.jpg"></a></p><p><a href="https://wow.metoffice.gov.uk/observations/details/20180410y7uumj3hzwe6tkbnyyb96sp15e" target="_blank"><img alt="MetOffice" src="assets/img/metoffice.jpg"></a></p></div></div></div><footer class="footer"><div class="container">&copy; $current.dateTime.format("%Y") <a href="$Extras.site_link" target="_blank">$Extras.site_owner</a> (<a href="contact.html">Impressum</a>)<br>Powered by <a href="http://weewx.com/" target="_blank">weeWX</a> using <a href="https://rabenwetter.de" target="_blank">Rabenwetter Template</a></div></footer><script src="assets/js/incomplete.min.js"></script></body></html>
\ No newline at end of file
<div class="whitebg cams"><h3>Mehr Stationen</h3><div class="whitebg"><h4>$Extras.extracam1_title</h4><p><a href="$Extras.extracam1_link" target="_blank" class="imglink"><img src="$Extras.extracam1_img" id="we_campic4" class="img-responsive"></a></p></div><div class="whitebg"><h4>$Extras.extracam2_title</h4><p><a href="$Extras.extracam2_link" target="_blank" class="imglink"><img src="$Extras.extracam2_img" id="we_campic5" class="img-responsive"></a></p></div><div class="whitebg"><h4>$Extras.extracam3_title</h4><p><a href="$Extras.extracam3_link" target="_blank" class="imglink"><img src="$Extras.extracam3_img" id="we_campic6" class="img-responsive"></a></p></div></div><div class="whitebg links"><h3>Links</h3><p><a href="http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IHESSENR2" target="_blank"><img alt="Weather Underground" src="assets/img/wunderground.gif"></a></p><p><a href="http://deutschland.maps.luftdaten.info/#11/50.4016/8.8717" target="_blank"><img alt="luftdaten.info" src="assets/img/luftdaten.jpg"></a></p><p><a href="http://www.earthcam.com/topten_archive.php?month=05&year=2012" target="_blank"><img alt="EarthCam" src="assets/img/earthcam.png"></a></p><p><a href="http://www.wetteronline.de/webcam/ranstadt" target="_blank"><img alt="Wetter Online" src="assets/img/wetteronline.png"></a></p><p><a href="https://www.lookr.com/de/lookout/1262229573-Ranstadt" target="_blank"><img alt="Lookr" src="assets/img/lookr.jpg"></a></p><p><a href="http://de.webcams.travel/webcam/1262229573" target="_blank"><img alt="webcams.travel" src="assets/img/wctravel.jpg"></a></p><p><a href="https://www.pwsweather.com/obs/RABENWTTR.html" target="_blank"><img alt="PWS" src="assets/img/pws.jpg"></a></p><p><a href="https://www.awekas.at/de/instrument.php?id=14471" target="_blank"><img alt="awekas" src="assets/img/awekas.jpg"></a></p><p><a href="https://opensensemap.org/explore/5abd54e0850005001b223316" target="_blank"><img alt="OpenSenseMap" src="assets/img/sensemap.jpg"></a></p><p><a href="https://wow.metoffice.gov.uk/observations/details/20180410y7uumj3hzwe6tkbnyyb96sp15e" target="_blank"><img alt="MetOffice" src="assets/img/metoffice.jpg"></a></p></div></div></div><footer class="footer"><div class="container">&copy; $current.dateTime.format("%Y") <a href="$Extras.site_link" target="_blank">$Extras.site_owner</a> (<a href="contact.html">Impressum</a>)<br>Powered by <a href="http://weewx.com/" target="_blank">weeWX</a> using <a href="https://rabenwetter.de" target="_blank">Rabenwetter Template</a></div></footer><script src="assets/js/incomplete.min.js"></script></body></html>
\ No newline at end of file
This diff is collapsed.
......@@ -4,4 +4,4 @@
#if $varExists('Extras.webcam1_img')
<div class="whitebg"><h3>RabenbergCam</h3><p><a href="index.html" class="imglink"><img src="$Extras.webcam1_img" id="we_campic3" class="img-responsive"></a></p></div>
#end if
<div class="whitebg cams"><h3>Weitere Stationen</h3><div class="whitebg"><h4>$Extras.extracam1_title</h4><p><a href="$Extras.extracam1_link" target="_blank" class="imglink"><img src="$Extras.extracam1_img" id="we_campic4" class="img-responsive"></a></p></div><div class="whitebg"><h4>$Extras.extracam2_title</h4><p><a href="$Extras.extracam2_link" target="_blank" class="imglink"><img src="$Extras.extracam2_img" id="we_campic5" class="img-responsive"></a></p></div><div class="whitebg"><h4>$Extras.extracam3_title</h4><p><a href="$Extras.extracam3_link" target="_blank" class="imglink"><img src="$Extras.extracam3_img" id="we_campic6" class="img-responsive"></a></p></div></div><div class="whitebg links"><h3>Links</h3><p><a href="http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IHESSENR2" target="_blank"><img alt="Weather Underground" src="assets/img/wunderground.gif"></a></p><p><a href="http://deutschland.maps.luftdaten.info/#11/50.4016/8.8717" target="_blank"><img alt="luftdaten.info" src="assets/img/luftdaten.jpg"></a></p><p><a href="http://www.earthcam.com/topten_archive.php?month=05&year=2012" target="_blank"><img alt="EarthCam" src="assets/img/earthcam.png"></a></p><p><a href="http://www.wetteronline.de/webcam/ranstadt" target="_blank"><img alt="Wetter Online" src="assets/img/wetteronline.png"></a></p><p><a href="https://www.lookr.com/de/lookout/1262229573-Ranstadt" target="_blank"><img alt="Lookr" src="assets/img/lookr.jpg"></a></p><p><a href="http://de.webcams.travel/webcam/1262229573" target="_blank"><img alt="webcams.travel" src="assets/img/wctravel.jpg"></a></p><p><a href="https://www.pwsweather.com/obs/RABENWTTR.html" target="_blank"><img alt="PWS" src="assets/img/pws.jpg"></a></p><p><a href="https://www.awekas.at/de/instrument.php?id=14471" target="_blank"><img alt="awekas" src="assets/img/awekas.jpg"></a></p><p><a href="https://opensensemap.org/explore/5abd54e0850005001b223316" target="_blank"><img alt="OpenSenseMap" src="assets/img/sensemap.jpg"></a></p><p><a href="https://wow.metoffice.gov.uk/observations/details/20180410y7uumj3hzwe6tkbnyyb96sp15e" target="_blank"><img alt="MetOffice" src="assets/img/metoffice.jpg"></a></p></div></div></div><footer class="footer"><div class="container">&copy; $current.dateTime.format("%Y") <a href="$Extras.site_link" target="_blank">$Extras.site_owner</a> (<a href="contact.html">Impressum</a>)<br>Powered by <a href="http://weewx.com/" target="_blank">weeWX</a> using <a href="https://rabenwetter.de" target="_blank">Rabenwetter Template</a></div></footer><script src="assets/js/incomplete.min.js"></script></body></html>
\ No newline at end of file
<div class="whitebg cams"><h3>Mehr Stationen</h3><div class="whitebg"><h4>$Extras.extracam1_title</h4><p><a href="$Extras.extracam1_link" target="_blank" class="imglink"><img src="$Extras.extracam1_img" id="we_campic4" class="img-responsive"></a></p></div><div class="whitebg"><h4>$Extras.extracam2_title</h4><p><a href="$Extras.extracam2_link" target="_blank" class="imglink"><img src="$Extras.extracam2_img" id="we_campic5" class="img-responsive"></a></p></div><div class="whitebg"><h4>$Extras.extracam3_title</h4><p><a href="$Extras.extracam3_link" target="_blank" class="imglink"><img src="$Extras.extracam3_img" id="we_campic6" class="img-responsive"></a></p></div></div><div class="whitebg links"><h3>Links</h3><p><a href="http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IHESSENR2" target="_blank"><img alt="Weather Underground" src="assets/img/wunderground.gif"></a></p><p><a href="http://deutschland.maps.luftdaten.info/#11/50.4016/8.8717" target="_blank"><img alt="luftdaten.info" src="assets/img/luftdaten.jpg"></a></p><p><a href="http://www.earthcam.com/topten_archive.php?month=05&year=2012" target="_blank"><img alt="EarthCam" src="assets/img/earthcam.png"></a></p><p><a href="http://www.wetteronline.de/webcam/ranstadt" target="_blank"><img alt="Wetter Online" src="assets/img/wetteronline.png"></a></p><p><a href="https://www.lookr.com/de/lookout/1262229573-Ranstadt" target="_blank"><img alt="Lookr" src="assets/img/lookr.jpg"></a></p><p><a href="http://de.webcams.travel/webcam/1262229573" target="_blank"><img alt="webcams.travel" src="assets/img/wctravel.jpg"></a></p><p><a href="https://www.pwsweather.com/obs/RABENWTTR.html" target="_blank"><img alt="PWS" src="assets/img/pws.jpg"></a></p><p><a href="https://www.awekas.at/de/instrument.php?id=14471" target="_blank"><img alt="awekas" src="assets/img/awekas.jpg"></a></p><p><a href="https://opensensemap.org/explore/5abd54e0850005001b223316" target="_blank"><img alt="OpenSenseMap" src="assets/img/sensemap.jpg"></a></p><p><a href="https://wow.metoffice.gov.uk/observations/details/20180410y7uumj3hzwe6tkbnyyb96sp15e" target="_blank"><img alt="MetOffice" src="assets/img/metoffice.jpg"></a></p></div></div></div><footer class="footer"><div class="container">&copy; $current.dateTime.format("%Y") <a href="$Extras.site_link" target="_blank">$Extras.site_owner</a> (<a href="contact.html">Impressum</a>)<br>Powered by <a href="http://weewx.com/" target="_blank">weeWX</a> using <a href="https://rabenwetter.de" target="_blank">Rabenwetter Template</a></div></footer><script src="assets/js/incomplete.min.js"></script></body></html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
#errorCatcher Echo
#encoding UTF-8
<!DOCTYPE html><html lang="de-DE"><head><meta charset="utf-8"><meta content="IE=edge" http-equiv="X-UA-Compatible"><meta content="width=device-width,initial-scale=1" name="viewport"><title>$Extras.site_title</title><meta content="$Extras.site_description" name="description"><meta content="$Extras.site_owner" name="author"><meta content="$Extras.site_title" property="og:title"><meta content="website" property="og:type"><meta content="$station.station_url" property="og:url"><meta content="$Extras.webcam1_img" property="og:image"><meta content="$Extras.site_title" property="og:site_name"><meta content="$Extras.site_description" property="og:description"><meta content="$station.latitude[0].$station.latitude[1].replace('.', '')" property="og:latitude"><meta content="$station.longitude[0].$station.longitude[1].replace('.', '')" property="og:longitude"><meta content="$station.location" property="og:locality"><link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180"><link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"><link href="/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"><link href="/site.webmanifest" rel="manifest"><link href="/safari-pinned-tab.svg" rel="mask-icon" color="#f7931e"><meta content="#2b5797" name="msapplication-TileColor"><meta content="#00738c" name="theme-color"><link href="assets/css/complete.min.css" rel="stylesheet"><style>#camTabs li a:hover,#camTabs li.active a,#camTabs li.active a:hover,.we_current .whitebg h4,.whitebg h3,body.info .whitebg .whitebg h4{background:$Extras.theme_color_light}#camTabs li a{background:$Extras.theme_color_dark}</style></head><body class="current dx-viewport month$current.dateTime.format('%m')"><nav class="navbar navbar-fixed-top navbar-inverse"><div class="container"><div class="navbar-header"><button aria-controls="navbar" aria-expanded="false" class="collapsed navbar-toggle" data-target="#navbar" data-toggle="collapse" type="button"><span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span></button> <a href="index.html" class="navbar-brand">Rabenwetter</a></div><div class="collapse navbar-collapse navbar-right" id="navbar"><ul class="nav navbar-main navbar-nav"><li class="active"><a href="#">Aktuelt</a></li><li><a href="archive.html">Historikk</a></li><li><a href="info.html">Info</a></li><li><a href="contact.html">Kontakt</a></li></ul></div></div></nav><div class="container"><div class="col-md-9">
<!DOCTYPE html><html lang="de-DE"><head><meta charset="utf-8"><meta content="IE=edge" http-equiv="X-UA-Compatible"><meta content="width=device-width,initial-scale=1" name="viewport"><title>$Extras.site_title</title><meta content="$Extras.site_description" name="description"><meta content="$Extras.site_owner" name="author"><meta content="$Extras.site_title" property="og:title"><meta content="website" property="og:type"><meta content="$station.station_url" property="og:url"><meta content="$Extras.webcam1_img" property="og:image"><meta content="$Extras.site_title" property="og:site_name"><meta content="$Extras.site_description" property="og:description"><meta content="$station.latitude[0].$station.latitude[1].replace('.', '')" property="og:latitude"><meta content="$station.longitude[0].$station.longitude[1].replace('.', '')" property="og:longitude"><meta content="$station.location" property="og:locality"><link href="/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180"><link href="/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png"><link href="/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png"><link href="/site.webmanifest" rel="manifest"><link href="/safari-pinned-tab.svg" rel="mask-icon" color="#f7931e"><meta content="#2b5797" name="msapplication-TileColor"><meta content="#00738c" name="theme-color"><link href="assets/css/complete.min.css" rel="stylesheet"><style>#camTabs li a:hover,#camTabs li.active a,#camTabs li.active a:hover,.we_current .whitebg h4,.whitebg h3,body.info .whitebg .whitebg h4{background:$Extras.theme_color_light}#camTabs li a{background:$Extras.theme_color_dark}</style></head><body class="current dx-viewport month$current.dateTime.format('%m')"><nav class="navbar navbar-fixed-top navbar-inverse"><div class="container"><div class="navbar-header"><button aria-controls="navbar" aria-expanded="false" class="collapsed navbar-toggle" data-target="#navbar" data-toggle="collapse" type="button"><span class="sr-only">Skift navigasjon</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span></button> <a href="index.html" class="navbar-brand">$Extras.site_title</a></div><div class="collapse navbar-collapse navbar-right" id="navbar"><ul class="nav navbar-main navbar-nav"><li class="active"><a href="#">Aktuelt</a></li><li><a href="archive.html">Historikk</a></li><li><a href="info.html">Info</a></li><li><a href="contact.html">Kontakt</a></li></ul></div></div></nav><div class="container"><div class="col-md-9">
#if $varExists('Extras.webcam1_img')
<div class="whitebg"><ul class="nav nav-tabs" id="camTabs" role="tablist"><li class="active" role="presentation"><a href="#cam1" data-toggle="tab" aria-controls="home" role="tab">$Extras.webcam1_title</a></li>
#if $varExists('Extras.webcam2_img')
......@@ -19,7 +19,7 @@
#if $current.forecastRule.has_data
<div class="col-md-12"><div class="gauge_container"><h4>Værmelding</h4><p id="we_forecast">&nbsp;</p></div></div>
#end if
<div class="col-xs-6 col-md-3"><div class="gauge_container linear"><h4>Temperatur</h4><div><div id="gauge_temp"></div><div class="value_container"><span class="value" id="value_temp">$current.outTemp.formatted</span><span class="sup">$unit.label.outTemp</span></div><div class="temp_checkbox"><input type="checkbox" data-height="35" data-off="Außen" data-on="Innen" data-size="large" data-toggle="toggle" data-width="100" id="tempInOut"></div></div></div></div><div class="col-xs-6 col-md-3"><div class="gauge_container linear"><h4>Nedbør</h4><div><div id="gauge_rain"></div><div class="value_container"><span class="value" id="value_rain">$day.rain.sum.formatted</span><span class="sup">$unit.label.rain</span></div><div class="dummy_checkbox">&nbsp;</div></div></div></div><div class="col-md-6"><div class="gauge_container circular"><h4>Vindhastighet</h4><div><div id="gauge_wspeed"></div><div class="value_container"><span class="value" id="value_wspeed">$current.windSpeed.formatted</span><span class="sup">$unit.label.windSpeed</span></div></div></div></div><div class="col-md-6"><div class="gauge_container rose"><h4>Vindretning</h4><div><div id="gauge_wdir"></div><div class="value_container"><span class="value" id="value_wdir">$current.windDir.ordinal_compass</span></div></div></div></div><div class="col-md-6"><div class="gauge_container circular"><h4>Luftfuktighet</h4><div><div id="gauge_hum"></div><div class="value_container"><span class="value" id="value_hum">$current.outHumidity.formatted</span><span class="sup">$unit.label.outHumidity</span></div></div></div></div><div class="col-md-6"><div class="gauge_container circular"><h4>Lufttrykk</h4><div><div id="gauge_press"></div><div class="value_container"><span class="value" id="value_press">$current.barometer.formatted</span><span class="sup">$unit.label.barometer</span></div></div></div></div>
<div class="col-xs-6 col-md-3"><div class="gauge_container linear"><h4>Temperatur</h4><div><div id="gauge_temp"></div><div class="value_container"><span class="value" id="value_temp">$current.outTemp.formatted</span><span class="sup">$unit.label.outTemp</span></div><div class="temp_checkbox"><input type="checkbox" data-height="35" data-off="Ute" data-on="Inne" data-size="large" data-toggle="toggle" data-width="100" id="tempInOut"></div></div></div></div><div class="col-xs-6 col-md-3"><div class="gauge_container linear"><h4>Nedbør</h4><div><div id="gauge_rain"></div><div class="value_container"><span class="value" id="value_rain">$day.rain.sum.formatted</span><span class="sup">$unit.label.rain</span></div><div class="dummy_checkbox">&nbsp;</div></div></div></div><div class="col-md-6"><div class="gauge_container circular"><h4>Vindhastighet</h4><div><div id="gauge_wspeed"></div><div class="value_container"><span class="value" id="value_wspeed">$current.windSpeed.formatted</span><span class="sup">$unit.label.windSpeed</span></div></div></div></div><div class="col-md-6"><div class="gauge_container rose"><h4>Vindretning</h4><div><div id="gauge_wdir"></div><div class="value_container"><span class="value" id="value_wdir">$current.windDir.ordinal_compass</span></div></div></div></div><div class="col-md-6"><div class="gauge_container circular"><h4>Luftfuktighet</h4><div><div id="gauge_hum"></div><div class="value_container"><span class="value" id="value_hum">$current.outHumidity.formatted</span><span class="sup">$unit.label.outHumidity</span></div></div></div></div><div class="col-md-6"><div class="gauge_container circular"><h4>Pressure</h4><div><div id="gauge_press"></div><div class="value_container"><span class="value" id="value_press">$current.barometer.formatted</span><span class="sup">$unit.label.barometer</span></div></div></div></div>
#if $day.PM25.has_data
<div class="col-md-6"><div class="gauge_container circular"><h4>Fint Støv 2,5μm</h4><div><div id="gauge_pm25"></div><div class="value_container"><span class="value" id="value_pm25">$current.PM25.format("%.1f")</span><span class="sup">μg/m³</span></div></div></div></div><div class="col-md-6"><div class="gauge_container circular"><h4>Fint Støv 10μm</h4><div><div id="gauge_pm10"></div><div class="value_container"><span class="value" id="value_pm10">$current.PM10.format("%.1f")</span><span class="sup">μg/m³</span></div></div></div></div>
#end if
......
This diff is collapsed.
This diff is collapsed.
......@@ -10,7 +10,8 @@
],
"author": "stimpy",
"contributors": [],
"dependencies": {},
"dependencies": {
},
"devDependencies": {
"grunt": "^1.0.1",
"grunt-contrib-clean": "^1.0.0",
......@@ -20,7 +21,7 @@
"grunt-contrib-uglify": "^1.0.1",
"grunt-contrib-htmlmin": "^1.4.0",
"grunt-file-append": "^0.0.7",
"grunt-i18n-static": "^0.1.14",
"grunt-gettext-static-build": "^0.6.0",
"bower": "^1.8.0"
}
}
This diff is collapsed.
......@@ -133,7 +133,7 @@ var temp = 'out';
function updateGraphs(m, d) {
var append = '';
var month = new Array("01", "02", "03", "04", "05", "06","07", "08", "09", "10", "11", "12");
var monthwords = new Array("Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember");
var monthwords = new Array(tr("January"), tr("February"), tr("March"), tr("April"), tr("May"), tr("June"), tr("July"), tr("August"), tr("September"), tr("October"), tr("November"), tr("December"));
if ( isDstObserved(d) ) {
d = new Date(d.valueOf()+7200000);
} else {
......@@ -167,19 +167,19 @@ var temp = 'out';
$('#datetime').val( d.getUTCFullYear().toString() );
}
var series = [ { valueField: "windChill", name: "Wind Chill" },
{ valueField: "outTemp", name: "Außen" },
{ valueField: "inTemp", name: "Innen" } ];
var series = [ { valueField: "windChill", name: tr("Windchill") },
{ valueField: "outTemp", name: tr("Outside") },
{ valueField: "inTemp", name: tr("Inside") } ];
drawChart( 'chart_temp', msg, series, '°C');
series = [ { valueField: "outHumidity", name: "Luftfeuchte" } ];
series = [ { valueField: "outHumidity", name: tr("Humidity") } ];
drawChart( 'chart_hum', msg, series, '%');
series = [ { valueField: "pressure", name: "Luftdruck" } ];
series = [ { valueField: "pressure", name: tr("Air pressure") } ];
drawChart( 'chart_press', msg, series, 'hPa');
series = [ { valueField: "rain", name: "Niederschlag" } ];
series = [ { valueField: "rain", name: tr("Precipitation") } ];
drawChart( 'chart_rain', msg, series, 'mm');
series = [ { valueField: "windSpeed", name: "Windgeschwindigkeit" } ];
series = [ { valueField: "windSpeed", name: tr("Wind speed") } ];
drawChart( 'chart_wspeed', msg, series, 'km/h');
series = [ { valueField: "windDirection", name: "Windrichtung" } ];
series = [ { valueField: "windDirection", name: tr("Wind direction") } ];
drawChart( 'chart_wdir', msg, series, '°');
if ( typeof msg[0].PM25 !== 'undefined' ) {
series = [ { valueField: "PM25", name: "2,5μm" },
......@@ -499,10 +499,10 @@ var temp = 'out';
$('#tempInOut').change(function() {
if ( $(this).prop('checked') ) {
temp = 'in';
$('.we_current .current_temp h4 span').html('Innen');
$('.we_current .current_temp h4 span').html(tr("Inside"));
} else {
temp = 'out';
$('.we_current .current_temp h4 span').html('Außen');
$('.we_current .current_temp h4 span').html(tr("Outside"));
}
updateGauges();
updateCurrent();
......
......@@ -80,10 +80,10 @@
</div>
<div id="navbar" class="navbar-collapse collapse navbar-right">
<ul class="nav navbar-nav navbar-main">
<li><a href="index.html" data-t="amb.current">Current</a></li>
<li><a href="archive.html" data-t="amb.archive">Archive</a></li>
<li><a href="info.html" data-t="amb.info">Info</a></li>
<li class="active"><a href="#" data-t="amb.contact">Contact</a></li>
<li><a href="index.html">tr("Current")</a></li>
<li><a href="archive.html">tr("Archive")</a></li>
<li><a href="info.html">tr("Info")</a></li>
<li class="active"><a href="#">tr("Contact")</a></li>
</ul>
</div>
</div>
......@@ -228,7 +228,7 @@
#end if
<!-- htmlmin:ignore -->
<div class="whitebg cams">
<h3 data-t="amb.morestations">More stations</h3>
<h3>tr("More stations")</h3>
<div class="whitebg">
<h4>$Extras.extracam1_title</h4>
<p><a href="$Extras.extracam1_link" target="_blank" class="imglink"><img src="$Extras.extracam1_img" id="we_campic4" class="img-responsive"></a></p>
......@@ -243,7 +243,7 @@
</div>
</div>
<div class="whitebg links">
<h3 data-t="amb.links">Links</h3>
<h3>tr("Links")</h3>
<p>
<a href="http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IHESSENR2" target="_blank">
<img src="assets/img/wunderground.gif" alt="Weather Underground" />
......@@ -299,7 +299,7 @@
</div>
<footer class="footer">
<div class="container">
&copy; $current.dateTime.format("%Y") <a href="$Extras.site_link" target="_blank">$Extras.site_owner</a> (<a href="contact.html" data-t="amb.imprint">Imprint</a>)<br />
&copy; $current.dateTime.format("%Y") <a href="$Extras.site_link" target="_blank">$Extras.site_owner</a> (<a href="contact.html">tr("Imprint")</a>)<br />
<!-- Please always leave this single line intact: -->
Powered by <a href="http://weewx.com/" target="_blank">weeWX</a> using <a href="https://rabenwetter.de" target="_blank">Rabenwetter Template</a>
</div>
......
{
"amb": {
"current": "Aktuell",
"archive": "Archiv",
"info": "Info",
"contact": "Kontakt",
"jsalert": "Du musst Javascript zulassen um die Live-Instrumente zu sehen. (z.B. das NoScript Addon Deines Browsers abschalten.)",
"news": "News",
"weather": "Wetter",
"forecast": "Vorhersage",
"temperature": "Temperatur",
"precipitation": "Niederschlag",
"windspeed": "Windgeschwindigkeit",
"winddirection": "Windrichtung",
"humidity": "Luftfeuchte",
"pressure": "Luftdruck",
"finedust": "Feinstaub",
"finedust25": "Feinstaub 2,5μm",
"finedust10": "Feinstaub 10μm",
"inside": "Innen",
"outside": "Außen",
"trend": "Trend",
"barometer": "Barometer",
"windspd": "Windgeschw.",
"winddir": "Windrichtung",
"rain": "Regen",
"dust25": "Staub 2,5μm",
"dust10": "Staub 10μm",
"rainradar": "Regenradar",
"source": "Quelle",
"timelapse24": "Zeitraffer 24h",
"timelapse365": "Zeitraffer 365d",
"sun": "Sonne",
"moon": "Mond",
"day": "Tag",
"week": "Woche",
"month": "Monat",
"year": "Jahr",
"temperatureoutside": "Temperatur <span>Außen</span>",
"chooseperiod": "Periode wählen...",
"morestations": "Weitere Stationen",
"links": "Links",
"imprint": "Impressum"
}
}
\ No newline at end of file
{
"amb": {
"current": "Current",
"archive": "Archive",
"info": "Info",
"contact": "Contact",
"jsalert": "You need javascript to see the live instruments. (e.g. disable NoScript addon.)",
"news": "News",
"weather": "Weather",
"forecast": "Forecast",
"temperature": "Temperature",
"precipitation": "Precipitation",
"windspeed": "Wind speed",
"winddirection": "Wind direction",
"humidity": "Humidity",
"pressure": "Air pressure",
"finedust": "Fine dust",
"finedust25": "Fine dust 2,5μm",
"finedust10": "Fine dust 10μm",
"inside": "inside",
"outside": "outside",
"trend": "Trend",
"barometer": "Barometer",
"windspd": "Wind spd.",
"winddir": "Wind dir.",
"rain": "Rain",
"dust25": "Dust 2,5μm",
"dust10": "Dust 10μm",
"rainradar": "Rain radar",
"source": "Source",
"timelapse24": "Timelapse 24h",
"timelapse365": "Timelapse 365d",
"sun": "Sun",
"moon": "Moon",
"day": "Day",
"week": "Week",
"month": "Month",
"year": "Year",
"temperatureoutside": "Temperature <span>Outside</span>",
"chooseperiod": "Choose period...",
"morestations": "More stations",
"links": "Links",
"imprint": "Imprint"
}
}
\ No newline at end of file
{
"amb": {
"current": "Courant",
"archive": "Archive",
"info": "Info",
"contact": "Contact",
"jsalert": "Il faut javascript pour voir les compteurs live. (ex: desactivation NoScript addon.)",
"news": "Actualite",
"weather": "Meteo",
"forecast": "Prevision",
"temperature": "Temperature",
"precipitation": "Precipitation",
"windspeed": "Vitesse vent",
"winddirection": "Direction vent",
"humidity": "Humidite",
"pressure": "Pression atmospherique",
"finedust": "Poussieres fines",
"finedust25": "Poussieres fines 2,5μm",
"finedust10": "Poussieres fines 10μm",
"inside": "interieur",
"outside": "exterieur",
"trend": "Tendance",
"barometer": "Barometre",
"windspd": "Vent vit.",
"winddir": "Vent dir.",
"rain": "Pluie",
"dust25": "Poussiere 2,5μm",
"dust10": "Poussiere 10μm",
"rainradar": "Radar pluie",
"source": "Source",
"timelapse24": "Timelapse 24h",
"timelapse365": "Timelapse 365d",
"sun": "Soleil",
"moon": "Lune",
"day": "Jour",
"week": "Semaine",
"month": "Mois",
"year": "Annee",
"temperatureoutside": "Temperature <span>Exterieure</span>",
"chooseperiod": "Choisir la periode...",
"morestations": "Autres stations",
"links": "Liens",
"imprint": "Imprint"
}
}
\ No newline at end of file
{
"amb": {
"current": "Aktuelt",
"archive": "Historikk",
"info": "Info",
"contact": "Kontakt",
"jsalert": "Du trenger javascript for å se live-instrumentene. (for eksempel deaktiver NoScript addon.)",
"news": "Nytt",
"weather": "Vær",
"forecast": "Værmelding",
"temperature": "Temperatur",
"precipitation": "Nedbør",
"windspeed": "Vindhastighet",
"winddirection": "Vindretning",
"humidity": "Luftfuktighet",
"pressure": "Lufttrykk",
"finedust": "Fint Støv",
"finedust25": "Fint Støv 2,5μm",
"finedust10": "Fint Støv 10μm",
"inside": "Inne",
"outside": "Ute",
"trend": "Trend",
"barometer": "Barometer",
"windspd": "Vindhast.",
"winddir": "Vindret.",
"rain": "Regn",
"dust25": "Støv 2,5μm",
"dust10": "Støv 10μm",
"rainradar": "Regn radar",
"source": "Kilde",
"timelapse24": "Timelapse 24h",
"timelapse365": "Timelapse 365d",
"sun": "Sol",
"moon": "Måne",
"day": "Dag",
"week": "Uke",
"month": "Måned",
"year": "År",
"temperatureoutside": "Temperatur <span>Ute</span>",
"chooseperiod": "Velg periode...",
"morestations": "Mer stasjoner",
"links": "Links",
"imprint": "Avtrykk"
}
}
\ No newline at end of file
This diff is collapsed.
......@@ -80,10 +80,10 @@
</div>
<div id="navbar" class="navbar-collapse collapse navbar-right">
<ul class="nav navbar-nav navbar-main">
<li><a href="index.html" data-t="amb.current">Current</a></li>
<li><a href="archive.html" data-t="amb.archive">Archive</a></li>
<li class="active"><a href="#" data-t="amb.info">Info</a></li>
<li><a href="contact.html" data-t="amb.contact">Contact</a></li>
<li><a href="index.html">tr("Current")</a></li>
<li><a href="archive.html">tr("Archive")</a></li>
<li class="active"><a href="#">tr("Info")</a></li>
<li><a href="contact.html">tr("Contact")</a></li>
</ul>
</div>
</div>
......@@ -159,7 +159,7 @@
#end if
<!-- htmlmin:ignore -->
<div class="whitebg cams">
<h3 data-t="amb.morestations">More stations</h3>
<h3>tr("More stations")</h3>
<div class="whitebg">
<h4>$Extras.extracam1_title</h4>
<p><a href="$Extras.extracam1_link" target="_blank" class="imglink"><img src="$Extras.extracam1_img" id="we_campic4" class="img-responsive"></a></p>
......@@ -174,7 +174,7 @@
</div>
</div>
<div class="whitebg links">
<h3 data-t="amb.links">Links</h3>
<h3>tr("Links")</h3>
<p>
<a href="http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=IHESSENR2" target="_blank">
<img src="assets/img/wunderground.gif" alt="Weather Underground" />
......@@ -230,7 +230,7 @@
</div>
<footer class="footer">
<div class="container">
&copy; $current.dateTime.format("%Y") <a href="$Extras.site_link" target="_blank">$Extras.site_owner</a> (<a href="contact.html" data-t="amb.imprint">Imprint</a>)<br />
&copy; $current.dateTime.format("%Y") <a href="$Extras.site_link" target="_blank">$Extras.site_owner</a> (<a href="contact.html">tr("Imprint")</a>)<br />
<!-- Please always leave this single line intact: -->
Powered by <a href="http://weewx.com/" target="_blank">weeWX</a> using <a href="https://rabenwetter.de" target="_blank">Rabenwetter Template</a>
</div>
......
This diff is collapsed.
# Rabenwetter Template gettext template
# Copyright (C) 2109 Philipp Giebel
# This file is distributed under the same license as the template_rabenwetter package.
# Philipp Giebel <info@rabenwetter.de>, 2018.
#
msgid ""
msgstr ""
"Project-Id-Version: template_rabenwetter 1.0.0\n"
"Report-Msgid-Bugs-To: info@rabenwetter.de\n"
"POT-Creation-Date: 2019-01-11 14:35+0100\n"
"PO-Revision-Date: 2019-01-11 14:53+0100\n"
"Language-Team: Germany\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2\n"
"Last-Translator: Philipp Giebel\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: de\n"
msgid "Current"
msgstr "Aktuell"
msgid "Archive"
msgstr "Archiv"
msgid "Info"
msgstr "Info"
msgid "Contact"
msgstr "Kontakt"
msgid ""
"You need javascript to see the live instruments. (e.g. disable NoScript "
"addon.)"
msgstr ""
"Sie benötigen JavaScript, um die Live-Instrumente zu sehen. (z.B. "
"NoScript-Addon deaktivieren)"
msgid "Choose period"
msgstr "Zeitraum wählen"
msgid "Day"
msgstr "Tag"
msgid "Week"
msgstr "Woche"
msgid "Month"
msgstr "Monat"
msgid "Year"
msgstr "Jahr"
msgid "Temperature"
msgstr "Temperatur"
msgid "Humidity"
msgstr "Luftfeuchte"
msgid "Air pressure"
msgstr "Luftdruck"
msgid "Precipitation"
msgstr "Niederschlag"
msgid "Wind speed"
msgstr "Windgeschwindigkeit"
msgid "Wind direction"
msgstr "Windrichtung"
msgid "Windchill"
msgstr "Gefühlt"
msgid "Fine dust"
msgstr "Feinstaub"
msgid "Outside"
msgstr "Außen"
msgid "Inside"
msgstr "Innen"
msgid "Trend"
msgstr "Trend"
msgid "Barometer"
msgstr "Barometer"
msgid "Wind spd."
msgstr "Windgeschw."
msgid "Wind dir."
msgstr "Windrichtung"
msgid "Rain"
msgstr "Regen"
msgid "Dust 2.5µm"
msgstr "Staub 2,5µm"
msgid "Dust 10µm"
msgstr "Staub 10µm"
msgid "Source"
msgstr "Quelle"
msgid "Rain radar"
msgstr "Regenradar"
msgid "Timelapse 24h"
msgstr "Zeitraffer 24h"
msgid "Timelapse 365d"
msgstr "Zeitraffer 365d"
msgid "Sun"
msgstr "Sonne"
msgid "Moon"
msgstr "Mond"
msgid "Imprint"
msgstr "Impressum"
msgid "More stations"
msgstr "Mehr Stationen"
msgid "Links"
msgstr "Links"
msgid "Toggle navigation"
msgstr "Navigation wechseln"
msgid "News"
msgstr "News"
msgid "Weather"
msgstr "Wetter"
msgid "Forecast"
msgstr "Vorhersage"
msgid "Fine dust 2,5μm"
msgstr "Feinstaub 2,5µm"
msgid "Fine dust 10μm"
msgstr "Feinstaub 10µm"
msgid "January"
msgstr "Januar"
msgid "February"
msgstr "Februar"
msgid "March"
msgstr "März"
msgid "April"
msgstr "April"
msgid "May"
msgstr "Mai"
msgid "June"
msgstr "Juni"
msgid "July"
msgstr "Juli"
msgid "August"
msgstr "August"
msgid "September"
msgstr "September"
msgid "October"
msgstr "Oktober"
msgid "November"
msgstr "November"
msgid "December"
msgstr "Dezember"
This diff is collapsed.