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

Document Type Localization does not work in v14 and user defined language files #16813

Closed
bassemelkadeem opened this issue Jul 23, 2024 · 11 comments · Fixed by umbraco/Umbraco.CMS.Backoffice#2154

Comments

@bassemelkadeem
Copy link

bassemelkadeem commented Jul 23, 2024

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

14.1.1

Bug summary

when creating a localization file for document type and make a user defined language it does not reflect it backoffice

Specifics

1
2
3
4

Steps to reproduce

follow the steps in the documentation link
https://docs.umbraco.com/umbraco-cms/fundamentals/data/defining-content/document-type-localization

Expected result / actual result

expected result is that document types must appear in user defined language


This item has been added to our backlog AB#42553

Copy link

Hi there @bassemelkadeem!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@iOvergaard
Copy link
Contributor

iOvergaard commented Jul 25, 2024

Hello, @bassemelkadeem. In V14 there are some things to be aware of to translate the Backoffice UI. Please have a look at this article in the documentation to register your language files as the former "user defined languages" no longer flows out to the Backoffice UI: https://docs.umbraco.com/umbraco-cms/extending/language-files/ui-localization

That being said, you have indeed discovered a missing feature seeing, that we cannot currently replace localization keys on document types. That is something we intend to fix.

@bassemelkadeem
Copy link
Author

bassemelkadeem commented Aug 21, 2024

Still the description for the property is not display in a correct way.

image
image
image

@EddieDemon
Copy link

EddieDemon commented Aug 26, 2024

Edit: It is received. Sent through /umbraco/management/api/v1/dictionary. It seems that the Dictionary is not appended to the result of the manifest.

Original: The manifest is not built completely, or at least it does not contain custom localizations. Localization is received by calling manifest-[...].js e.g. /umbraco/backoffice/c50[...]/packages/core/en-[...].js This file does not contain the custom translations.

This does not seem to be a BackOffice issue, unless these is a separate API that should have been called.~~

@leekelleher
Copy link
Member

@bassemelkadeem Since adding support for markdown in property descriptions, the syntax to display localizations would be using the curly-brackets, e.g. {#properties_pageTitleDesc}.

@iOvergaard
Copy link
Contributor

To extend on @leekelleher's comment, I have submitted a pull request to the docs to add a section explaining the link between adding custom localization keys and applying them to property descriptions: umbraco/UmbracoDocs#6376

@EddieDemon
Copy link

@bassemelkadeem Since adding support for markdown in property descriptions, the syntax to display localizations would be using the curly-brackets, e.g. {#properties_pageTitleDesc}.

It does not seem that that is what the code is doing.

@leekelleher
Copy link
Member

It does not seem that that is what the code is doing.

@EddieDemon The processing for the Umbraco-Flavored Markdown is happening elsewhere. For property descriptions, the markdown is processed and the curly brackets are parsed; so for the localization component, a # marker is detected, this will then render a <umb-localize> component, (which does use the UmbLocalizationController.term() code, but the curly brackets and hash marker have been parsed out by that stage).

@EddieDemon
Copy link

@leekelleher I feel I'm not really following. The text is put through localization regardless of the brackets:

With curly-bracket
afbeelding
afbeelding

Without curly-bracket
afbeelding
afbeelding

Both instances yield the input string as result.
afbeelding

The UI Localization documentation that @iOvergaard changed mentions adding a plugin in which the localization is performed. This is another document than the author/I used to create the same(?) outcome.

@robgha01
Copy link

robgha01 commented Nov 4, 2024

we are trying to do this with normal properties and property desctiptions before we could do this using #somekey and then create a dictionary for it to work but right now i feel like this functionality is removed and no longer works the umf only works in grid not in normal property places or am i wrong we cant get it to work and we did look at the documentation.

@iOvergaard
Copy link
Contributor

@robgha01 You can render localization keys in the property title and description fields. The Backoffice Localization article explains how to add custom localization keys or use existing ones in the code. At the bottom of the article, there is a section about "Using localization in property descriptions and labels".

In summary, you add a localization key to the language files and render it in a property like this: {#area_key}. You can test it out with one of the built-in keys {#general_ok}.

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

Successfully merging a pull request may close this issue.

5 participants