neos-ui icon indicating copy to clipboard operation
neos-ui copied to clipboard

TASK: Refactor Validator translations to Neos.Neos.Ui package

Open crydotsnake opened this issue 2 years ago • 9 comments

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.

crydotsnake avatar Sep 08 '23 23:09 crydotsnake

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.

mhsdesign avatar Sep 09 '23 13:09 mhsdesign

Now e2e are failing 😅

crydotsnake avatar Sep 10 '23 11:09 crydotsnake

Well thats why they dont work yet ^^ (see 9.0 branch) #3546

mhsdesign avatar Sep 10 '23 12:09 mhsdesign

Ahh i see :) So this PR should be fine then.

crydotsnake avatar Sep 11 '23 14:09 crydotsnake

ill give you my approval after we have merged the e2e ;) maybe they also cover the labels somewhere ^^

mhsdesign avatar Sep 21 '23 10:09 mhsdesign

@crydotsnake you can now rebase this pr or merge master and the tests should be green ;)

mhsdesign avatar Sep 23 '23 07:09 mhsdesign

Green light ;) @mhsdesign

crydotsnake avatar Sep 23 '23 13:09 crydotsnake

FYI found this issue which might be solved https://github.com/neos/neos-ui/issues/2421

mhsdesign avatar Jan 13 '24 18:01 mhsdesign