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

Conversation

richard-cox
Copy link
Contributor

To reproduce..

  • View the service's service plan table using a cost with amount in EUR
    • Alternatively update..
    • src/frontend/packages/core/src/shared/components/list/list-types/service-plans/table-cell-service-plan-price/table-cell-service-plan-price.component.html
      Remove if from app-service-plan-price
    • src/frontend/packages/core/src/shared/components/service-plan-price/service-plan-price.component.ts
      Update service plan property with
private s;
  @Input() set servicePlan(a: APIResource<IServicePlan>) {
    a.entity.extraTyped = {
      costs: [
        {
          amount: {
            eur: 48
          },
          unit: 'Monthly'
        }
      ],
      displayName: 'noop plan display name',
      bullets: [
        '2GB storage',
        '50 concurrent connections'
      ]
    };
    this.s = a;
  }
  get servicePlan() {
    return this.s;
  }
  • Exception Missing locale data for the locale "fr". is thrown when viewing service plans table

Fixes #3431
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

See https://angular.io/guide/i18n#i18n-pipes for more info

@cfdreddbot
Copy link

✅ Hey richard-cox! The commit authors and yourself have already signed the CLA.

@codecov
Copy link

codecov bot commented Mar 22, 2019

Codecov Report

Merging #3447 into v2-master will not change coverage.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           v2-master    #3447   +/-   ##
==========================================
  Coverage      25.95%   25.95%           
==========================================
  Files            682      682           
  Lines          18711    18711           
  Branches        3258     3258           
==========================================
  Hits            4856     4856           
  Misses         13855    13855

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
@richard-cox richard-cox force-pushed the fix-service-plan-exception branch from 3a4d456 to 2dd7ecd Compare March 22, 2019 10:38
Copy link
Contributor

@nwmac nwmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nwmac nwmac merged commit 4bedfc9 into v2-master Mar 25, 2019
@nwmac nwmac deleted the fix-service-plan-exception branch March 25, 2019 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants