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

refactor: move localization keep patterns where they are needed #960

Merged
merged 2 commits into from
Mar 4, 2022

Conversation

dhhyi
Copy link
Collaborator

@dhhyi dhhyi commented Dec 13, 2021

PR Type

[x] Refactoring (no functional changes, no API changes)

What Is the Current Behavior?

Localization keep patterns are managed in the cleanup script.

What Is the New Behavior?

Localization keep patterns are managed where they are defined. (with an annotation)

Does this PR Introduce a Breaking Change?

[ ] Yes
[x] No

Other Information

Hi @SGrueber @suschneider @MaxKless 😃

I think the .error. keep pattern in the scripts/clean-up-localizations.js is outdated. I see that all of the error feedback regarding payments comes from the API, there should be no need to keep those translation keys in the PWA (also because we now fetch specific keys directly from the ICM). Regarding anything not payment related? I'm not sure...

Please check if my assumption is correct.

In projects every uselessly translated localization is money 🤑

AB#72086

@dhhyi dhhyi added the refactoring Refactoring of current code label Dec 13, 2021
@dhhyi dhhyi force-pushed the refactor/remove-unused-translations-keys branch 2 times, most recently from b73b04a to ecaf713 Compare December 13, 2021 23:17
@dhhyi dhhyi added the community Community contributions label Dec 14, 2021
@MaxKless MaxKless assigned MaxKless and suschneider and unassigned MaxKless Dec 14, 2021
@Eisie96 Eisie96 added this to the 2.0 milestone Dec 14, 2021
@SGrueber SGrueber modified the milestones: 2.0, 2.1 Jan 31, 2022
@shauke shauke removed this from the 2.1 milestone Feb 28, 2022
@dhhyi dhhyi force-pushed the refactor/remove-unused-translations-keys branch from ecaf713 to 6fcd8a4 Compare February 28, 2022 11:46
@dhhyi
Copy link
Collaborator Author

dhhyi commented Feb 28, 2022

@shauke shauke added this to the 2.1 milestone Feb 28, 2022
@SGrueber
Copy link
Collaborator

The pattern /^subject.*/i is needed because in ICM versions lower than 7.10.38 the cost center admin is not allowed to read the list of users for the customer. In this case the translation key 'subject.has.no.permission.assigned' is used to show a corresponding error message on the cost center user assignment page. But the regular expression could be more specific

@dhhyi
Copy link
Collaborator Author

dhhyi commented Feb 28, 2022

But the regular expression could be more specific

So we can do it like this? 8f71726

@shauke shauke force-pushed the refactor/remove-unused-translations-keys branch from 3b9b6d6 to b8a340b Compare March 3, 2022 13:11
@shauke shauke merged commit 0d11adb into develop Mar 4, 2022
@shauke shauke deleted the refactor/remove-unused-translations-keys branch March 4, 2022 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contributions refactoring Refactoring of current code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants