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

[WIP] EZP-29937: Content type names are not translated in the Create tab of UDW #121

Closed
wants to merge 2 commits into from

Conversation

sunpietro
Copy link
Contributor

@sunpietro sunpietro changed the title [WIPEZP-29937: Content type names are not translated in the Create tab of UDW [WIP] EZP-29937: Content type names are not translated in the Create tab of UDW Dec 19, 2018
@sunpietro sunpietro self-assigned this Dec 19, 2018
@sunpietro
Copy link
Contributor Author

It will require some backend done by @alongosz

@dew326
Copy link
Member

dew326 commented Dec 19, 2018

It seems like very complicated. Getting the preferred language, checking names in all languages, selecting the one from preferred.

In the AdminUiConfig we have the object with contentType.identifier and contentType.name, why this name cannot be translated by the backend? @alongosz

Copy link
Member

@dew326 dew326 left a comment

Choose a reason for hiding this comment

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

.

@sunpietro
Copy link
Contributor Author

@dew326 I didn't want to mess up with property values as they are used in other contexts

@dew326
Copy link
Member

dew326 commented Dec 19, 2018

Exactly, and all usage of this content type name should be translated.

@lserwatka
Copy link
Member

@dew326 is right, we should reuse this, or add a new key to this array with translated names.

@dew326
Copy link
Member

dew326 commented Dec 19, 2018

We do not need a new key. We want to all usage of name to be translated automatically.

@alongosz
Copy link
Member

Sorry I didn't see this specific config before. Indeed that seems like the cleanest way. AdminUI PR will be posted in a few minutes. Change of eZ.adminUiConfig.contentTypeNames is already working for me there.

@sunpietro
Copy link
Contributor Author

For displaying the content type items' names we're using contentTypes prop with the value of window.eZ.adminUiConfig.contentTypes. It's passed to the UniversalDiscoveryModule when initializing.

@dew326
Copy link
Member

dew326 commented Dec 19, 2018

I think we should change this in both eZ.adminUiConfig.contentTypeNames and eZ.adminUiConfig.contentTypes.

@sunpietro
Copy link
Contributor Author

Ok, looks like this PR is irrelevant as no changes are required on the frontend side. Right @dew326 and @alongosz ?

@alongosz
Copy link
Member

Yes, it can be closed.

@sunpietro sunpietro closed this Dec 19, 2018
@sunpietro sunpietro deleted the ezp-29937-fix-content-type-names branch December 19, 2018 15:08
@andrerom
Copy link

I think we should change this in both eZ.adminUiConfig.contentTypeNames and eZ.adminUiConfig.contentTypes

@dew326 be aware these could be combined to one to avoid loading all content types twice on every request

@dew326
Copy link
Member

dew326 commented Dec 21, 2018

@andrerom Yes, I know. We keep it in two because of the BC.

@andrerom
Copy link

@dew326 well we could find a way to set both js params based on same source data to avoid the extra load, or?

@sunpietro
Copy link
Contributor Author

@andrerom are you aware this PR is closed?

@andrerom
Copy link

andrerom commented Dec 21, 2018

@sunpietro Fully, just like to taunt you ;)

But ok, I'll move the discussion to Slack ;)

@dew326
Copy link
Member

dew326 commented Dec 21, 2018

@andrerom probably, we have to ask backend guys as this config is set there.

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

Successfully merging this pull request may close these issues.

5 participants