mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-20 11:44:59 +00:00
ux: use localized text instead of hard-coded string annotated
(#1305)
This commit is contained in:
parent
afc8a772dd
commit
142ee5a327
2 changed files with 9 additions and 10 deletions
|
@ -29,14 +29,13 @@ namespace SourceGit.Commands
|
|||
continue;
|
||||
|
||||
var name = subs[0].Substring(10);
|
||||
var message = subs[5].Trim();
|
||||
tags.Add(new Models.Tag()
|
||||
{
|
||||
Name = name,
|
||||
IsAnnotated = subs[1].Equals("tag", StringComparison.Ordinal),
|
||||
SHA = string.IsNullOrEmpty(subs[3]) ? subs[2] : subs[3],
|
||||
CreatorDate = ulong.Parse(subs[4]),
|
||||
Message = string.IsNullOrEmpty(message) ? name : message,
|
||||
Message = subs[5].Trim(),
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -29,16 +29,16 @@
|
|||
<Border Height="24" Background="Transparent" PointerPressed="OnRowPointerPressed" DoubleTapped="OnDoubleTappedNode" ContextRequested="OnRowContextRequested" ToolTip.Tip="{Binding ToolTip}">
|
||||
<Border.DataTemplates>
|
||||
<DataTemplate DataType="vm:TagTreeNodeToolTip">
|
||||
<StackPanel Orientation="Vertical" MinWidth="200">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
|
||||
<StackPanel Orientation="Vertical" Spacing="6">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="10" Height="10" Data="{StaticResource Icons.Tag}"/>
|
||||
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Text="{Binding Name}"/>
|
||||
<Border Background="Green" Margin="4,0,0,0" CornerRadius="4" IsVisible="{Binding IsAnnotated}">
|
||||
<TextBlock Text="annotated" Classes="primary" Margin="4,0" Foreground="#FFDDDDDD"/>
|
||||
<TextBlock Text="{DynamicResource Text.CreateTag.Type.Annotated}" Classes="primary" Margin="4,0" Foreground="#FFDDDDDD"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Text="{Binding Message}"/>
|
||||
<TextBlock Text="{Binding Message}" IsVisible="{Binding Message, Converter={x:Static c:StringConverters.IsNotNullOrWhitespace}}"/>
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</Border.DataTemplates>
|
||||
|
@ -86,16 +86,16 @@
|
|||
<DataTemplate DataType="m:Tag">
|
||||
<Border Height="24" Background="Transparent" PointerPressed="OnRowPointerPressed" ContextRequested="OnRowContextRequested">
|
||||
<ToolTip.Tip>
|
||||
<StackPanel Orientation="Vertical" MinWidth="200">
|
||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,6">
|
||||
<StackPanel Orientation="Vertical" Spacing="6">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Path Width="10" Height="10" Data="{StaticResource Icons.Tag}"/>
|
||||
<TextBlock FontWeight="Bold" Margin="4,0,0,0" Text="{Binding Name}"/>
|
||||
<Border Background="Green" Margin="4,0,0,0" CornerRadius="4" IsVisible="{Binding IsAnnotated}">
|
||||
<TextBlock Text="annotated" Classes="primary" Margin="4,0" Foreground="#FFDDDDDD"/>
|
||||
<TextBlock Text="{DynamicResource Text.CreateTag.Type.Annotated}" Classes="primary" Margin="4,0" Foreground="#FFDDDDDD"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock Text="{Binding Message}"/>
|
||||
<TextBlock Text="{Binding Message}" IsVisible="{Binding Message, Converter={x:Static c:StringConverters.IsNotNullOrWhitespace}}"/>
|
||||
</StackPanel>
|
||||
</ToolTip.Tip>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue