@@ -21,8 +21,9 @@ app.factory('I18nService', function() {
21
21
this . language = this . fallback ;
22
22
}
23
23
24
- //moment init
25
- moment . locale ( this . language ) ; // @TODO maybe to remove, it should be handle by the user's application itself, and not inside the directive
24
+ // It should be handle by the user's application itself, and not inside the directive
25
+ // moment init
26
+ // moment.locale(this.language);
26
27
27
28
//human duration init, using it because momentjs does not allow accurate time (
28
29
// momentJS: a few moment ago, human duration : 4 seconds ago
@@ -44,13 +45,13 @@ app.factory('I18nService', function() {
44
45
45
46
if ( typeof this . timeHumanizer != 'undefined' ) {
46
47
time = {
47
- 'millis' : this . timeHumanizer ( diffFromAlarm , { units : [ "milliseconds " ] } ) ,
48
- 'seconds' : this . timeHumanizer ( diffFromAlarm , { units : [ "seconds " ] } ) ,
49
- 'minutes' : this . timeHumanizer ( diffFromAlarm , { units : [ "minutes " , "seconds " ] } ) ,
50
- 'hours' : this . timeHumanizer ( diffFromAlarm , { units : [ "hours " , "minutes " , "seconds " ] } ) ,
51
- 'days' : this . timeHumanizer ( diffFromAlarm , { units : [ "days " , "hours " , "minutes " , "seconds " ] } ) ,
52
- 'months' : this . timeHumanizer ( diffFromAlarm , { units : [ "months " , "days " , "hours " , "minutes " , "seconds " ] } ) ,
53
- 'years' : this . timeHumanizer ( diffFromAlarm , { units : [ "years " , "months " , "days " , "hours " , "minutes " , "seconds " ] } )
48
+ 'millis' : this . timeHumanizer ( diffFromAlarm , { units : [ "ms " ] } ) ,
49
+ 'seconds' : this . timeHumanizer ( diffFromAlarm , { units : [ "s " ] } ) ,
50
+ 'minutes' : this . timeHumanizer ( diffFromAlarm , { units : [ "m " , "s " ] } ) ,
51
+ 'hours' : this . timeHumanizer ( diffFromAlarm , { units : [ "h " , "m " , "s " ] } ) ,
52
+ 'days' : this . timeHumanizer ( diffFromAlarm , { units : [ "d " , "h " , "m " , "s " ] } ) ,
53
+ 'months' : this . timeHumanizer ( diffFromAlarm , { units : [ "mo " , "d " , "h " , "m " , "s " ] } ) ,
54
+ 'years' : this . timeHumanizer ( diffFromAlarm , { units : [ "y " , "mo " , "d " , "h " , "m " , "s " ] } )
54
55
} ;
55
56
}
56
57
else {
0 commit comments