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 i18n extract #233

Merged
merged 2 commits into from
Feb 24, 2022
Merged

Fix i18n extract #233

merged 2 commits into from
Feb 24, 2022

Conversation

tkohr
Copy link
Collaborator

@tkohr tkohr commented Feb 24, 2022

PR temporarily installs another fork of ngx-translate-export to solve Angular 13 compatibility.

Tested running npm run i18n:extract with translations in HTML templates and marker translations.

see issue/PR:

Note that prettier HTML formatting has changed with version 2.5.0, which explains the HTML modifications in this PR.

@github-actions
Copy link
Contributor

Copy link
Collaborator

@jahow jahow left a comment

Choose a reason for hiding this comment

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

good enough, hopefully we can go back to the original package soon

@tkohr tkohr merged commit ac79c6a into master Feb 24, 2022
@tkohr tkohr deleted the fix-i18n-extract branch February 24, 2022 15:42
opacity-25
capitalize
"
class="items-center justify-center px-2 py-1 bg-primary text-white rounded opacity-25 capitalize"
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why we have such changes...
Prettier or npm run format should guarantee to always have the correct indentation.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Prettier has changed its strategy for html formatting with version 2.5 (https://prettier.io/blog/2021/11/25/2.5.0.html#collapse-html-class-attributes-onto-one-line-11827httpsgithubcomprettierprettierpull11827-by-jlongsterhttpsgithubcomjlongster), and does not wrap lines > printWidth anymore. I didn't see another param to conserve the old behavior, which might not make sense anyway, since this evolution.

Copy link
Member

Choose a reason for hiding this comment

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

Yes but i wonder why all those changes were not automatic and mandatory for the CI when angular and prettier were updated.

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's because prettier is only run on affected libraries and apps, so the new formatting strategy has not been applied everywhere but will be gradually. I guess it would be preferable to have all HTML reformatted correctly to avoid confusing diffs in the future.

Copy link
Member

Choose a reason for hiding this comment

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

yes, at some point we should run test, lint and format on all sources to avoid having broken stuff while didn't change anything about them.
We should add npm scripts for that IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants