Browse Source

Include Swedish moment strings if necessary.

185-sv-lang
Matthew Somerville 6 years ago
parent
commit
52c44608e7
  1. 26
      www/index.html
  2. 4
      www/jslib/moment-2.0.0.sv.min.js

26
www/index.html

@ -5,6 +5,13 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta charset="utf-8">
<script type="text/javascript">
function add_script(s) {
var script = document.createElement("script");
script.src = s;
$('head').prepend(script);
}
</script>
<script type="text/javascript" src="jslib/jquery-1.9.1.min.js"></script>
<!--<link rel="stylesheet" href="css/jquery.mobile-1.3.1.min.css">-->
<script type="text/javascript">
@ -35,6 +42,12 @@
<script type="text/javascript" src="js/mobile_config.js"></script>
<script type="text/javascript" src="jslib/jquery.mobile-1.3.1.min.js"></script>
<script type="text/javascript" src="jslib/moment-2.0.0.min.js"></script>
<script type="text/javascript">
if (CONFIG && CONFIG.LANGUAGE == 'sv') {
add_script('jslib/moment-2.0.0.sv.min.js');
}
</script>
<script type="text/javascript" src="cordova.js"></script>
<script type="text/javascript" src="jslib/lodash.min.js"></script>
@ -48,18 +61,13 @@
<script type="text/javascript" src="js/map-OpenLayers.js"></script>
<script type="text/javascript">
function add_script(s) {
var script = document.createElement("script");
script.src = "js/" + s;
$('head').prepend(script);
}
if (CONFIG && CONFIG.MAP_TYPE == 'FMS') {
add_script("map-bing-ol.js");
add_script("map-fms.js");
add_script("js/map-bing-ol.js");
add_script("js/map-fms.js");
} else if (CONFIG && CONFIG.MAP_TYPE == 'Bing') {
add_script("map-bing-ol.js");
add_script("js/map-bing-ol.js");
} else {
add_script("map-OpenStreetMap.js");
add_script("js/map-OpenStreetMap.js");
}
</script>

4
www/jslib/moment-2.0.0.sv.min.js

@ -0,0 +1,4 @@
// moment.js language configuration
// language : swedish (sv)
// author : Jens Alm : https://github.com/ulmus
(function(){function e(e){e.lang("sv",{months:"januari_februari_mars_april_maj_juni_juli_augusti_september_oktober_november_december".split("_"),monthsShort:"jan_feb_mar_apr_maj_jun_jul_aug_sep_okt_nov_dec".split("_"),weekdays:"s\u00f6ndag_m\u00e5ndag_tisdag_onsdag_torsdag_fredag_l\u00f6rdag".split("_"),weekdaysShort:"s\u00f6n_m\u00e5n_tis_ons_tor_fre_l\u00f6r".split("_"),weekdaysMin:"s\u00f6_m\u00e5_ti_on_to_fr_l\u00f6".split("_"),longDateFormat:{LT:"HH:mm",L:"YYYY-MM-DD",LL:"D MMMM YYYY",LLL:"D MMMM YYYY LT",LLLL:"dddd D MMMM YYYY LT"},calendar:{sameDay:"[Idag klockan] LT",nextDay:"[Imorgon klockan] LT",lastDay:"[Ig\u00e5r klockan] LT",nextWeek:"dddd [klockan] LT",lastWeek:"[F\u00f6rra] dddd[en klockan] LT",sameElse:"L"},relativeTime:{future:"om %s",past:"f\u00f6r %s sedan",s:"n\u00e5gra sekunder",m:"en minut",mm:"%d minuter",h:"en timme",hh:"%d timmar",d:"en dag",dd:"%d dagar",M:"en m\u00e5nad",MM:"%d m\u00e5nader",y:"ett \u00e5r",yy:"%d \u00e5r"},ordinal:function(e){var t=e%10,n=~~(e%100/10)===1?"e":t===1?"a":t===2?"a":t===3?"e":"e";return e+n},week:{dow:1,doy:4}})}typeof define=="function"&&define.amd&&define(["moment"],e),typeof window!="undefined"&&window.moment&&e(window.moment)})();
Loading…
Cancel
Save