wrap the layout definitions in immediately executing anonymous functions

This commit is contained in:
Manuel Friedli 2014-07-03 20:37:34 +02:00
parent 85b5670dfc
commit 3d0245abfa
7 changed files with 440 additions and 395 deletions

View file

@ -12,60 +12,62 @@ 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/>.
*/
'use strict';
var h = {
"_es_ist": {1:[1,2,4,5,6]},
"_nach": {4:[8,9,10,11]},
"_vor": {4:[1,2,3]},
"_halb": {5:[1,2,3,4]},
"_5": {1:[8,9,10,11]},
"_10": {2:[1,2,3,4]},
"_15": {3:[5,6,7,8,9,10,11]},
"_20": {2:[5,6,7,8,9,10,11]},
"_45": {3:[1,2,3,4,5,6,7,8,9,10,11]}
};
var layout = {
"version": 2,
"language": 'Deutsch',
"letters": [
'ESKISTAFÜNF',
'ZEHNZWANZIG',
'DREIVIERTEL',
'VORFUNKNACH',
'HALBAELFÜNF',
'EINSXAMZWEI',
'DREIPMJVIER',
'SECHSNLACHT',
'SIEBENZWÖLF',
'ZEHNEUNKUHR'
],
"permanent": h._es_ist,
"minutes": {
"5,6,7,8,9": [h._5, h._nach],
"10,11,12,13,14": [h._10, h._nach],
"15,16,17,18,19": [h._15, h._nach],
"20,21,22,23,24": [h._20, h._nach],
"25,26,27,28,29": [h._5, h._vor, h._halb],
"30,31,32,33,34": h._halb,
"35,36,37,38,39": [h._5, h._nach, h._halb],
"40,41,42,43,44": [h._20, h._vor],
"45,46,47,48,49": h._45,
"50,51,52,53,54": [h._10, h._vor],
"55,56,57,58,59": [h._5, h._vor]
},
"hours": {
"0,12": {9:[7,8,9,10,11]},
"1,13": {6:[1,2,3,4]},
"2,14": {6:[8,9,10,11]},
"3,15": {7:[1,2,3,4]},
"4,16": {7:[8,9,10,11]},
"5,17": {5:[8,9,10,11]},
"6,18": {8:[1,2,3,4,5]},
"7,19": {9:[1,2,3,4,5,6]},
"8,20": {8:[8,9,10,11]},
"9,21": {10:[4,5,6,7]},
"10,22": {10:[1,2,3,4]},
"11,23": {5:[6,7,8]}
}
};
$.fritteli.uhr.register('de', layout);
(function () {
'use strict';
var h = {
"_es_ist": {1:[1,2,4,5,6]},
"_nach": {4:[8,9,10,11]},
"_vor": {4:[1,2,3]},
"_halb": {5:[1,2,3,4]},
"_5": {1:[8,9,10,11]},
"_10": {2:[1,2,3,4]},
"_15": {3:[5,6,7,8,9,10,11]},
"_20": {2:[5,6,7,8,9,10,11]},
"_45": {3:[1,2,3,4,5,6,7,8,9,10,11]}
};
var layout = {
"version": 2,
"language": 'Deutsch',
"letters": [
'ESKISTAFÜNF',
'ZEHNZWANZIG',
'DREIVIERTEL',
'VORFUNKNACH',
'HALBAELFÜNF',
'EINSXAMZWEI',
'DREIPMJVIER',
'SECHSNLACHT',
'SIEBENZWÖLF',
'ZEHNEUNKUHR'
],
"permanent": h._es_ist,
"minutes": {
"5,6,7,8,9": [h._5, h._nach],
"10,11,12,13,14": [h._10, h._nach],
"15,16,17,18,19": [h._15, h._nach],
"20,21,22,23,24": [h._20, h._nach],
"25,26,27,28,29": [h._5, h._vor, h._halb],
"30,31,32,33,34": h._halb,
"35,36,37,38,39": [h._5, h._nach, h._halb],
"40,41,42,43,44": [h._20, h._vor],
"45,46,47,48,49": h._45,
"50,51,52,53,54": [h._10, h._vor],
"55,56,57,58,59": [h._5, h._vor]
},
"hours": {
"0,12": {9:[7,8,9,10,11]},
"1,13": {6:[1,2,3,4]},
"2,14": {6:[8,9,10,11]},
"3,15": {7:[1,2,3,4]},
"4,16": {7:[8,9,10,11]},
"5,17": {5:[8,9,10,11]},
"6,18": {8:[1,2,3,4,5]},
"7,19": {9:[1,2,3,4,5,6]},
"8,20": {8:[8,9,10,11]},
"9,21": {10:[4,5,6,7]},
"10,22": {10:[1,2,3,4]},
"11,23": {5:[6,7,8]}
}
};
$.fritteli.uhr.register('de', layout);
}());

