@@ -21,8 +21,9 @@ app.factory('I18nService', function() {
2121 this . language = this . fallback ;
2222 }
2323
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);
2627
2728 //human duration init, using it because momentjs does not allow accurate time (
2829 // momentJS: a few moment ago, human duration : 4 seconds ago
@@ -44,13 +45,13 @@ app.factory('I18nService', function() {
4445
4546 if ( typeof this . timeHumanizer != 'undefined' ) {
4647 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 " ] } )
5455 } ;
5556 }
5657 else {
0 commit comments