Skip to content

Commit 8616291

Browse files
authored
Merge branch 'develop' into heartacker/issue1514
2 parents 3a7035b + 24fcaa1 commit 8616291

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+639
-542
lines changed

TRANSLATION.md

Lines changed: 74 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This document shows the translation status of each locale file in the repository
66

77
### ![en_US](https://img.shields.io/badge/en__US-%E2%88%9A-brightgreen)
88

9-
### ![de__DE](https://img.shields.io/badge/de__DE-98.81%25-yellow)
9+
### ![de__DE](https://img.shields.io/badge/de__DE-97.98%25-yellow)
1010

1111
<details>
1212
<summary>Missing keys in de_DE.axaml</summary>
@@ -17,14 +17,21 @@ This document shows the translation status of each locale file in the repository
1717
- Text.MoveSubmodule
1818
- Text.MoveSubmodule.MoveTo
1919
- Text.MoveSubmodule.Submodule
20+
- Text.SetSubmoduleBranch
21+
- Text.SetSubmoduleBranch.Submodule
22+
- Text.SetSubmoduleBranch.Current
23+
- Text.SetSubmoduleBranch.New
24+
- Text.SetSubmoduleBranch.New.Tip
25+
- Text.Submodule.Branch
2026
- Text.Submodule.Histories
2127
- Text.Submodule.Move
28+
- Text.Submodule.SetBranch
2229
- Text.Submodule.SetURL
2330
- Text.Submodule.Update
2431

2532
</details>
2633

27-
### ![es__ES](https://img.shields.io/badge/es__ES-98.45%25-yellow)
34+
### ![es__ES](https://img.shields.io/badge/es__ES-97.63%25-yellow)
2835

2936
<details>
3037
<summary>Missing keys in es_ES.axaml</summary>
@@ -38,14 +45,21 @@ This document shows the translation status of each locale file in the repository
3845
- Text.MoveSubmodule
3946
- Text.MoveSubmodule.MoveTo
4047
- Text.MoveSubmodule.Submodule
48+
- Text.SetSubmoduleBranch
49+
- Text.SetSubmoduleBranch.Submodule
50+
- Text.SetSubmoduleBranch.Current
51+
- Text.SetSubmoduleBranch.New
52+
- Text.SetSubmoduleBranch.New.Tip
53+
- Text.Submodule.Branch
4154
- Text.Submodule.Histories
4255
- Text.Submodule.Move
56+
- Text.Submodule.SetBranch
4357
- Text.Submodule.SetURL
4458
- Text.Submodule.Update
4559

4660
</details>
4761

48-
### ![fr__FR](https://img.shields.io/badge/fr__FR-87.34%25-yellow)
62+
### ![fr__FR](https://img.shields.io/badge/fr__FR-86.36%25-yellow)
4963

5064
<details>
5165
<summary>Missing keys in fr_FR.axaml</summary>
@@ -130,11 +144,20 @@ This document shows the translation status of each locale file in the repository
130144
- Text.ResetWithoutCheckout
131145
- Text.ResetWithoutCheckout.MoveTo
132146
- Text.ResetWithoutCheckout.Target
147+
- Text.SetSubmoduleBranch
148+
- Text.SetSubmoduleBranch.Submodule
149+
- Text.SetSubmoduleBranch.Current
150+
- Text.SetSubmoduleBranch.New
151+
- Text.SetSubmoduleBranch.New.Tip
133152
- Text.Stash.Mode
134153
- Text.StashCM.CopyMessage
154+
- Text.Submodule.Branch
135155
- Text.Submodule.Deinit
136156
- Text.Submodule.Histories
137157
- Text.Submodule.Move
158+
- Text.Submodule.RelativePath
159+
- Text.Submodule.RelativePath.Placeholder
160+
- Text.Submodule.SetBranch
138161
- Text.Submodule.SetURL
139162
- Text.Submodule.Status
140163
- Text.Submodule.Status.Modified
@@ -159,7 +182,7 @@ This document shows the translation status of each locale file in the repository
159182

160183
</details>
161184

162-
### ![it__IT](https://img.shields.io/badge/it__IT-92.47%25-yellow)
185+
### ![it__IT](https://img.shields.io/badge/it__IT-91.70%25-yellow)
163186

