Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 14, 2025

Problem

When running a website with Tag Manager installed, a warning appears in the Event Log:

Missing resources for culture en-US:
Kentico.Xperience.TagManager.Resources.TagManagerResources

This occurs because the library only registered localization resources for SystemContext.SYSTEM_CULTURE_NAME (which is "en"), but many Xperience installations run with the "en-US" culture. When Kentico's LocalizationDataProvider looks for resources in the en-US culture, it cannot find them and logs a warning.

Event Log Warning

Solution

This PR adds support for the en-US culture by:

  1. Creating TagManagerResources.en-US.resx - A culture-specific resource file containing the same localization strings as the default resource file
  2. Registering the en-US culture - Adding a second [assembly: RegisterLocalizationResource] attribute to inform Kentico's localization system that this resource supports en-US
  3. Ensuring resource compilation - Explicitly including .resx files in the project to generate the en-US satellite assembly (required because the Razor SDK project has EnableDefaultEmbeddedResourceItems disabled)

Technical Details

The .NET build system compiles TagManagerResources.en-US.resx into a satellite assembly (Kentico.Xperience.TagManager.resources.dll) placed in an en-US subfolder. When the application runs with en-US culture, Kentico's localization system can now find and load the appropriate resources, eliminating the warning.

Changes

  • Added src/Kentico.Xperience.TagManager/Resources/TagManagerResources.en-US.resx
  • Updated src/Kentico.Xperience.TagManager/Resources/TagManagerResources.cs to register en-US culture
  • Updated src/Kentico.Xperience.TagManager/Kentico.Xperience.TagManager.csproj to explicitly include resource files

Fixes #[issue_number]

Original prompt

This section details on the original issue you should resolve

<issue_title>Missing resources for en-US</issue_title>
<issue_description>Describe the bug
When booting up a website with tag manager installed, you get the warning message:

Missing resources for culture en-US:
Kentico.Xperience.TagManager.Resources.TagManagerResources

To Reproduce
Steps to reproduce the behavior:

  1. Launch website
  2. Go to Event Log module in the admin site
  3. See LocalizationDataProvider warning

Expected behavior
The warning should not appear.

Screenshots
Image

Library Version
4.2.2</issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #76


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Fix missing resources warning for culture en-US Fix missing resources for en-US culture Oct 14, 2025
Copilot AI requested a review from michalJakubis October 14, 2025 09:16
@michalJakubis michalJakubis marked this pull request as ready for review October 14, 2025 13:44
@michalJakubis michalJakubis requested a review from a team as a code owner October 14, 2025 13:44
@michalJakubis michalJakubis merged commit 4dd8435 into main Oct 14, 2025
1 check passed
@michalJakubis michalJakubis deleted the copilot/fix-missing-resources-en-us branch October 14, 2025 13:46
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

Successfully merging this pull request may close these issues.

Missing resources for en-US

2 participants