Skip to content

Commit bbac6c1

Browse files
committed
code_review: PR #673
* add translations for zh_CN and zh_TW * hide `CHILDREN` line if it is empty Signed-off-by: leo <[email protected]>
1 parent 055835c commit bbac6c1

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/Resources/Locales/zh_CN.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
<x:String x:Key="Text.CommitDetail.Info" xml:space="preserve">基本信息</x:String>
129129
<x:String x:Key="Text.CommitDetail.Info.Author" xml:space="preserve">修改者</x:String>
130130
<x:String x:Key="Text.CommitDetail.Info.Changed" xml:space="preserve">变更列表</x:String>
131+
<x:String x:Key="Text.CommitDetail.Info.Children" xml:space="preserve">子提交</x:String>
131132
<x:String x:Key="Text.CommitDetail.Info.Committer" xml:space="preserve">提交者</x:String>
132133
<x:String x:Key="Text.CommitDetail.Info.ContainsIn" xml:space="preserve">查看包含此提交的分支/标签</x:String>
133134
<x:String x:Key="Text.CommitDetail.Info.ContainsIn.Title" xml:space="preserve">本提交已被以下分支/标签包含</x:String>

src/Resources/Locales/zh_TW.axaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
<x:String x:Key="Text.CommitDetail.Info" xml:space="preserve">基本資訊</x:String>
129129
<x:String x:Key="Text.CommitDetail.Info.Author" xml:space="preserve">作者</x:String>
130130
<x:String x:Key="Text.CommitDetail.Info.Changed" xml:space="preserve">變更列表</x:String>
131+
<x:String x:Key="Text.CommitDetail.Info.Children" xml:space="preserve">子提交</x:String>
131132
<x:String x:Key="Text.CommitDetail.Info.Committer" xml:space="preserve">提交者</x:String>
132133
<x:String x:Key="Text.CommitDetail.Info.ContainsIn" xml:space="preserve">檢視包含此提交的分支或標籤</x:String>
133134
<x:String x:Key="Text.CommitDetail.Info.ContainsIn.Title" xml:space="preserve">本提交包含於以下分支或標籤</x:String>

src/Views/CommitBaseInfo.axaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,14 @@
123123
</ItemsControl>
124124

125125
<!-- CHILDREN -->
126-
<TextBlock Grid.Row="2" Grid.Column="0" Classes="info_label" Text="{DynamicResource Text.CommitDetail.Info.Children}"/>
127-
<ItemsControl Grid.Row="2" Grid.Column="1" Height="24" Margin="12,0,0,0" ItemsSource="{Binding #ThisControl.Children}" IsVisible="{Binding #ThisControl.Children.Count, Converter={x:Static c:IntConverters.IsGreaterThanZero}}">
126+
<TextBlock Grid.Row="2" Grid.Column="0"
127+
Classes="info_label"
128+
Text="{DynamicResource Text.CommitDetail.Info.Children}"
129+
IsVisible="{Binding #ThisControl.Children.Count, Converter={x:Static c:IntConverters.IsGreaterThanZero}}"/>
130+
<ItemsControl Grid.Row="2" Grid.Column="1"
131+
Height="24" Margin="12,0,0,0"
132+
ItemsSource="{Binding #ThisControl.Children}"
133+
IsVisible="{Binding #ThisControl.Children.Count, Converter={x:Static c:IntConverters.IsGreaterThanZero}}">
128134
<ItemsControl.ItemsPanel>
129135
<ItemsPanelTemplate>
130136
<StackPanel Orientation="Horizontal" VerticalAlignment="Center"/>

0 commit comments

Comments
 (0)