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

Node creation dialog element labels translation not working #1539

Closed
DrillSergeant opened this issue Jan 17, 2018 · 3 comments
Closed

Node creation dialog element labels translation not working #1539

DrillSergeant opened this issue Jan 17, 2018 · 3 comments

Comments

@DrillSergeant
Copy link

Seems labels with value "i18n" are not translated. Instead "i18n" is used as a fixed value.

Steps to reproduce:

  • Add configuration to a node that adds an element to the node creation dialog:

    creationDialog:
      elements:
        date:
          type: DateTime
          ui:
            label: i18n
            editor: 'Neos.Neos/Inspector/Editors/DateTimeEditor'
            editorOptions:
              format: 'd.m.Y'
  • Create a node (of the type you just added the creation dialog element for)

Expected result:
I see the element in the dialog with a translated label (or at least the i18n-key as fallback if no translation exists yet.

Actual result:
The string "i18n" is used as label:
image

@lorenzulrich
Copy link
Contributor

lorenzulrich commented Jan 28, 2018

Just to let everyone know: I'm currently working on this. Most of it needs to be adapted inside neos/neos.

lorenzulrich added a commit to lorenzulrich/neos-ui that referenced this issue Jan 29, 2018
Depends on a change for neos/neos-development-collection

Fixes: neos#1539
@lorenzulrich
Copy link
Contributor

I added this functionality for the label of the creationDialog elements. I'm not sure if the syntax inside the XLF file is OK, e.g. creationDialog.title. I think it's not too bad because it follows the known pattern properties.foo, groups.bar etc.. In contrast to creationDialog, they are in plural form, so an alternative - which is a little clumsy IMO - would be creationDialogElements.

@lorenzulrich
Copy link
Contributor

At the same time and as an example I made the title property of the default Document node type make use of the i18n functionality. I intentionally used Title instead of Node title because in the inspector of a page, the property is also named Title.

neos-bot pushed a commit to neos/neos that referenced this issue Feb 13, 2018
In the same time, the "Title" label for a new Document node is
added to the language files. The creationDialog configuration
for this node type is inside Neos.Neos.Ui.

Fixes: neos/neos-ui#1539
mhsdesign added a commit that referenced this issue Mar 1, 2024
The declaration `showInCreationDialog` was copied over from Neos.Neos
and the explicit configuration of `creationDialog.elements.title` is obsolete.

The explicit declaration of ui.label: i18n would lead to `Neos.Neos:NodeTypes.Document:creationDialog.title` instead of `Neos.Neos:NodeTypes.Document:properties.title` being used.
That made it hard to set a simple title as the translation was more eager. Resolves #3509

The previously used creationDialog translation is now obsolete (resided in Neos.Neos)

See also #1539
mhsdesign added a commit that referenced this issue Mar 2, 2024
The declaration `showInCreationDialog` was copied over from Neos.Neos
and the explicit configuration of `creationDialog.elements.title` is obsolete.

The explicit declaration of ui.label: i18n would lead to `Neos.Neos:NodeTypes.Document:creationDialog.title` instead of `Neos.Neos:NodeTypes.Document:properties.title` being used.
That made it hard to set a simple title as the translation was more eager. Resolves #3509

The previously used creationDialog translation is now obsolete (resided in Neos.Neos)

See also #1539
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

No branches or pull requests

2 participants