Skip to content

Commit

Permalink
fix(languge-strings): fix languge-strings default export
Browse files Browse the repository at this point in the history
  • Loading branch information
ihym committed May 15, 2018
1 parent d9b3160 commit cf48391
Show file tree
Hide file tree
Showing 70 changed files with 133 additions and 142 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ To use any of the languages provided, you will have to import the language strin
```ts
import { Component } from '@angular/core';
import { TimeagoIntl } from 'ngx-timeago';
import englishStrings from 'ngx-timeago/language-strings/en';
import {strings as englishStrings} from 'ngx-timeago/language-strings/en';

@Component({
selector: 'app',
Expand Down
4 changes: 2 additions & 2 deletions demo/app/child/child.component.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, ChangeDetectionStrategy } from '@angular/core';
import { TimeagoIntl } from 'ngx-timeago';
import englishStrings from 'ngx-timeago/language-strings/en';
import englishShortStrings from 'ngx-timeago/language-strings/en-short';
import {strings as englishStrings} from 'ngx-timeago/language-strings/en';
import {strings as englishShortStrings} from 'ngx-timeago/language-strings/en-short';

@Component({
selector: 'app-child',
Expand Down
2 changes: 1 addition & 1 deletion demo/app/child/child.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { FooComponent } from './foo/foo.component';
import { ChildRoutingModule } from './child-routing.module';

export class MyIntl extends TimeagoIntl {
// do extra stuff here... maybe subscribe to the TranslateService from ngx-translate?
// do extra stuff here...
}

@NgModule({
Expand Down
6 changes: 0 additions & 6 deletions demo/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,18 @@
/** IE10 and IE11 requires the following to support `@angular/animation`. */
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.


/** Evergreen browsers require these. **/
import 'core-js/es6/reflect';
import 'core-js/es7/reflect';


/** ALL Firefox browsers require the following to support `@angular/animation`. **/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.



/***************************************************************************************************
* Zone JS is required by Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.



/***************************************************************************************************
* APPLICATION IMPORTS
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/src/language-strings/af.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: 'gelede',
Expand All @@ -20,4 +20,4 @@ const strings: IL10nsStrings = {
wordSeparator: ' ',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function numpf (n, a) {
return a[n === 0 ? 0 : n === 1 ? 1 : n === 2 ? 2 : n % 100 >= 3 && n % 100 <= 10 ? 3 : n % 100 >= 11 ? 4 : 5];
}

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'منذ',
prefixFromNow: 'بعد',
suffixAgo: null,
Expand Down Expand Up @@ -130,4 +130,4 @@ const strings: IL10nsStrings = {
},
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/az-short.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: '',
Expand All @@ -19,4 +19,4 @@ const strings: IL10nsStrings = {
wordSeparator: '',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/az.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: 'əvvəl',
Expand All @@ -19,4 +19,4 @@ const strings: IL10nsStrings = {
wordSeparator: '',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/bg.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'преди',
prefixFromNow: 'след',
suffixAgo: null,
Expand All @@ -18,4 +18,4 @@ const strings: IL10nsStrings = {
years: '%d години',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/bs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function numpf (n, f, s, t) {
}
};

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'prije',
prefixFromNow: 'za',
suffixAgo: null,
Expand Down Expand Up @@ -44,4 +44,4 @@ const strings: IL10nsStrings = {
wordSeparator: ' ',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/ca.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'fa',
prefixFromNow: 'd\'aqui a',
suffixAgo: null,
Expand All @@ -18,4 +18,4 @@ const strings: IL10nsStrings = {
years: '%d anys',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function f (n, d, a) {
return a[d >= 0 ? 0 : a.length === 2 || n < 5 ? 1 : 2];
}

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'před',
prefixFromNow: 'za',
suffixAgo: null,
Expand All @@ -22,4 +22,4 @@ const strings: IL10nsStrings = {
years: function (n, d) { return f(n, d, ['%d lety', '%d roky', '%d let']); },
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/cy.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: 'yn ôl',
Expand All @@ -19,4 +19,4 @@ const strings: IL10nsStrings = {
wordSeparator: ' ',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/da.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'for',
prefixFromNow: 'om',
suffixAgo: 'siden',
Expand All @@ -18,4 +18,4 @@ const strings: IL10nsStrings = {
years: '%d år',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/de-short.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: '',
Expand All @@ -19,4 +19,4 @@ const strings: IL10nsStrings = {
wordSeparator: ' ',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/de.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'vor',
prefixFromNow: 'in',
suffixAgo: '',
Expand All @@ -18,4 +18,4 @@ const strings: IL10nsStrings = {
years: '%d Jahren',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/dv.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: 'ކުރިން',
Expand All @@ -19,4 +19,4 @@ const strings: IL10nsStrings = {
wordSeparator: ' ',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/el.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'πριν',
prefixFromNow: 'σε',
suffixAgo: '',
Expand All @@ -18,4 +18,4 @@ const strings: IL10nsStrings = {
years: '%d χρόνια',
};

export default strings;

4 changes: 1 addition & 3 deletions lib/src/language-strings/en-short.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: '',
Expand All @@ -18,5 +18,3 @@ const strings: IL10nsStrings = {
years: '%dyr',
wordSeparator: ' ',
};

export default strings;
4 changes: 1 addition & 3 deletions lib/src/language-strings/en.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: 'ago',
Expand All @@ -18,5 +18,3 @@ const strings: IL10nsStrings = {
years: '%d years',
wordSeparator: ' ',
};

export default strings;
4 changes: 2 additions & 2 deletions lib/src/language-strings/es-short.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: '',
Expand All @@ -19,4 +19,4 @@ const strings: IL10nsStrings = {
wordSeparator: ' ',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/es.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'hace',
prefixFromNow: 'dentro de',
suffixAgo: '',
Expand All @@ -18,4 +18,4 @@ const strings: IL10nsStrings = {
years: '%d años',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/et.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: 'tagasi',
Expand All @@ -18,4 +18,4 @@ const strings: IL10nsStrings = {
years: function (n, d) { return d < 0 ? '%d aasta' : '%d aastat'; },
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/eu.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'duela',
prefixFromNow: 'hemendik',
suffixAgo: '',
Expand All @@ -18,4 +18,4 @@ const strings: IL10nsStrings = {
years: '%d urte',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/fa-short.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: '',
Expand All @@ -19,4 +19,4 @@ const strings: IL10nsStrings = {
wordSeparator: ' ',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/fa.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: 'پیش',
Expand All @@ -19,4 +19,4 @@ const strings: IL10nsStrings = {
wordSeparator: ' ',
};

export default strings;

4 changes: 2 additions & 2 deletions lib/src/language-strings/fi.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: null,
prefixFromNow: null,
suffixAgo: 'sitten',
Expand All @@ -18,5 +18,5 @@ const strings: IL10nsStrings = {
years: '%d vuotta',
};

export default strings;


4 changes: 2 additions & 2 deletions lib/src/language-strings/fr-short.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {IL10nsStrings} from '../timeago.intl';

const strings: IL10nsStrings = {
export const strings: IL10nsStrings = {
prefixAgo: 'il y a',
prefixFromNow: 'd\'ici',
seconds: 'moins d\'une minute',
Expand All @@ -16,4 +16,4 @@ const strings: IL10nsStrings = {
years: '%d ans',
};

export default strings;

Loading

0 comments on commit cf48391

Please sign in to comment.