Skip to content

Commit

Permalink
Merge pull request #2 from AndrewKeepCoding/1-hyperlink-does-not-get-…
Browse files Browse the repository at this point in the history
…localized-when-it-has-default-content

Fix Hyperlink not being localized when it has content already
  • Loading branch information
AndrewKeepCoding authored Jan 31, 2023
2 parents 54ea7d1 + dc68116 commit 62b2816
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 3 additions & 3 deletions WinUI3Localizer/LocalizationActions.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Documents;
using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -30,15 +30,15 @@ public record ActionItem(Type TargetType, Action<ActionArguments> Action);
}),
new ActionItem(typeof(Bold), arguments =>
{
if (arguments.DependencyObject is Hyperlink target && target.Inlines.Count is 0)
if (arguments.DependencyObject is Hyperlink target)
{
target.Inlines.Clear();
target.Inlines.Add(new Run() { Text = arguments.Value });
}
}),
new ActionItem(typeof(Hyperlink), arguments =>
{
if (arguments.DependencyObject is Hyperlink target && target.Inlines.Count is 0)
if (arguments.DependencyObject is Hyperlink target)
{
target.Inlines.Clear();
target.Inlines.Add(new Run() { Text = arguments.Value });
Expand Down
6 changes: 6 additions & 0 deletions WinUI3Localizer/WinUI3Localizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<Product>WinUI3Localizer</Product>
<Copyright>Copyright (c) Andrew KeepCoding 2023</Copyright>
<Authors>Andrew KeepCoding</Authors>
<PackageReadMeFile>README.md</PackageReadMeFile>
</PropertyGroup>

<ItemGroup>
Expand All @@ -37,7 +38,12 @@
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
</ItemGroup>

<ItemGroup>
<None Include="..\README.md" Pack="true" PackagePath="\" />
</ItemGroup>

<ItemGroup>
<InternalsVisibleTo Include="$(AssemblyName).Tests" />
</ItemGroup>

</Project>

0 comments on commit 62b2816

Please sign in to comment.