164187
<details>
165188
<summary>Missing keys in it_IT.axaml</summary>
@@ -216,11 +239,18 @@ This document shows the translation status of each locale file in the repository
216239
- Text.ResetWithoutCheckout
217240
- Text.ResetWithoutCheckout.MoveTo
218241
- Text.ResetWithoutCheckout.Target
242+
- Text.SetSubmoduleBranch
243+
- Text.SetSubmoduleBranch.Submodule
244+
- Text.SetSubmoduleBranch.Current
245+
- Text.SetSubmoduleBranch.New
246+
- Text.SetSubmoduleBranch.New.Tip
219247
- Text.Stash.Mode
220248
- Text.StashCM.CopyMessage
249+
- Text.Submodule.Branch
221250
- Text.Submodule.Deinit
222251
- Text.Submodule.Histories
223252
- Text.Submodule.Move
253+
- Text.Submodule.SetBranch
224254
- Text.Submodule.SetURL
225255
- Text.Submodule.Update
226256
- Text.TagCM.CustomAction
@@ -230,7 +260,7 @@ This document shows the translation status of each locale file in the repository
230260

231261
</details>
232262

233-
### ![ja__JP](https://img.shields.io/badge/ja__JP-87.10%25-yellow)
263+
### ![ja__JP](https://img.shields.io/badge/ja__JP-86.36%25-yellow)
234264

235265
<details>
236266
<summary>Missing keys in ja_JP.axaml</summary>
@@ -317,11 +347,18 @@ This document shows the translation status of each locale file in the repository
317347
- Text.ResetWithoutCheckout
318348
- Text.ResetWithoutCheckout.MoveTo
319349
- Text.ResetWithoutCheckout.Target
350+
- Text.SetSubmoduleBranch
351+
- Text.SetSubmoduleBranch.Submodule
352+
- Text.SetSubmoduleBranch.Current
353+
- Text.SetSubmoduleBranch.New
354+
- Text.SetSubmoduleBranch.New.Tip
320355
- Text.Stash.Mode
321356
- Text.StashCM.CopyMessage
357+
- Text.Submodule.Branch
322358
- Text.Submodule.Deinit
323359
- Text.Submodule.Histories
324360
- Text.Submodule.Move
361+
- Text.Submodule.SetBranch
325362
- Text.Submodule.SetURL
326363
- Text.Submodule.Status
327364
- Text.Submodule.Status.Modified
@@ -346,7 +383,7 @@ This document shows the translation status of each locale file in the repository
346383

347384
</details>
348385

349-
### ![pt__BR](https://img.shields.io/badge/pt__BR-79.69%25-yellow)
386+
### ![pt__BR](https://img.shields.io/badge/pt__BR-79.00%25-yellow)
350387

351388
<details>
352389
<summary>Missing keys in pt_BR.axaml</summary>
@@ -487,6 +524,11 @@ This document shows the translation status of each locale file in the repository
487524
- Text.ResetWithoutCheckout
488525
- Text.ResetWithoutCheckout.MoveTo
489526
- Text.ResetWithoutCheckout.Target
527+
- Text.SetSubmoduleBranch
528+
- Text.SetSubmoduleBranch.Submodule
529+
- Text.SetSubmoduleBranch.Current
530+
- Text.SetSubmoduleBranch.New
531+
- Text.SetSubmoduleBranch.New.Tip
490532
- Text.SetUpstream
491533
- Text.SetUpstream.Local
492534
- Text.SetUpstream.Unset
@@ -495,9 +537,11 @@ This document shows the translation status of each locale file in the repository
495537
- Text.Stash.Mode
496538
- Text.StashCM.CopyMessage
497539
- Text.StashCM.SaveAsPatch
540+
- Text.Submodule.Branch
498541
- Text.Submodule.Deinit
499542
- Text.Submodule.Histories
500543
- Text.Submodule.Move
544+
- Text.Submodule.SetBranch
501545
- Text.Submodule.SetURL
502546
- Text.Submodule.Status
503547
- Text.Submodule.Status.Modified
@@ -524,7 +568,7 @@ This document shows the translation status of each locale file in the repository
524568

525569
</details>
526570

527-
### ![ru__RU](https://img.shields.io/badge/ru__RU-98.45%25-yellow)
571+
### ![ru__RU](https://img.shields.io/badge/ru__RU-97.63%25-yellow)
528572

