neos-ui
neos-ui copied to clipboard
TASK: Refactor Validator translations to Neos.Neos.Ui package
What I did
I added the translations of our validators from the Neos.Neos package directly too the Neos.Neos.Ui package.
How I did it
Moved the translations over, and adjusted the Validator Components to load the correct translations.
How to verify it
Checkout this PR in combination with: https://github.com/neos/neos-development-collection/pull/4493
and add a Validator to your NodeType. You should see, that the translation is still working.
There is a failing unit test caused by this change (see the end of the console output):
Summary of all failing tests
FAIL packages/neos-ui-validators/src/Count/index.spec.js
● [1, 2, 3, 4] should result in an error message for min: 1 max: 3
expect(received).toEqual(expected) // deep equality
- Expected - 0
+ Received + 2
Object {
"id": "content.inspector.validators.countValidator.countBetween",
+ "packageKey": "Neos.Neos.Ui",
"params": Object {
"maximum": 3,
"minimum": 1,
},
+ "sourceName": "Main",
}
at Object.<anonymous> (packages/neos-ui-validators/src/Count/<stdin>:66:26)
Test Suites: 1 failed, 134 passed, 135 total
Tests: 1 failed, 708 passed, 709 total
Snapshots: 50 passed, 50 total
Time: 140.399 s
Ran all test suites.
Now e2e are failing 😅
Well thats why they dont work yet ^^ (see 9.0 branch) #3546
Ahh i see :) So this PR should be fine then.
ill give you my approval after we have merged the e2e ;) maybe they also cover the labels somewhere ^^
@crydotsnake you can now rebase this pr or merge master and the tests should be green ;)
Green light ;) @mhsdesign
FYI found this issue which might be solved https://github.com/neos/neos-ui/issues/2421