Merge branch 'feature/language-spanish' into 'develop'

Feature/language spanish

Merge the spanish feature into develop

See merge request !30
This commit is contained in:
Manuel Friedli 2014-11-20 03:50:19 +01:00
commit 18319d15e6
6 changed files with 86 additions and 2 deletions

View file

@ -33,6 +33,7 @@ Beim Einbinden muss das attribut `data-class` angegeben werden, welches die CSS-
* uhr-en.js * uhr-en.js
* uhr-fr.js * uhr-fr.js
* uhr-it.js * uhr-it.js
* uhr-es.js
`uhr-de_CH_genau.js` ist eine Variante von Berndeutsch, bei der zur vollen Stunde zusätzlich das Wort "genau" angezeigt wird (also z.B. um 15:00 Uhr "ES ISCH GENAU DRÜ"). `uhr-de_CH_genau.js` ist eine Variante von Berndeutsch, bei der zur vollen Stunde zusätzlich das Wort "genau" angezeigt wird (also z.B. um 15:00 Uhr "ES ISCH GENAU DRÜ").

View file

@ -1 +1 @@
6.4 6.4-next

View file

@ -41,6 +41,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<script type="text/javascript" src="js/uhr-en.js"></script> <script type="text/javascript" src="js/uhr-en.js"></script>
<script type="text/javascript" src="js/uhr-fr.js"></script> <script type="text/javascript" src="js/uhr-fr.js"></script>
<script type="text/javascript" src="js/uhr-it.js"></script> <script type="text/javascript" src="js/uhr-it.js"></script>
<script type="text/javascript" src="js/uhr-es.js"></script>
<script type="text/javascript"> <script type="text/javascript">
function go(url) { function go(url) {
window.location = url; window.location = url;

View file

@ -110,6 +110,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
&lt;script type="text/javascript" src="uhr-en.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="uhr-en.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="uhr-fr.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="uhr-fr.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="uhr-it.js"&gt;&lt;/script&gt;</code> &lt;script type="text/javascript" src="uhr-it.js"&gt;&lt;/script&gt;</code>
&lt;script type="text/javascript" src="uhr-es.js"&gt;&lt;/script&gt;</code>
</p> </p>
<p>Von den Stylesheets zwingend ist <code>uhr.css</code> und mindestens eines der Farbschema-Stylesheets. Die <p>Von den Stylesheets zwingend ist <code>uhr.css</code> und mindestens eines der Farbschema-Stylesheets. Die

80
js/uhr-es.js Normal file
View file

@ -0,0 +1,80 @@
/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
(function($) {
'use strict';
var es_la = {1: [1, 2, 6, 7]};
var son_las = {1: [2, 3, 4, 6, 7, 8]};
var y = {7: [6]};
var menos = {7: [7, 8, 9, 10, 11]};
var media = {10: [1, 2, 3, 4, 5]};
var cinco = {9: [7, 8, 9, 10, 11]};
var diez = {8: [8, 9, 10, 11]};
var cuarto = {10: [6, 7, 8, 9, 10, 11]};
var veinte = {8: [2, 3, 4, 5, 6, 7]};
var veinticinco = {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]};
var layout = {
"version": 2,
"language": 'Español',
"letters": [
'ESONELASUNA',
'DOSITRESORE',
'CUATROCINCO',
'SEISASIETEN',
'OCHONUEVEYO',
'LADIEZSONCE',
'DOCELYMENOS',
'OVEINTEDIEZ',
'VEINTICINCO',
'MEDIACUARTO'
],
"permanent": [],
"minutes": {
"5,6,7,8,9": [y, cinco],
"10,11,12,13,14": [y, diez],
"15,16,17,18,19": [y, cuarto],
"20,21,22,23,24": [y, veinte],
"25,26,27,28,29": [y, veinticinco],
"30,31,32,33,34": [y, media],
"35,36,37,38,39": [menos, veinticinco],
"40,41,42,43,44": [menos, veinte],
"45,46,47,48,49": [menos, cuarto],
"50,51,52,53,54": [menos, diez],
"55,56,57,58,59": [menos, cinco]
},
"hours": {
"0,12": [son_las, {7: [1, 2, 3, 4]}],
"1,13": [es_la, {1: [9, 10, 11]}],
"2,14": [son_las, {2: [1, 2, 3]}],
"3,15": [son_las, {2: [5, 6, 7, 8]}],
"4,16": [son_las, {3: [1, 2, 3, 4, 5, 6]}],
"5,17": [son_las, {3: [7, 8, 9, 10, 11]}],
"6,18": [son_las, {4: [1, 2, 3, 4]}],
"7,19": [son_las, {4: [6, 7, 8, 9, 10]}],
"8,20": [son_las, {5: [1, 2, 3, 4]}],
"9,21": [son_las, {5: [5, 6, 7, 8, 9]}],
"10,22": [son_las, {6: [3, 4, 5, 6]}],
"11,23": [son_las, {6: [8, 9, 10, 11]}]
},
"getHour": function(date) {
var hour = date.getHours();
if (date.getMinutes() >= 35) {
return (hour + 1) % 24;
}
return hour;
}
};
$.fritteli.uhr.register('es', layout);
}(jQuery));

View file

@ -1,5 +1,5 @@
CACHE MANIFEST CACHE MANIFEST
# 6.4 # 6.4-next
css/uhr.css css/uhr.css
css/uhr-black.css css/uhr-black.css
@ -16,6 +16,7 @@ js/uhr-de.js
js/uhr-de_CH.js js/uhr-de_CH.js
js/uhr-de_CH_genau.js js/uhr-de_CH_genau.js
js/uhr-en.js js/uhr-en.js
js/uhr-es.js
js/uhr-fr.js js/uhr-fr.js
js/uhr-it.js js/uhr-it.js
lib/jquery-2.1.0.min.js lib/jquery-2.1.0.min.js