529573
<details>
530574
<summary>Missing keys in ru_RU.axaml</summary>
@@ -538,14 +582,21 @@ This document shows the translation status of each locale file in the repository
538582
- Text.MoveSubmodule
539583
- Text.MoveSubmodule.MoveTo
540584
- Text.MoveSubmodule.Submodule
585+
- Text.SetSubmoduleBranch
586+
- Text.SetSubmoduleBranch.Submodule
587+
- Text.SetSubmoduleBranch.Current
588+
- Text.SetSubmoduleBranch.New
589+
- Text.SetSubmoduleBranch.New.Tip
590+
- Text.Submodule.Branch
541591
- Text.Submodule.Histories
542592
- Text.Submodule.Move
593+
- Text.Submodule.SetBranch
543594
- Text.Submodule.SetURL
544595
- Text.Submodule.Update
545596

546597
</details>
547598

548-
### ![ta__IN](https://img.shields.io/badge/ta__IN-87.22%25-yellow)
599+
### ![ta__IN](https://img.shields.io/badge/ta__IN-86.48%25-yellow)
549600

550601
<details>
551602
<summary>Missing keys in ta_IN.axaml</summary>
@@ -631,11 +682,18 @@ This document shows the translation status of each locale file in the repository
631682
- Text.ResetWithoutCheckout
632683
- Text.ResetWithoutCheckout.MoveTo
633684
- Text.ResetWithoutCheckout.Target
685+
- Text.SetSubmoduleBranch
686+
- Text.SetSubmoduleBranch.Submodule
687+
- Text.SetSubmoduleBranch.Current
688+
- Text.SetSubmoduleBranch.New
689+
- Text.SetSubmoduleBranch.New.Tip
634690
- Text.Stash.Mode
635691
- Text.StashCM.CopyMessage
692+
- Text.Submodule.Branch
636693
- Text.Submodule.Deinit
637694
- Text.Submodule.Histories
638695
- Text.Submodule.Move
696+
- Text.Submodule.SetBranch
639697
- Text.Submodule.SetURL
640698
- Text.Submodule.Status
641699
- Text.Submodule.Status.Modified
@@ -660,7 +718,7 @@ This document shows the translation status of each locale file in the repository
660718

661719
</details>
662720

663-
### ![uk__UA](https://img.shields.io/badge/uk__UA-88.41%25-yellow)
721+
### ![uk__UA](https://img.shields.io/badge/uk__UA-87.66%25-yellow)
664722

665723
<details>
666724
<summary>Missing keys in uk_UA.axaml</summary>
@@ -741,11 +799,18 @@ This document shows the translation status of each locale file in the repository
741799
- Text.ResetWithoutCheckout
742800
- Text.ResetWithoutCheckout.MoveTo
743801
- Text.ResetWithoutCheckout.Target
802+
- Text.SetSubmoduleBranch
803+
- Text.SetSubmoduleBranch.Submodule
804+
- Text.SetSubmoduleBranch.Current
805+
- Text.SetSubmoduleBranch.New
806+
- Text.SetSubmoduleBranch.New.Tip
744807
- Text.Stash.Mode
745808
- Text.StashCM.CopyMessage
809+
- Text.Submodule.Branch
746810
- Text.Submodule.Deinit
747811
- Text.Submodule.Histories
748812
- Text.Submodule.Move
813+
- Text.Submodule.SetBranch
749814
- Text.Submodule.SetURL
750815
- Text.Submodule.Status
751816
- Text.Submodule.Status.Modified

