File tree Expand file tree Collapse file tree 6 files changed +22
-5
lines changed
Expand file tree Collapse file tree 6 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -62,8 +62,7 @@ async function calculateTranslationRate() {
6262
6363 // Add an empty line before the first x:String
6464 xmlStr = xmlStr . replace ( ' <x:String' , '\n <x:String' ) ;
65-
66- await fs . writeFile ( filePath , xmlStr , 'utf8' ) ;
65+ await fs . writeFile ( filePath , xmlStr + '\n' , 'utf8' ) ;
6766
6867 if ( missingKeys . length > 0 ) {
6968 const progress = ( ( enUSKeys . size - missingKeys . length ) / enUSKeys . size ) * 100 ;
Original file line number Diff line number Diff line change 699699 <x : String x : Key =" Text.UpdateSubmodules.UseRemote" xml : space =" preserve" >Use --remote option</x : String >
700700 <x : String x : Key =" Text.URL" xml : space =" preserve" >URL:</x : String >
701701 <x : String x : Key =" Text.ViewLogs" xml : space =" preserve" >Logs</x : String >
702+ <x : String x : Key =" Text.ViewLogs.Clear" xml : space =" preserve" >CLEAR ALL</x : String >
702703 <x : String x : Key =" Text.Warn" xml : space =" preserve" >Warning</x : String >
703704 <x : String x : Key =" Text.Welcome" xml : space =" preserve" >Welcome Page</x : String >
704705 <x : String x : Key =" Text.Welcome.AddRootFolder" xml : space =" preserve" >Create Group</x : String >
Original file line number Diff line number Diff line change 703703 <x : String x : Key =" Text.UpdateSubmodules.UseRemote" xml : space =" preserve" >启用 '--remote'</x : String >
704704 <x : String x : Key =" Text.URL" xml : space =" preserve" >仓库地址 :</x : String >
705705 <x : String x : Key =" Text.ViewLogs" xml : space =" preserve" >日志列表</x : String >
706+ <x : String x : Key =" Text.ViewLogs.Clear" xml : space =" preserve" >清空日志</x : String >
706707 <x : String x : Key =" Text.Warn" xml : space =" preserve" >警告</x : String >
707708 <x : String x : Key =" Text.Welcome" xml : space =" preserve" >起始页</x : String >
708709 <x : String x : Key =" Text.Welcome.AddRootFolder" xml : space =" preserve" >新建分组</x : String >
759760 <x : String x : Key =" Text.Worktree.Lock" xml : space =" preserve" >锁定工作树</x : String >
760761 <x : String x : Key =" Text.Worktree.Remove" xml : space =" preserve" >移除工作树</x : String >
761762 <x : String x : Key =" Text.Worktree.Unlock" xml : space =" preserve" >解除工作树锁定</x : String >
762- </ResourceDictionary >
763+ </ResourceDictionary >
Original file line number Diff line number Diff line change 703703 <x : String x : Key =" Text.UpdateSubmodules.UseRemote" xml : space =" preserve" >啟用 [--remote] 選項</x : String >
704704 <x : String x : Key =" Text.URL" xml : space =" preserve" >存放庫網址:</x : String >
705705 <x : String x : Key =" Text.ViewLogs" xml : space =" preserve" >日誌清單</x : String >
706+ <x : String x : Key =" Text.ViewLogs.Clear" xml : space =" preserve" >清除所有日誌</x : String >
706707 <x : String x : Key =" Text.Warn" xml : space =" preserve" >警告</x : String >
707708 <x : String x : Key =" Text.Welcome" xml : space =" preserve" >起始頁</x : String >
708709 <x : String x : Key =" Text.Welcome.AddRootFolder" xml : space =" preserve" >新增群組</x : String >
759760 <x : String x : Key =" Text.Worktree.Lock" xml : space =" preserve" >鎖定工作區</x : String >
760761 <x : String x : Key =" Text.Worktree.Remove" xml : space =" preserve" >移除工作區</x : String >
761762 <x : String x : Key =" Text.Worktree.Unlock" xml : space =" preserve" >解除鎖定工作區</x : String >
762- </ResourceDictionary >
763+ </ResourceDictionary >
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ public ViewLogs(Repository repo)
2121 _repo = repo ;
2222 }
2323
24+ public void ClearAll ( )
25+ {
26+ SelectedLog = null ;
27+ Logs . Clear ( ) ;
28+ }
29+
2430 private Repository _repo = null ;
2531 private CommandLog _selectedLog = null ;
2632 }
Original file line number Diff line number Diff line change 44 xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
55 xmlns : vm =" using:SourceGit.ViewModels"
66 xmlns : v =" using:SourceGit.Views"
7+ xmlns : c =" using:SourceGit.Converters"
78 mc : Ignorable =" d" d : DesignWidth =" 800" d : DesignHeight =" 450"
89 x : Class =" SourceGit.Views.ViewLogs"
910 x : DataType =" vm:ViewLogs"
1314 Width =" 800" Height =" 500"
1415 CanResize =" False"
1516 WindowStartupLocation =" CenterOwner" >
16- <Grid RowDefinitions =" Auto,*" >
17+ <Grid RowDefinitions =" Auto,*,Auto " >
1718 <!-- TitleBar -->
1819 <Grid Grid.Row=" 0" Height =" 28" IsVisible =" {Binding !#ThisControl.UseSystemWindowFrame}" >
1920 <Border Background =" {DynamicResource Brush.TitleBar}"
108109 FontFamily =" {DynamicResource Fonts.Monospace}" />
109110 </Border >
110111 </Grid >
112+
113+ <Grid Grid.Row=" 2" Margin =" 0,0,0,8" >
114+ <Button Classes =" flat primary"
115+ Content =" {DynamicResource Text.ViewLogs.Clear}"
116+ HorizontalAlignment =" Center"
117+ Command =" {Binding ClearAll}"
118+ IsEnabled =" {Binding Logs.Count, Converter={x:Static c:IntConverters.IsGreaterThanZero}}" />
119+ </Grid >
111120 </Grid >
112121</v : ChromelessWindow >
You can’t perform that action at this time.
0 commit comments