Skip to content

Commit

Permalink
Fix 'unknown locale' error message when viewing service plans
Browse files Browse the repository at this point in the history
To reproduce..
- View the service's service plan table using a cost with amount in EUR
- Exception `Missing locale data for the locale "fr".` is thrown

This didn't happen on the create service stepper due to the locale being registered there.
Also didn't happen if visiting the service plan table after the stepper
  • Loading branch information
richard-cox committed Mar 22, 2019
1 parent 1aa8c0d commit 3a4d456
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DatePipe } from '@angular/common';
import { DatePipe, registerLocaleData } from '@angular/common';
import localeFr from '@angular/common/locales/fr';
import { Injectable } from '@angular/core';
import { Store } from '@ngrx/store';

Expand All @@ -24,8 +25,6 @@ import {


/**
* Service instance list shown for `service / service instances` component
*
* @export
*/
@Injectable()
Expand Down Expand Up @@ -102,6 +101,7 @@ export class ServicePlansListConfigService implements IListConfig<APIResource<IS
protected datePipe: DatePipe,
servicesService: ServicesService
) {
registerLocaleData(localeFr);
this.dataSource = new ServicePlansDataSource(servicesService.cfGuid, servicesService.serviceGuid, store, this);
}

Expand Down

0 comments on commit 3a4d456

Please sign in to comment.