Skip to content

Commit 2f16490

Browse files
Separate the Uid using the first "." instead of the last one
For example, the Uid of "SomeButton.ToolTipService.Tooltip" should be "SomeButton".
1 parent c93ba39 commit 2f16490

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

WinUI3Localizer/LocalizerBuilder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ private static LanguageDictionary CreateLanguageDictionaryFromStringResourceItem
170170
private static LanguageDictionary.Item CreateLanguageDictionaryItem(StringResourceItem stringResourceItem)
171171
{
172172
string name = stringResourceItem.Name;
173-
(string Uid, string DependencyPropertyName) = name.LastIndexOf(".") is int lastSeparatorIndex && lastSeparatorIndex > 1
174-
? (name[..lastSeparatorIndex], string.Concat(name.AsSpan(lastSeparatorIndex + 1), "Property"))
173+
(string Uid, string DependencyPropertyName) = name.IndexOf(".") is int firstSeparatorIndex && firstSeparatorIndex > 1
174+
? (name[..firstSeparatorIndex], string.Concat(name.AsSpan(firstSeparatorIndex + 1), "Property"))
175175
: (name, string.Empty);
176176
return new LanguageDictionary.Item(
177177
Uid,

0 commit comments

Comments
 (0)