Transloco: Upgrade to v2 with schematics broke nearly all my views

Created on 3 Oct 2019  路  4Comments  路  Source: ngneat/transloco

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[x] Bug report  
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request
[ ] Other... Please describe:

Current behavior

猬嗭笍 Starting v2 upgrade script 猬嗭笍
Done! Welcome to Transloco v2 馃槑
Nothing to be done.

Said nothing to be done but it definitely did something:

image

image

And the views appear to be broken

Expected behavior

Schematics shouldn't break the views

Minimal reproduction of the problem with instructions

Try to upgrade with the schematics?

Here's a component I've got that was broken after the upgrade:

<ng-container *transloco="let t">
  <app-hero
    [title]="'Albi Eco Race'"
    [subTitle]="t.editionNumber"
    [buttonText]="t.static.registration"
    buttonUrl="/register"
    [text]="t.dateAndWhere"
  ></app-hero>

  <app-promo [isSmallText]="true"></app-promo>

  <app-block [title]="'What people say'" theme="primary"><app-what-people-say></app-what-people-say></app-block>

  <app-block class="register-block">
    <button mat-raised-button color="accent" routerLink="register">{{ t.static.iWishToParticipate }}</button>
  </app-block>
</ng-container>

Environment


Angular version: 8.2.0


For Tooling issues:
- Node version: 12.4
- Platform:  Linux

Others:

bug

All 4 comments

@maxime1992 Thanks for the report!

  1. I found the issue and I believe I have fixed it, can you try it again and tell me how it goes? it's now available in v2.0.2
  2. The "nothing to be done" message is fixed as well 馃檪

@shaharkazaz it did work but noticed some of them were not taken into account for some reason :man_shrugging: (with nothing special for them) and the ones that were using the syntax:

{{ t.static.availableDocuments | translocoParams: { nbDocuments: category.documents.length } }}

were not done either. Not really a huge issue I did it but I thought you may want to know :)

Thanks for your help, if you're happy with the above feel free to close the issue.

@maxime1992 thanks again for the feedback!
I'm happy to hear that the issue is mostly resolved, it would be great if you could share all the places the script missed with the templates.

@maxime1992 The main issue was resolved, so I'm closing this.
let's take this to gitter or continue here if you prefer to handle the script's misses 馃檪

Was this page helpful?
0 / 5 - 0 ratings