View file

@ -12,86 +12,88 @@ 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/>.
*/
'use strict';
(function () {
'use strict';
// hilfsvariablen
var h = {
"_es_isch": {1:[1,2,4,5,6,7]},
"_ab": {4:[1,2]},
"_vor": {3:[9,10,11]},
"_haubi": {4:[4,5,6,7,8]},
"_5": {1:[9,10,11]},
"_10": {2:[9,10,11]},
"_15": {2:[1,2,3,4,5,6]},
"_20": {3:[1,2,3,4,5,6]}
};
var layout = {
// version: zur Zeit immer 2 (Pflichtattribut)
"version": 2,
// Sprechender Name der Sprache
"language": 'Bärndütsch',
// Buchstabenfeld als Array von Strings.
"letters": [
'ESKISCHAFÜF',
'VIERTUBFZÄÄ',
'ZWÄNZGSIVOR',
'ABOHAUBIEGE',
'EISZWÖISDRÜ',
'VIERIFÜFIQT',
'SÄCHSISIBNI',
'ACHTINÜNIEL',
'ZÄNIERBEUFI',
'ZWÖUFINAUHR'
],
// Permanent aktive Buchstaben. <array-or-object>, vgl. ausführliche Beschreibung bei "minutes".
"permanent": h._es_isch,
/*
* Minuten: Objekt im folgenden Format:
* {
* <minuten>: <array-or-object>,
* ...
* }
* <minuten>: String von Komma-separierten Minutenwerten, zu welchem die in <array-or-object> angegebenen Buchstaben aktiv sein sollen
* <array-or-object> : [ <object>, ...] | <object>
* <object>: { <zeile> : [ <spalte>, ... ] }
* <zeile>: Die Zeile, in welcher die Buchstaben liegen; von oben gezählt, oben ist 1.
* <spalte>: Die Spalte, in der ein einzelner Buchstabe liegt; von links gezählt, links ist 1.
* Beispiel:
* "minutes": {
* "0,1": {1: [6, 7, 9]},
* "5": [ {3: [1, 2]}, {4: [10, 11]} ]
* }
* Erklärung:
* Bei Minuten 0 und 1 sind die Buchstaben 6, 7 und 9 der ersten Zeile aktiv.
* Bei Minute 5 sind die Buchstaben 1 und 2 der Zeile 3 sowie die Buchstaben 10 und 11 der Zeile 4 aktiv.
*/
"minutes": {
"5,6,7,8,9": [h._5, h._ab],
"10,11,12,13,14": [h._10, h._ab],
"15,16,17,18,19": [h._15, h._ab],
"20,21,22,23,24": [h._20, h._ab],
"25,26,27,28,29": [h._5, h._vor, h._haubi],
"30,31,32,33,34": h._haubi,
"35,36,37,38,39": [h._5, h._ab, h._haubi],
"40,41,42,43,44": [h._20, h._vor],
"45,46,47,48,49": [h._15, h._vor],
"50,51,52,53,54": [h._10, h._vor],
"55,56,57,58,59": [h._5, h._vor]
},
// Die Stunden; gleiches Format wie bei den Minuten
"hours": {
"0,12": {10:[1,2,3,4,5,6]},
"1,13": {5:[1,2,3]},
"2,14": {5:[4,5,6,7]},
"3,15": {5:[9,10,11]},
"4,16": {6:[1,2,3,4,5]},
"5,17": {6:[6,7,8,9]},
"6,18": {7:[1,2,3,4,5,6]},
"7,19": {7:[7,8,9,10,11]},
"8,20": {8:[1,2,3,4,5]},
"9,21": {8:[6,7,8,9]},
"10,22": {9:[1,2,3,4]},
"11,23": {9:[8,9,10,11]}
}
};
var h = {
"_es_isch": {1: [1, 2, 4, 5, 6, 7]},
"_ab": {4: [1, 2]},
"_vor": {3: [9, 10, 11]},
"_haubi": {4: [4, 5, 6, 7, 8]},
"_5": {1: [9, 10, 11]},
"_10": {2: [9, 10, 11]},
"_15": {2: [1, 2, 3, 4, 5, 6]},
"_20": {3: [1, 2, 3, 4, 5, 6]}
};
var layout = {
// version: zur Zeit immer 2 (Pflichtattribut)
"version": 2,
// Sprechender Name der Sprache
"language": 'Bärndütsch',
// Buchstabenfeld als Array von Strings.
"letters": [
'ESKISCHAFÜF',
'VIERTUBFZÄÄ',
'ZWÄNZGSIVOR',
'ABOHAUBIEGE',
'EISZWÖISDRÜ',
'VIERIFÜFIQT',
'SÄCHSISIBNI',
'ACHTINÜNIEL',
'ZÄNIERBEUFI',
'ZWÖUFINAUHR'
],
// Permanent aktive Buchstaben. <array-or-object>, vgl. ausführliche Beschreibung bei "minutes".
"permanent": h._es_isch,
/*
* Minuten: Objekt im folgenden Format:
* {
* <minuten>: <array-or-object>,
* ...
* }
* <minuten>: String von Komma-separierten Minutenwerten, zu welchem die in <array-or-object> angegebenen Buchstaben aktiv sein sollen
* <array-or-object> : [ <object>, ...] | <object>
* <object>: { <zeile> : [ <spalte>, ... ] }
* <zeile>: Die Zeile, in welcher die Buchstaben liegen; von oben gezählt, oben ist 1.
* <spalte>: Die Spalte, in der ein einzelner Buchstabe liegt; von links gezählt, links ist 1.
* Beispiel:
* "minutes": {
* "0,1": {1: [6, 7, 9]},
* "5": [ {3: [1, 2]}, {4: [10, 11]} ]
* }
* Erklärung:
* Bei Minuten 0 und 1 sind die Buchstaben 6, 7 und 9 der ersten Zeile aktiv.
* Bei Minute 5 sind die Buchstaben 1 und 2 der Zeile 3 sowie die Buchstaben 10 und 11 der Zeile 4 aktiv.
*/
"minutes": {
"5,6,7,8,9": [h._5, h._ab],
"10,11,12,13,14": [h._10, h._ab],
"15,16,17,18,19": [h._15, h._ab],
"20,21,22,23,24": [h._20, h._ab],
"25,26,27,28,29": [h._5, h._vor, h._haubi],
"30,31,32,33,34": h._haubi,
"35,36,37,38,39": [h._5, h._ab, h._haubi],
"40,41,42,43,44": [h._20, h._vor],
"45,46,47,48,49": [h._15, h._vor],
"50,51,52,53,54": [h._10, h._vor],
"55,56,57,58,59": [h._5, h._vor]
},
// Die Stunden; gleiches Format wie bei den Minuten
"hours": {
"0,12": {10: [1, 2, 3, 4, 5, 6]},
"1,13": {5: [1, 2, 3]},
"2,14": {5: [4, 5, 6, 7]},
"3,15": {5: [9, 10, 11]},
"4,16": {6: [1, 2, 3, 4, 5]},
"5,17": {6: [6, 7, 8, 9]},
"6,18": {7: [1, 2, 3, 4, 5, 6]},
"7,19": {7: [7, 8, 9, 10, 11]},
"8,20": {8: [1, 2, 3, 4, 5]},
"9,21": {8: [6, 7, 8, 9]},
"10,22": {9: [1, 2, 3, 4]},
"11,23": {9: [8, 9, 10, 11]}
}
};
// Das Layout bei der Uhr unter dem Code "de_CH" registrieren.
$.fritteli.uhr.register('de_CH', layout);
$.fritteli.uhr.register('de_CH', layout);
}());

