Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'unknown locale' error message when viewing service plans #3447

Merged
merged 1 commit into from
Mar 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { registerLocaleData, TitleCasePipe } from '@angular/common';
import localeFr from '@angular/common/locales/fr';
import { TitleCasePipe } from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
Expand All @@ -25,27 +24,27 @@ import {
withLatestFrom,
} from 'rxjs/operators';

import { IServicePlan } from '../../../../core/cf-api-svc.types';
import { StepOnNextResult } from '../../stepper/step/step.component';
import { CreateServiceInstanceHelperServiceFactory } from '../create-service-instance-helper-service-factory.service';
import { CreateServiceInstanceHelper } from '../create-service-instance-helper.service';
import { CsiModeService } from '../csi-mode.service';
import { NoServicePlansComponent } from '../no-service-plans/no-service-plans.component';
import { APIResource, EntityInfo } from '../../../../../../store/src/types/api.types';
import { AppState } from '../../../../../../store/src/app-state';
import {
SetCreateServiceInstanceCFDetails,
SetCreateServiceInstanceServicePlan
SetCreateServiceInstanceServicePlan,
} from '../../../../../../store/src/actions/create-service-instance.actions';
import { AppState } from '../../../../../../store/src/app-state';
import { selectCreateServiceInstance } from '../../../../../../store/src/selectors/create-service-instance.selectors';
import { CardStatus } from '../../../shared.types';
import { APIResource } from '../../../../../../store/src/types/api.types';
import { IServicePlan } from '../../../../core/cf-api-svc.types';
import { safeUnsubscribe } from '../../../../core/utils.service';
import {
populateServicePlanExtraTyped,
canShowServicePlanCosts,
getServicePlanAccessibilityCardStatus,
getServicePlanName,
canShowServicePlanCosts
populateServicePlanExtraTyped,
} from '../../../../features/service-catalog/services-helper';
import { safeUnsubscribe } from '../../../../core/utils.service';
import { CardStatus } from '../../../shared.types';
import { StepOnNextResult } from '../../stepper/step/step.component';
import { CreateServiceInstanceHelperServiceFactory } from '../create-service-instance-helper-service-factory.service';
import { CreateServiceInstanceHelper } from '../create-service-instance-helper.service';
import { CsiModeService } from '../csi-mode.service';
import { NoServicePlansComponent } from '../no-service-plans/no-service-plans.component';

@Component({
selector: 'app-select-plan-step',
Expand Down Expand Up @@ -76,8 +75,6 @@ export class SelectPlanStepComponent implements OnDestroy {
private modeService: CsiModeService

) {
registerLocaleData(localeFr);

this.stepperForm = new FormGroup({
servicePlans: new FormControl('', Validators.required),
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import {


/**
* Service instance list shown for `service / service instances` component
*
* @export
*/
@Injectable()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { registerLocaleData } from '@angular/common';
import localeFr from '@angular/common/locales/fr';
import { Component, Input } from '@angular/core';

import { IServicePlan, IServicePlanCost } from '../../../core/cf-api-svc.types';
import { APIResource } from '../../../../../store/src/types/api.types';
import { IServicePlan, IServicePlanCost } from '../../../core/cf-api-svc.types';


@Component({
selector: 'app-service-plan-price',
Expand All @@ -12,6 +15,10 @@ export class ServicePlanPriceComponent {

@Input() servicePlan: APIResource<IServicePlan>;

constructor() {
registerLocaleData(localeFr);
}

/*
* Pick the first country listed in the amount object. It's unclear whether there could be a different number of these depending on
* which region the CF is being served from (IBM seem to charge different amounts per country)
Expand Down