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() {
62
62
63
63
// Add an empty line before the first x:String
64
64
xmlStr = xmlStr . replace ( ' <x:String' , '\n <x:String' ) ;
65
-
66
- await fs . writeFile ( filePath , xmlStr , 'utf8' ) ;
65
+ await fs . writeFile ( filePath , xmlStr + '\n' , 'utf8' ) ;
67
66
68
67
if ( missingKeys . length > 0 ) {
69
68
const progress = ( ( enUSKeys . size - missingKeys . length ) / enUSKeys . size ) * 100 ;
Original file line number Diff line number Diff line change 699
699
<x : String x : Key =" Text.UpdateSubmodules.UseRemote" xml : space =" preserve" >Use --remote option</x : String >
700
700
<x : String x : Key =" Text.URL" xml : space =" preserve" >URL:</x : String >
701
701
<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 >
702
703
<x : String x : Key =" Text.Warn" xml : space =" preserve" >Warning</x : String >
703
704
<x : String x : Key =" Text.Welcome" xml : space =" preserve" >Welcome Page</x : String >
704
705
<x : String x : Key =" Text.Welcome.AddRootFolder" xml : space =" preserve" >Create Group</x : String >
Original file line number Diff line number Diff line change 703
703
<x : String x : Key =" Text.UpdateSubmodules.UseRemote" xml : space =" preserve" >启用 '--remote'</x : String >
704
704
<x : String x : Key =" Text.URL" xml : space =" preserve" >仓库地址 :</x : String >
705
705
<x : String x : Key =" Text.ViewLogs" xml : space =" preserve" >日志列表</x : String >
706
+ <x : String x : Key =" Text.ViewLogs.Clear" xml : space =" preserve" >清空日志</x : String >
706
707
<x : String x : Key =" Text.Warn" xml : space =" preserve" >警告</x : String >
707
708
<x : String x : Key =" Text.Welcome" xml : space =" preserve" >起始页</x : String >
708
709
<x : String x : Key =" Text.Welcome.AddRootFolder" xml : space =" preserve" >新建分组</x : String >
759
760
<x : String x : Key =" Text.Worktree.Lock" xml : space =" preserve" >锁定工作树</x : String >
760
761
<x : String x : Key =" Text.Worktree.Remove" xml : space =" preserve" >移除工作树</x : String >
761
762
<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 703
703
<x : String x : Key =" Text.UpdateSubmodules.UseRemote" xml : space =" preserve" >啟用 [--remote] 選項</x : String >
704
704
<x : String x : Key =" Text.URL" xml : space =" preserve" >存放庫網址:</x : String >
705
705
<x : String x : Key =" Text.ViewLogs" xml : space =" preserve" >日誌清單</x : String >
706
+ <x : String x : Key =" Text.ViewLogs.Clear" xml : space =" preserve" >清除所有日誌</x : String >
706
707
<x : String x : Key =" Text.Warn" xml : space =" preserve" >警告</x : String >
707
708
<x : String x : Key =" Text.Welcome" xml : space =" preserve" >起始頁</x : String >
708
709
<x : String x : Key =" Text.Welcome.AddRootFolder" xml : space =" preserve" >新增群組</x : String >
759
760
<x : String x : Key =" Text.Worktree.Lock" xml : space =" preserve" >鎖定工作區</x : String >
760
761
<x : String x : Key =" Text.Worktree.Remove" xml : space =" preserve" >移除工作區</x : String >
761
762
<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)
21
21
_repo = repo ;
22
22
}
23
23
24
+ public void ClearAll ( )
25
+ {
26
+ SelectedLog = null ;
27
+ Logs . Clear ( ) ;
28
+ }
29
+
24
30
private Repository _repo = null ;
25
31
private CommandLog _selectedLog = null ;
26
32
}
Original file line number Diff line number Diff line change 4
4
xmlns : mc =" http://schemas.openxmlformats.org/markup-compatibility/2006"
5
5
xmlns : vm =" using:SourceGit.ViewModels"
6
6
xmlns : v =" using:SourceGit.Views"
7
+ xmlns : c =" using:SourceGit.Converters"
7
8
mc : Ignorable =" d" d : DesignWidth =" 800" d : DesignHeight =" 450"
8
9
x : Class =" SourceGit.Views.ViewLogs"
9
10
x : DataType =" vm:ViewLogs"
13
14
Width =" 800" Height =" 500"
14
15
CanResize =" False"
15
16
WindowStartupLocation =" CenterOwner" >
16
- <Grid RowDefinitions =" Auto,*" >
17
+ <Grid RowDefinitions =" Auto,*,Auto " >
17
18
<!-- TitleBar -->
18
19
<Grid Grid.Row=" 0" Height =" 28" IsVisible =" {Binding !#ThisControl.UseSystemWindowFrame}" >
19
20
<Border Background =" {DynamicResource Brush.TitleBar}"
108
109
FontFamily =" {DynamicResource Fonts.Monospace}" />
109
110
</Border >
110
111
</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 >
111
120
</Grid >
112
121
</v : ChromelessWindow >
You can’t perform that action at this time.
0 commit comments