mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 10:22:13 +08:00
ux: use localized text instead of hard-coded string annotated (#1305)
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user