View file

@ -12,61 +12,63 @@ 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/>.
*/
'use strict';
var h = {
"_es_isch": {1:[1,2,4,5,6,7]},
"_genau": {3:[7,8,9,10,11]},
"_ab": {4:[4,5]},
"_vor": {4:[1,2,3]},
"_haubi": {4:[7,8,9,10,11]},
"_5": {1:[9,10,11]},
"_10": {2:[9,10,11]},
"_15": {2:[1,2,3,4,5,6]},
"_20": {3:[1,2,3,4,5,6]}
};
var layout = {
"version": 2,
"language": 'Bärndütsch (genau)',
"letters": [
'ESKISCHAFÜF',
'VIERTUBFZÄÄ',
'ZWÄNZGGENAU',
'VORABOHAUBI',
'EISZWÖISDRÜ',
'VIERIFÜFIQT',
'SÄCHSISIBNI',
'ACHTINÜNIEL',
'ZÄNIERBEUFI',
'ZWÖUFINAUHR'
],
"permanent": h._es_isch,
"minutes": {
"0": h._genau,
"5,6,7,8,9": [h._5, h._ab],
"10,11,12,13,14": [h._10, h._ab],
"15,16,17,18,19": [h._15, h._ab],
"20,21,22,23,24": [h._20, h._ab],
"25,26,27,28,29": [h._5, h._vor, h._haubi],
"30,31,32,33,34": h._haubi,
"35,36,37,38,39": [h._5, h._ab, h._haubi],
"40,41,42,43,44": [h._20, h._vor],
"45,46,47,48,49": [h._15, h._vor],
"50,51,52,53,54": [h._10, h._vor],
"55,56,57,58,59": [h._5, h._vor]
},
"hours": {
"0,12": {10:[1,2,3,4,5,6]},
"1,13": {5:[1,2,3]},
"2,14": {5:[4,5,6,7]},
"3,15": {5:[9,10,11]},
"4,16": {6:[1,2,3,4,5]},
"5,17": {6:[6,7,8,9]},
"6,18": {7:[1,2,3,4,5,6]},
"7,19": {7:[7,8,9,10,11]},
"8,20": {8:[1,2,3,4,5]},
"9,21": {8:[6,7,8,9]},
"10,22": {9:[1,2,3,4]},
"11,23": {9:[8,9,10,11]}
}
};
$.fritteli.uhr.register('de_CH_genau', layout);
(function () {
'use strict';
var h = {
"_es_isch": {1: [1, 2, 4, 5, 6, 7]},
"_genau": {3: [7, 8, 9, 10, 11]},
"_ab": {4: [4, 5]},
"_vor": {4: [1, 2, 3]},
"_haubi": {4: [7, 8, 9, 10, 11]},
"_5": {1: [9, 10, 11]},
"_10": {2: [9, 10, 11]},
"_15": {2: [1, 2, 3, 4, 5, 6]},
"_20": {3: [1, 2, 3, 4, 5, 6]}
};
var layout = {
"version": 2,
"language": 'Bärndütsch (genau)',
"letters": [
'ESKISCHAFÜF',
'VIERTUBFZÄÄ',
'ZWÄNZGGENAU',
'VORABOHAUBI',
'EISZWÖISDRÜ',
'VIERIFÜFIQT',
'SÄCHSISIBNI',
'ACHTINÜNIEL',
'ZÄNIERBEUFI',
'ZWÖUFINAUHR'
],
"permanent": h._es_isch,
"minutes": {
"0": h._genau,
"5,6,7,8,9": [h._5, h._ab],
"10,11,12,13,14": [h._10, h._ab],
"15,16,17,18,19": [h._15, h._ab],
"20,21,22,23,24": [h._20, h._ab],
"25,26,27,28,29": [h._5, h._vor, h._haubi],
"30,31,32,33,34": h._haubi,
"35,36,37,38,39": [h._5, h._ab, h._haubi],
"40,41,42,43,44": [h._20, h._vor],
"45,46,47,48,49": [h._15, h._vor],
"50,51,52,53,54": [h._10, h._vor],
"55,56,57,58,59": [h._5, h._vor]
},
"hours": {
"0,12": {10: [1, 2, 3, 4, 5, 6]},
"1,13": {5: [1, 2, 3]},
"2,14": {5: [4, 5, 6, 7]},
"3,15": {5: [9, 10, 11]},
"4,16": {6: [1, 2, 3, 4, 5]},
"5,17": {6: [6, 7, 8, 9]},
"6,18": {7: [1, 2, 3, 4, 5, 6]},
"7,19": {7: [7, 8, 9, 10, 11]},
"8,20": {8: [1, 2, 3, 4, 5]},
"9,21": {8: [6, 7, 8, 9]},
"10,22": {9: [1, 2, 3, 4]},
"11,23": {9: [8, 9, 10, 11]}
}
};
$.fritteli.uhr.register('de_CH_genau', layout);
}());

