dotnet / dotnet/project-system

Property page .xaml rule files do not support static resources for localization

Open
#7,522 12 comments 0 reactions 2 assignees Claimed by @tmeschter View on GitHub
Feature-Project-Properties-Designer Tenet-Localization Triage-Investigate
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

**Visual Studio Version**:
Microsoft Visual Studio Enterprise 2022 d17.0 (64-bit)
Version 17.0.0 Preview 3.1 [31616.260.d17.0]

**Summary**:
When authoring a property page .xaml rules file, we are not able to reference static resources to be used for property fields such as `Display Name` or `Description`.

**Steps to Reproduce**:

1. Create a property page .xaml rule file by following [this documentation](https://github.com/dotnet/project-system/blob/main/docs/repo/property-pages/how-to-add-a-new-project-property-page.md).

2. Create a Resources.resx file and add a string to the file, e.g. Test -> test.

3. Add the xaml namespace that corresponds to the resources file in your rule file.
![image](https://user-images.githubusercontent.com/59936622/131035136-6a477869-16df-4f81-824e-dd52a76b3388.png)

4. Add a property to the rule file with a display name that references the resources file using the static handler.
![image](https://user-images.githubusercontent.com/59936622/131035749-98c19188-6641-4c89-a59c-40725ef8364f.png)

**Expected Behavior**:
The page is loaded and the property displays the value from the resources file.

**Actual Behavior**:
The page does not get loaded in the Properties editor.

**User Impact**:
We are not able to use our existing resource files to localize the new property pages. The only alternative is to use [xliff-tasks](https://github.com/dotnet/xliff-tasks) which looks complicated to set up in a repository which already has an existing localization system. Furthermore, it would be wasteful to go through the process of setting up xliff-tasks only to switch back to using resource files once they are supported.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.