src/App.Commands.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,7 @@ public static bool IsCheckForUpdateCommandVisible
4545
public static readonly Command QuitCommand = new Command(_ => Quit(0));
4646
public static readonly Command CopyTextBlockCommand = new Command(async p =>
4747
{
48-
var textBlock = p as TextBlock;
49-
if (textBlock == null)
48+
if (p is not TextBlock textBlock)
5049
return;
5150

5251
if (textBlock.Inlines is { Count: > 0 } inlines)

src/App.axaml.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,9 @@ public static void SendNotification(string context, string message)
186186

187187
public static void SetLocale(string localeKey)
188188
{
189-
var app = Current as App;
190-
var targetLocale = app?.Resources[localeKey] as ResourceDictionary;
191-
if (targetLocale == null || targetLocale == app._activeLocale)
189+
if (Current is not App app ||
190+
app.Resources[localeKey] is not ResourceDictionary targetLocale ||
191+
targetLocale == app._activeLocale)
192192
return;
193193

194194
if (app._activeLocale != null)
@@ -200,8 +200,7 @@ public static void SetLocale(string localeKey)
200200

201201
public static void SetTheme(string theme, string themeOverridesFile)
202202
{
203-
var app = Current as App;
204-
if (app == null)
203+
if (Current is not App app)
205204
return;
206205

207206
if (theme.Equals("Light", StringComparison.OrdinalIgnoreCase))
@@ -254,8 +253,7 @@ public static void SetTheme(string theme, string themeOverridesFile)
254253

255254
public static void SetFonts(string defaultFont, string monospaceFont, bool onlyUseMonospaceFontInEditor)
256255
{
257-
var app = Current as App;
258-
if (app == null)
256+
if (Current is not App app)
259257
return;
260258

261259
if (app._fontsOverrides != null)

src/Commands/Blame.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@ public Blame(string repo, string file, string revision)
4040
foreach (var line in _result.LineInfos)
4141
{
4242
if (line.CommitSHA.Length > _minSHALen)
43-
{
4443
line.CommitSHA = line.CommitSHA.Substring(0, _minSHALen);
45-
}
4644
}
4745
}
4846

src/Commands/Command.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ protected async Task<Result> ReadToEndAsync()
131131
}
132132

133133
var rs = new Result() { IsSuccess = true };
134-
rs.StdOut = await proc.StandardOutput.ReadToEndAsync().ConfigureAwait(false);
135-
rs.StdErr = await proc.StandardError.ReadToEndAsync().ConfigureAwait(false);
136-
await proc.WaitForExitAsync().ConfigureAwait(false);
134+
rs.StdOut = await proc.StandardOutput.ReadToEndAsync(CancellationToken).ConfigureAwait(false);
135+
rs.StdErr = await proc.StandardError.ReadToEndAsync(CancellationToken).ConfigureAwait(false);
136+
await proc.WaitForExitAsync(CancellationToken).ConfigureAwait(false);
137137

138138
rs.IsSuccess = proc.ExitCode == 0;
139139
proc.Close();

src/Commands/Diff.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -249,14 +249,10 @@ private void ProcessInlineHighlights()
249249
foreach (var chunk in chunks)
250250
{
251251
if (chunk.DeletedCount > 0)
252-
{
253252
left.Highlights.Add(new Models.TextInlineRange(chunk.DeletedStart, chunk.DeletedCount));
254-
}
255253

256254
if (chunk.AddedCount > 0)
257-
{
258255
right.Highlights.Add(new Models.TextInlineRange(chunk.AddedStart, chunk.AddedCount));
259-
}
260256
}
261257
}
262258
}

src/Commands/QueryCommits.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ private void ParseParent(string data)
121121
if (data.Length < 8)
122122
return;
123123

124-
_current.Parents.AddRange(data.Split(separator: ' ', options: StringSplitOptions.RemoveEmptyEntries));
124+
_current.Parents.AddRange(data.Split(' ', StringSplitOptions.RemoveEmptyEntries));
125125
}
126126

127127
private async Task MarkFirstMergedAsync()
@@ -133,9 +133,7 @@ private async Task MarkFirstMergedAsync()
133133
if (shas.Length == 0)
134134
return;
135135

136-
var set = new HashSet<string>();
137-
foreach (var sha in shas)
138-
set.Add(sha);
136+
var set = new HashSet<string>(shas);
139137

140138
foreach (var c in _commits)
141139
{

src/Commands/QueryCommitsForInteractiveRebase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ private void ParseParent(string data)
8686
if (data.Length < 8)
8787
return;
8888

89-
_current.Commit.Parents.AddRange(data.Split(separator: ' ', options: StringSplitOptions.RemoveEmptyEntries));
89+
_current.Commit.Parents.AddRange(data.Split(' ', StringSplitOptions.RemoveEmptyEntries));
9090
}
9191

9292
private List<Models.InteractiveCommit> _commits = [];

0 commit comments

Comments
 (0)