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

UI language files localization not working on document type property description #6811

Open
Luuk1983 opened this issue Jan 21, 2025 · 4 comments
Assignees
Labels
category/missing-documentation category/umbraco-cms state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks

Comments

@Luuk1983
Copy link

Luuk1983 commented Jan 21, 2025

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

15.1.1

Bug summary

I added translations for a number or properties that are placed on a composition. These are translations for the name and description of the property. The names of the properties get translated as expected, but the description doesn't get translated at all.

Specifics

I have to following translations (revised for easier reading):

export default {
	dashboardTabs: {
		websiteCreationDashboard: "ProudNerds admin panel"
	},
	headlessBaseContentTypes: {
		sitemapCompositionPropertyHideFromSitemapName: "Hide from sitemap",
		sitemapCompositionPropertyHideFromSitemapDescription: "If checked, the page will not be shown on the sitemap. This makes the page harder for search engines to index.",
		sitemapCompositionPropertyHideFromSitemapRequired: "Please select if this page should be hidden from the sitemap",
		sitemapCompositionPropertyRelativePriorityName: "Relative priority",
		sitemapCompositionPropertyRelativePriorityDescription: "Determines how relevant this page is compared to other pages on the site.",
		sitemapCompositionPropertyRelativePriorityRequired: "Please select a relative priority",
		sitemapCompositionPropertyChangeFrequencyName: "Change frequency",
		sitemapCompositionPropertyChangeFrequencyDescription: "Determines how often the content of this page changes. This will give search engines a hint on how often to (re)index the page.",
		sitemapCompositionPropertyChangeFrequencyRequired: "Please select how often the content of this page will change",
	}
};

They are registered correctly in my Umbraco package json file:

{
	"$schema": "../../umbraco-package-schema.json",
	"id": "ProudNerds.Umbraco.Core",
	"name": "Umbraco Core Content",
	"version": "4.0.0",
	"extensions": [
		{
			"name": "Umbraco Core",
			"alias": "ProudNerds.Umbraco.Core",
			"type": "bundle",
			"js": "/App_Plugins/CoreContent/umbraco-core.js"
		},
		{
			"type": "localization",
			"alias": "ProudNerds.Umbraco.Core.Localize.EnUS",
			"name": "English",
			"meta": {
				"culture": "en-US"
			},
			"js": "/App_Plugins/CoreContent/localization/en-US.js"
		},
		{
			"type": "localization",
			"alias": "ProudNerds.Umbraco.Core.Localize.NlNl",
			"name": "Dutch",
			"meta": {
				"culture": "nl-NL"
			},
			"js": "/App_Plugins/CoreContent/localization/nl-NL.js"
		}
	]
}

I have a Sitemap composition that uses these keys as the name and as the description of the properties in the Sitemap:
Image

When using the composition, the title translates very well between en-US and nl-NL. However, the description is never translated and only shows the key:

en-US:
Image

nl-NL:
Image

I copied and pasted the keys I used in Umbraco and the localization file into a text document to make sure I didn't have any typos.

Steps to reproduce

I think the 'Specifics' section explains enough :)

Expected result / actual result

I ofcourse expect the description to also be translated correctly using the keys.


This item has been added to our backlog AB#48113

Copy link

Hi there @Luuk1983!

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 🤖 🙂

@leekelleher leekelleher self-assigned this Jan 21, 2025
@leekelleher
Copy link
Member

@Luuk1983 Thank you for reporting this. There is definitely a gap in our documentation for Document Type Localizations. We'll look to get this updated soon.

In the meantime, the property descriptions use Umbraco Flavored Markdown (UFM) to render. You can use the localize UFM syntax to show the translated descriptions, by wrapping what you already have with curly braces, e.g. {#headlessBaseContentTypes_sitemapCompositionPropertyHideFromSitemapDescription}.

@leekelleher leekelleher added the state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks label Jan 21, 2025
@Luuk1983
Copy link
Author

Luuk1983 commented Jan 21, 2025

Thank you for your response, this worked! :) I appreciate all the help and I understand the effort that goed into writing good documentation. Having sad that, the Umbraco 15 documentation is not in a good place. I'm working on 15 for the first time and upgrading a lot of things from Umbraco 13 to 15, so most things are new to me. There are so many inconsistencies, dead links and stuff that is outright no longer present in 15 in the documentation. At least this is a step in the right direction :)

@iOvergaard
Copy link
Contributor

Moved this to UmbracoDocs as the "fix" will be about updating a docs article :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/missing-documentation category/umbraco-cms state/sprint-candidate We're trying to get this in a sprint at HQ in the next few weeks
Projects
None yet
Development

No branches or pull requests

3 participants