View file

@ -12,69 +12,71 @@ 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/>.
*/
'use strict';
var h = {
"_it_is": {1:[1,2,4,5]},
"_half": {4:[1,2,3,4]},
"_to": {4:[10,11]},
"_past": {5:[1,2,3,4]},
"_o_clock": {10:[6,7,8,9,10,11]},
"_5": {3:[7,8,9,10]},
"_10": {4:[6,7,8]},
"_15": {2:[1,3,4,5,6,7,8,9]},
"_20": {3:[1,2,3,4,5,6]},
"_25": {3:[1,2,3,4,5,6,7,8,9,10]}
};
var layout = {
"version": 2,
"language": 'English',
"letters": [
'ITLISBFAMPM',
'ACQUARTERDC',
'TWENTYFIVEX',
'HALFBTENFTO',
'PASTERUNINE',
'ONESIXTHREE',
'FOURFIVETWO',
'EIGHTELEVEN',
'SEVENTWELVE',
'TENSEOCLOCK'
],
"permanent": h._it_is,
"minutes": {
"0,1,2,3,4": h._o_clock,
"5,6,7,8,9": [h._5, h._past],
"10,11,12,13,14": [h._10, h._past],
"15,16,17,18,19": [h._15, h._past],
"20,21,22,23,24": [h._20, h._past],
"25,26,27,28,29": [h._25, h._past],
"30,31,32,33,34": [h._half, h._past],
"35,36,37,38,39": [h._25, h._to],
"40,41,42,43,44": [h._20, h._to],
"45,46,47,48,49": [h._15, h._to],
"50,51,52,53,54": [h._10, h._to],
"55,56,57,58,59": [h._5, h._to]
},
"hours": {
"0,12": {9:[6,7,8,9,10,11]},
"1,13": {6:[1,2,3]},
"2,14": {7:[9,10,11]},
"3,15": {6:[7,8,9,10,11]},
"4,16": {7:[1,2,3,4]},
"5,17": {7:[5,6,7,8]},
"6,18": {6:[4,5,6]},
"7,19": {9:[1,2,3,4,5]},
"8,20": {8:[1,2,3,4,5]},
"9,21": {5:[8,9,10,11]},
"10,22": {10:[1,2,3]},
"11,23": {8:[6,7,8,9,10,11]}
},
"getHour": function(date) {
var hour = date.getHours();
if (date.getMinutes() >= 35) {
return (hour + 1) % 24;
}
return hour;
}
};
$.fritteli.uhr.register('en', layout);
(function () {
'use strict';
var h = {
"_it_is": {1: [1, 2, 4, 5]},
"_half": {4: [1, 2, 3, 4]},
"_to": {4: [10, 11]},
"_past": {5: [1, 2, 3, 4]},
"_o_clock": {10: [6, 7, 8, 9, 10, 11]},
"_5": {3: [7, 8, 9, 10]},
"_10": {4: [6, 7, 8]},
"_15": {2: [1, 3, 4, 5, 6, 7, 8, 9]},
"_20": {3: [1, 2, 3, 4, 5, 6]},
"_25": {3: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}
};
var layout = {
"version": 2,
"language": 'English',
"letters": [
'ITLISBFAMPM',
'ACQUARTERDC',
'TWENTYFIVEX',
'HALFBTENFTO',
'PASTERUNINE',
'ONESIXTHREE',
'FOURFIVETWO',
'EIGHTELEVEN',
'SEVENTWELVE',
'TENSEOCLOCK'
],
"permanent": h._it_is,
"minutes": {
"0,1,2,3,4": h._o_clock,
"5,6,7,8,9": [h._5, h._past],
"10,11,12,13,14": [h._10, h._past],
"15,16,17,18,19": [h._15, h._past],
"20,21,22,23,24": [h._20, h._past],
"25,26,27,28,29": [h._25, h._past],
"30,31,32,33,34": [h._half, h._past],
"35,36,37,38,39": [h._25, h._to],
"40,41,42,43,44": [h._20, h._to],
"45,46,47,48,49": [h._15, h._to],
"50,51,52,53,54": [h._10, h._to],
"55,56,57,58,59": [h._5, h._to]
},
"hours": {
"0,12": {9: [6, 7, 8, 9, 10, 11]},
"1,13": {6: [1, 2, 3]},
"2,14": {7: [9, 10, 11]},
"3,15": {6: [7, 8, 9, 10, 11]},
"4,16": {7: [1, 2, 3, 4]},
"5,17": {7: [5, 6, 7, 8]},
"6,18": {6: [4, 5, 6]},
"7,19": {9: [1, 2, 3, 4, 5]},
"8,20": {8: [1, 2, 3, 4, 5]},
"9,21": {5: [8, 9, 10, 11]},
"10,22": {10: [1, 2, 3]},
"11,23": {8: [6, 7, 8, 9, 10, 11]}
},
"getHour": function (date) {
var hour = date.getHours();
if (date.getMinutes() >= 35) {
return (hour + 1) % 24;
}
return hour;
}
};
$.fritteli.uhr.register('en', layout);
}());

