Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 4d140c6

Browse files
Merge remote-tracking branch 'remotes/origin/master' into feature/graphql-caching
2 parents c3b597f + cb13c51 commit 4d140c6

File tree

51 files changed

+1157
-938
lines changed

Some content is hidden

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

51 files changed

+1157
-938
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: Localization suggestion
3+
about: Suggest an improvement to our localization
4+
labels: localization, bug
5+
title: 'Localization: '
6+
---
7+
<!-- Hello! Please read the [Contributing Guidelines](https://github.com/github/VisualStudio/blob/master/CONTRIBUTING.md) before submitting an issue regarding the GitHub Extension for Visual Studio. -->
8+
## Language
9+
<!-- Czech -->
10+
<!-- German -->
11+
<!-- Spanish -->
12+
<!-- French -->
13+
<!-- Italian -->
14+
<!-- Japanese -->
15+
<!-- Korean -->
16+
<!-- Polish -->
17+
<!-- Portuguese (Brazil) -->
18+
<!-- Russian -->
19+
<!-- Turkish -->
20+
<!-- Chinese (Simplified) -->
21+
<!-- Chinese (Traditional) -->
22+
23+
## English source
24+
<!-- Translations are made from the English sources, please paste it here. -->
25+
```
26+
27+
```
28+
29+
## Original Translation
30+
<!-- Please paste the original translation here. -->
31+
```
32+
33+
```
34+
35+
## Screenshots
36+
<!-- Translations are sometimes provided by vendors that do not have access to the UI. Providing screenshots can give them a lot of context. -->
37+
38+
## Notes
39+
<!-- If you can, please explain what is incorrect about the translation. -->
40+
41+
## Suggested Translation
42+
<!-- If you can, please suggest an alternate translation. -->
43+
```
44+
45+
```

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Official builds of this extension are available at [the official website](https:
1919

2020
[![Build status](https://ci.appveyor.com/api/projects/status/dl8is5iqwt9qf3t7/branch/master?svg=true)](https://ci.appveyor.com/project/github-windows/visualstudio/branch/master)
2121
[![Build Status](https://github-editor-tools.visualstudio.com/VisualStudio/_apis/build/status/github.VisualStudio?branchName=master)](https://github-editor-tools.visualstudio.com/VisualStudio/_build/latest?definitionId=4&branchName=master)
22-
[![Crowdin](https://d322cqt584bo4o.cloudfront.net/github-visual-studio/localized.svg)](https://crowdin.com/project/github-visual-studio)
2322
[![codecov](https://codecov.io/gh/GitHub/VisualStudio/branch/master/graph/badge.svg)](https://codecov.io/gh/GitHub/VisualStudio)
2423

2524
[![Follow GitHub for Visual Studio](https://img.shields.io/twitter/follow/GitHubVS.svg?style=social "Follow GitHubVS")](https://twitter.com/githubvs?ref_src=twsrc%5Etfw) [![Join the chat at https://gitter.im/github/VisualStudio](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/github/VisualStudio?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

crowdin.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

src/GitHub.App/Services/RepositoryCloneService.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ public async Task CloneRepository(
224224
catch (Exception ex)
225225
{
226226
log.Error(ex, "Could not clone {CloneUrl} to {Path}", cloneUrl, repositoryPath);
227+
operatingSystem.Directory.DeleteDirectory(repositoryPath);
227228
throw;
228229
}
229230
}

src/GitHub.App/ViewModels/GitHubPane/PullRequestReviewCommentViewModel.cs

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@
33
using System.Reactive;
44
using System.Threading.Tasks;
55
using GitHub.Extensions;
6+
using GitHub.Logging;
67
using GitHub.Models;
78
using GitHub.Services;
89
using ReactiveUI;
10+
using Serilog;
911

1012
namespace GitHub.ViewModels.GitHubPane
1113
{
@@ -14,6 +16,8 @@ namespace GitHub.ViewModels.GitHubPane
1416
/// </summary>
1517
public class PullRequestReviewCommentViewModel : IPullRequestReviewFileCommentViewModel
1618
{
19+
static readonly ILogger log = LogManager.ForContext<PullRequestReviewCommentViewModel>();
20+
1721
readonly IPullRequestEditorService editorService;
1822
readonly IPullRequestSession session;
1923
readonly PullRequestReviewCommentModel model;
@@ -52,18 +56,34 @@ async Task DoOpen()
5256
{
5357
if (thread == null)
5458
{
55-
var file = await session.GetFile(RelativePath, model.Thread.CommitSha);
56-
thread = file.InlineCommentThreads.FirstOrDefault(t => t.Comments.Any(c => c.Comment.Id == model.Id));
59+
if(model.Thread.IsOutdated)
60+
{
61+
var file = await session.GetFile(RelativePath, model.Thread.OriginalCommitSha);
62+
thread = file.InlineCommentThreads.FirstOrDefault(t => t.Comments.Any(c => c.Comment.Id == model.Id));
63+
}
64+
else
65+
{
66+
var file = await session.GetFile(RelativePath, model.Thread.CommitSha);
67+
thread = file.InlineCommentThreads.FirstOrDefault(t => t.Comments.Any(c => c.Comment.Id == model.Id));
68+
69+
if(thread?.LineNumber == -1)
70+
{
71+
log.Warning("Couldn't find line number for comment on {RelativePath} @ {CommitSha}", RelativePath, model.Thread.CommitSha);
72+
// Fall back to opening outdated file if we can't find a line number for the comment
73+
file = await session.GetFile(RelativePath, model.Thread.OriginalCommitSha);
74+
thread = file.InlineCommentThreads.FirstOrDefault(t => t.Comments.Any(c => c.Comment.Id == model.Id));
75+
}
76+
}
5777
}
5878

5979
if (thread != null && thread.LineNumber != -1)
6080
{
6181
await editorService.OpenDiff(session, RelativePath, thread);
6282
}
6383
}
64-
catch (Exception)
84+
catch (Exception e)
6585
{
66-
// TODO: Show error.
86+
log.Error(e, nameof(DoOpen));
6787
}
6888
}
6989
}

src/GitHub.App/ViewModels/TeamExplorer/RepositoryPublishViewModel.cs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ public class RepositoryPublishViewModel : RepositoryFormViewModel, IRepositoryPu
3131
readonly IModelServiceFactory modelServiceFactory;
3232
readonly ObservableAsPropertyHelper<IReadOnlyList<IAccount>> accounts;
3333
readonly ObservableAsPropertyHelper<bool> isHostComboBoxVisible;
34-
readonly ObservableAsPropertyHelper<string> title;
3534
readonly IUsageTracker usageTracker;
3635

3736
[ImportingConstructor]
@@ -52,14 +51,6 @@ public RepositoryPublishViewModel(
5251
this.usageTracker = usageTracker;
5352
this.modelServiceFactory = modelServiceFactory;
5453

55-
title = this.WhenAny(
56-
x => x.SelectedConnection,
57-
x => x.Value != null ?
58-
string.Format(CultureInfo.CurrentCulture, Resources.PublishToTitle, x.Value.HostAddress.Title) :
59-
Resources.PublishTitle
60-
)
61-
.ToProperty(this, x => x.Title);
62-
6354
Connections = connectionManager.Connections;
6455
this.repositoryPublishService = repositoryPublishService;
6556

@@ -109,8 +100,6 @@ public RepositoryPublishViewModel(
109100
});
110101
}
111102

112-
public string Title { get { return title.Value; } }
113-
114103
public ReactiveCommand<Unit, ProgressState> PublishRepository { get; private set; }
115104
public IReadOnlyObservableCollection<IConnection> Connections { get; private set; }
116105

src/GitHub.InlineReviews/Services/PullRequestSessionService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public IReadOnlyList<IInlineCommentThreadModel> BuildCommentThreads(
116116
relativePath = relativePath.Replace("\\", "/");
117117

118118
var threadsByPosition = pullRequest.Threads
119-
.Where(x => x.Path == relativePath && !x.IsOutdated)
119+
.Where(x => x.Path == relativePath)
120120
.OrderBy(x => x.Id)
121121
.GroupBy(x => Tuple.Create(x.OriginalCommitSha, x.OriginalPosition));
122122
var threads = new List<IInlineCommentThreadModel>();

src/GitHub.Resources/Resources.Designer.cs

Lines changed: 0 additions & 45 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GitHub.Resources/Resources.cs-CZ.resx

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,6 @@
120120
<data name="BrowseForDirectory" xml:space="preserve">
121121
<value>Vyberte nadřazenou složku pro nové úložiště.</value>
122122
</data>
123-
<data name="CloneTitle" xml:space="preserve">
124-
<value>Klonovat úložiště</value>
125-
</data>
126123
<data name="OpenFromGitHubTitle" xml:space="preserve">
127124
<value>Otevřít z GitHubu</value>
128125
</data>
@@ -168,12 +165,6 @@
168165
<data name="PRCreatedUpstream" xml:space="preserve">
169166
<value>Žádost o přijetí změn pro větev **{0}** se úspěšně vytvořila v [{1}]({2})</value>
170167
</data>
171-
<data name="PublishTitle" xml:space="preserve">
172-
<value>Publikovat úložiště</value>
173-
</data>
174-
<data name="PublishToTitle" xml:space="preserve">
175-
<value>Publikovat úložiště na {0}</value>
176-
</data>
177168
<data name="PullRequestCreationTitleValidatorEmpty" xml:space="preserve">
178169
<value>Zadejte prosím název žádosti o přijetí změn.</value>
179170
</data>
@@ -183,9 +174,6 @@
183174
<data name="PullRequestSourceBranchDoesNotExist" xml:space="preserve">
184175
<value>Zdrojová větev neexistuje vzdáleně, nasdíleli jste ji?</value>
185176
</data>
186-
<data name="RepositoryCloneFailedNoSelectedRepo" xml:space="preserve">
187-
<value>Není vybrané žádné úložiště.</value>
188-
</data>
189177
<data name="RepositoryCreationClonePathEmpty" xml:space="preserve">
190178
<value>Zadejte prosím cestu k úložišti.</value>
191179
</data>
@@ -256,10 +244,10 @@
256244
<value>Před nasdílením změn musíte napřed přijmout změny.</value>
257245
</data>
258246
<data name="NoCommitsToPull" xml:space="preserve">
259-
<value>Žádná potvrzení k přijetí</value>
247+
<value>Žádné zápisy k přijetí</value>
260248
</data>
261249
<data name="NoCommitsToPush" xml:space="preserve">
262-
<value>Žádná potvrzení k nasdílení</value>
250+
<value>Žádné zápisy k nasdílení</value>
263251
</data>
264252
<data name="NoDescriptionProvidedMarkdown" xml:space="preserve">
265253
<value>*Není zadaný žádný popis.*</value>
@@ -286,7 +274,7 @@
286274
<value>Úložiště zdrojového kódu už není k dispozici.</value>
287275
</data>
288276
<data name="WorkingDirectoryHasUncommittedCHanges" xml:space="preserve">
289-
<value>Nelze rezervovat, protože pracovní adresář obsahuje nepotvrzené změny.</value>
277+
<value>Nelze rezervovat, protože pracovní adresář obsahuje nezapsané změny.</value>
290278
</data>
291279
<data name="SyncSubmodules" xml:space="preserve">
292280
<value>Synchronizovat dílčí moduly {0}</value>
@@ -406,7 +394,7 @@ https://git-scm.com/download/win</value>
406394
<value>Otevřít v prohlížeči</value>
407395
</data>
408396
<data name="CancelLink" xml:space="preserve">
409-
<value>Storno</value>
397+
<value>Zrušit</value>
410398
</data>
411399
<data name="gistCreatedMessage" xml:space="preserve">
412400
<value>Gist se vytvořil.</value>
@@ -687,7 +675,7 @@ https://git-scm.com/download/win</value>
687675
<value>Zahájit revizi</value>
688676
</data>
689677
<data name="YouMustCommitAndPushYourChangesToAddACommentHere" xml:space="preserve">
690-
<value>Pokud sem chcete přidat komentář, musíte potvrdit a nasdílet změny.</value>
678+
<value>Pokud sem chcete přidat komentář, musíte zapsat a nasdílet změny.</value>
691679
</data>
692680
<data name="PreviousComment" xml:space="preserve">
693681
<value>Předchozí komentář</value>
@@ -807,7 +795,7 @@ https://git-scm.com/download/win</value>
807795
<value>Není k dispozici žádné aktivní úložiště, do kterého by bylo možné přejít.</value>
808796
</data>
809797
<data name="ChangesInWorkingDirectoryMessage" xml:space="preserve">
810-
<value>Pracovní soubor je jiný než soubor v {0}. Rezervujte si prosím odpovídající větev, žádost o přijetí změn nebo potvrzení.</value>
798+
<value>Pracovní soubor je jiný než soubor v {0}. Rezervujte si prosím odpovídající větev, žádost o přijetí změn nebo zápis.</value>
811799
</data>
812800
<data name="DifferentRepositoryMessage" xml:space="preserve">
813801
<value>Otevřete prosím úložiště {0} a zkuste to znovu.</value>
@@ -848,4 +836,34 @@ https://git-scm.com/download/win</value>
848836
<data name="MostRecentlyPushed" xml:space="preserve">
849837
<value>{0} – naposledy nasdíleno</value>
850838
</data>
839+
<data name="Comment" xml:space="preserve">
840+
<value>Komentář</value>
841+
</data>
842+
<data name="ClosePullRequest" xml:space="preserve">
843+
<value>Zavřít žádost o přijetí změn</value>
844+
</data>
845+
<data name="CloseIssue" xml:space="preserve">
846+
<value>Zavřít problém</value>
847+
</data>
848+
<data name="CloseAndComment" xml:space="preserve">
849+
<value>Zavřít a okomentovat</value>
850+
</data>
851+
<data name="ReopenAndComment" xml:space="preserve">
852+
<value>Znovu otevřít a okomentovat</value>
853+
</data>
854+
<data name="ReopenIssue" xml:space="preserve">
855+
<value>Znovu otevřít problém</value>
856+
</data>
857+
<data name="ReopenPullRequest" xml:space="preserve">
858+
<value>Znovu otevřít žádost o přijetí změn</value>
859+
</data>
860+
<data name="CommitCountFormat" xml:space="preserve">
861+
<value>{0} – potvrzení</value>
862+
</data>
863+
<data name="AddedSomeCommits" xml:space="preserve">
864+
<value>přidala se nějaká potvrzení</value>
865+
</data>
866+
<data name="AndOthers" xml:space="preserve">
867+
<value>a další</value>
868+
</data>
851869
</root>

0 commit comments

Comments
 (0)