View file

@ -13,70 +13,105 @@ 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/>.
*/
'use strict';
var h = {
"_il_est": {1:[1,2,4,5,6]},
"_et": {8:[1,2]},
"_moins": {7:[1,2,3,4,5]},
"_demie": {10:[4,5,6,7,8]},
"_heures": {6:[6,7,8,9,10,11]},
"_le": {7:[7,8]},
"_5": {9:[7,8,9,10]},
"_10": {7:[9,10,11]},
"_15": {8:[4,5,6,7,8]},
"_20": {9:[1,2,3,4,5]},
"_25": {9:[1,2,3,4,5,6,7,8,9,10]}
};
var layout = {
"version": 2,
"language": 'Français',
"letters": [
'ILNESTODEUX',
'QUATRETROIS',
'NEUFUNESEPT',
'HUITSIXCINQ',
'MIDIXMINUIT',
'ONZERHEURES',
'MOINSOLEDIX',
'ETRQUARTPMD',
'VINGT-CINQU',
'ETSDEMIEPAM'
],
"permanent": h._il_est,
"minutes": {
"5,6,7,8,9": h._5,
"10,11,12,13,14": h._10,
"15,16,17,18,19": [h._et, h._15],
"20,21,22,23,24": h._20,
"25,26,27,28,29": h._25,
"30,31,32,33,34": [h._et, h._demie],
"35,36,37,38,39": [h._moins, h._25],
"40,41,42,43,44": [h._moins, h._20],
"45,46,47,48,49": [h._moins, h._le, h._15],
"50,51,52,53,54": [h._moins, h._10],
"55,56,57,58,59": [h._moins, h._5]
},
"hours": {
"0": {5:[6,7,8,9,10,11]},
"1,13": [{3:[5,6,7]}, h._heures],
"2,14": [{1:[8,9,10,11]}, h._heures],
"3,15": [{2:[7,8,9,10,11]}, h._heures],
"4,16": [{2:[1,2,3,4,5,6]}, h._heures],
"5,17": [{4:[8,9,10,11]}, h._heures],
"6,18": [{4:[5,6,7]}, h._heures],
"7,19": [{3:[8,9,10,11]}, h._heures],
"8,20": [{4:[1,2,3,4]}, h._heures],
"9,21": [{3:[1,2,3,4]}, h._heures],
"10,22": [{5:[3,4,5]}, h._heures],
"11,23": [{6:[1,2,3,4]}, h._heures],
"12": {5:[1,2,3,4]}
},
"getHour": function(date) {
var hour = date.getHours();
if (date.getMinutes() >= 35) {
return (hour + 1) % 24;
}
return hour;
}
};
$.fritteli.uhr.register('fr', layout);
(function () {
'use strict';
var h = {
"_il_est": {1: [1, 2, 4, 5, 6]},
"_et": {8: [1, 2]},
"_moins": {7: [1, 2, 3, 4, 5]},
"_demie": {10: [4, 5, 6, 7, 8]},
"_heures": {6: [6, 7, 8, 9, 10, 11]},
"_le": {7: [7, 8]},
"_5": {9: [7, 8, 9, 10]},
"_10": {7: [9, 10, 11]},
"_15": {8: [4, 5, 6, 7, 8]},
"_20": {9: [1, 2, 3, 4, 5]},
"_25": {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]}
};
var layout = {
"version": 2,
"language": 'Français',
"letters": [
'ILNESTODEUX',
'QUATRETROIS',
'NEUFUNESEPT',
'HUITSIXCINQ',
'MIDIXMINUIT',
'ONZERHEURES',
'MOINSOLEDIX',
'ETRQUARTPMD',
'VINGT-CINQU',
'ETSDEMIEPAM'
],
"permanent": h._il_est,
"minutes": {
"5,6,7,8,9": h._5,
"10,11,12,13,14": h._10,
"15,16,17,18,19": [h._et, h._15],
"20,21,22,23,24": h._20,
"25,26,27,28,29": h._25,
"30,31,32,33,34": [h._et, h._demie],
"35,36,37,38,39": [h._moins, h._25],
"40,41,42,43,44": [h._moins, h._20],
"45,46,47,48,49": [h._moins, h._le, h._15],
"50,51,52,53,54": [h._moins, h._10],
"55,56,57,58,59": [h._moins, h._5]
},
"hours": {
"0": {5: [6, 7, 8, 9, 10, 11]},
"1,13": [
{3: [5, 6, 7]},
h._heures
],
"2,14": [
{1: [8, 9, 10, 11]},
h._heures
],
"3,15": [
{2: [7, 8, 9, 10, 11]},
h._heures
],
"4,16": [
{2: [1, 2, 3, 4, 5, 6]},
h._heures
],
"5,17": [
{4: [8, 9, 10, 11]},
h._heures
],
"6,18": [
{4: [5, 6, 7]},
h._heures
],
"7,19": [
{3: [8, 9, 10, 11]},
h._heures
],
"8,20": [
{4: [1, 2, 3, 4]},
h._heures
],
"9,21": [
{3: [1, 2, 3, 4]},
h._heures
],
"10,22": [
{5: [3, 4, 5]},
h._heures
],
"11,23": [
{6: [1, 2, 3, 4]},
h._heures
],
"12": {5: [1, 2, 3, 4]}
},
"getHour": function (date) {
var hour = date.getHours();
if (date.getMinutes() >= 35) {
return (hour + 1) % 24;
}
return hour;
}
};
$.fritteli.uhr.register('fr', layout);
}());

View file

@ -12,68 +12,70 @@ 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/>.
*/
'use strict';
var h = {
"_sono_le": {1:[1,2,3,4,6,7]},
"_e_l": {2:[1,3,4]},
"_e": {8:[1]},
"_meno": {7:[8,9,10,11]},
"_mezza": {10:[7,8,9,10,11]},
"_5": {9:[6,7,8,9,10,11]},
"_10": {10:[1,2,3,4,5]},
"_un_quarto": {8:[3,4,6,7,8,9,10,11]},
"_20": {9:[1,2,3,4,5]},
"_25": {9:[1,2,3,4,5,6,7,8,9,10,11]}
};
var layout = {
"version": 2,
"language": 'Italiano',
"letters": [
'SONORLEBORE',
'ÈRL\'UNASDUE',
'TREOTTONOVE',
'DIECIUNDICI',
'DODICISETTE',
'QUATTROCSEI',
'CINQUEAMENO',
'ECUNOQUARTO',
'VENTICINQUE',
'DIECIPMEZZA'
],
"permanent": [],
"minutes": {
"5,6,7,8,9": [h._e, h._5],
"10,11,12,13,14": [h._e, h._10],
"15,16,17,18,19": [h._e, h._un_quarto],
"20,21,22,23,24": [h._e, h._20],
"25,26,27,28,29": [h._e, h._25],
"30,31,32,33,34": [h._e, h._mezza],
"35,36,37,38,39": [h._meno, h._25],
"40,41,42,43,44": [h._meno, h._20],
"45,46,47,48,49": [h._meno, h._un_quarto],
"50,51,52,53,54": [h._meno, h._10],
"55,56,57,58,59": [h._meno, h._5]
},
"hours": {
"0,12": [h._sono_le, {5:[1,2,3,4,5,6]}],
"1,13": [h._e_l, {2:[5,6,7]}],
"2,14": [h._sono_le, {2:[9,10,11]}],
"3,15": [h._sono_le, {3:[1,2,3]}],
"4,16": [h._sono_le, {6:[1,2,3,4,5,6,7]}],
"5,17": [h._sono_le, {7:[1,2,3,4,5,6]}],
"6,18": [h._sono_le, {6:[9,10,11]}],
"7,19": [h._sono_le, {5:[7,8,9,10,11]}],
"8,20": [h._sono_le, {3:[4,5,6,7]}],
"9,21": [h._sono_le, {3:[8,9,10,11]}],
"10,22": [h._sono_le, {4:[1,2,3,4,5]}],
"11,23": [h._sono_le, {4:[6,7,8,9,10,11]}]
},
"getHour": function(date) {
var hour = date.getHours();
if (date.getMinutes() >= 35) {
return (hour + 1) % 24;
}
return hour;
}
};
$.fritteli.uhr.register('it', layout);
(function () {
'use strict';
var h = {
"_sono_le": {1: [1, 2, 3, 4, 6, 7]},
"_e_l": {2: [1, 3, 4]},
"_e": {8: [1]},
"_meno": {7: [8, 9, 10, 11]},
"_mezza": {10: [7, 8, 9, 10, 11]},
"_5": {9: [6, 7, 8, 9, 10, 11]},
"_10": {10: [1, 2, 3, 4, 5]},
"_un_quarto": {8: [3, 4, 6, 7, 8, 9, 10, 11]},
"_20": {9: [1, 2, 3, 4, 5]},
"_25": {9: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]}
};
var layout = {
"version": 2,
"language": 'Italiano',
"letters": [
'SONORLEBORE',
'ÈRL\'UNASDUE',
'TREOTTONOVE',
'DIECIUNDICI',
'DODICISETTE',
'QUATTROCSEI',
'CINQUEAMENO',
'ECUNOQUARTO',
'VENTICINQUE',
'DIECIPMEZZA'
],
"permanent": [],
"minutes": {
"5,6,7,8,9": [h._e, h._5],
"10,11,12,13,14": [h._e, h._10],
"15,16,17,18,19": [h._e, h._un_quarto],
"20,21,22,23,24": [h._e, h._20],
"25,26,27,28,29": [h._e, h._25],
"30,31,32,33,34": [h._e, h._mezza],
"35,36,37,38,39": [h._meno, h._25],
"40,41,42,43,44": [h._meno, h._20],
"45,46,47,48,49": [h._meno, h._un_quarto],
"50,51,52,53,54": [h._meno, h._10],
"55,56,57,58,59": [h._meno, h._5]
},
"hours": {
"0,12": [h._sono_le, {5: [1, 2, 3, 4, 5, 6]}],
"1,13": [h._e_l, {2: [5, 6, 7]}],
"2,14": [h._sono_le, {2: [9, 10, 11]}],
"3,15": [h._sono_le, {3: [1, 2, 3]}],
"4,16": [h._sono_le, {6: [1, 2, 3, 4, 5, 6, 7]}],
"5,17": [h._sono_le, {7: [1, 2, 3, 4, 5, 6]}],
"6,18": [h._sono_le, {6: [9, 10, 11]}],
"7,19": [h._sono_le, {5: [7, 8, 9, 10, 11]}],
"8,20": [h._sono_le, {3: [4, 5, 6, 7]}],
"9,21": [h._sono_le, {3: [8, 9, 10, 11]}],
"10,22": [h._sono_le, {4: [1, 2, 3, 4, 5]}],
"11,23": [h._sono_le, {4: [6, 7, 8, 9, 10, 11]}]
},
"getHour": function (date) {
var hour = date.getHours();
if (date.getMinutes() >= 35) {
return (hour + 1) % 24;
}
return hour;
}
};
$.fritteli.uhr.register('it', layout);
}());

View file

@ -465,4 +465,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
return '<span class="item letter ' + myStyle + '">' + myValue + '</span>';
};
}
})(jQuery);
})(jQuery);