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

Commit e3ea7db

Browse files
authored
Merge branch 'master' into fixes/2245-comment-thread-resolved-status
2 parents e068eb4 + bd445eb commit e3ea7db

File tree

57 files changed

+1157
-889
lines changed

Some content is hidden

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

57 files changed

+1157
-889
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)

appveyor.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ for:
6969
branches:
7070
only:
7171
- master
72+
- /releases/(?:(?!-vsinstaller).)*?/
7273
environment:
7374
matrix:
7475
- BUILD_TYPE: package

crowdin.yml

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

src/GitHub.App/SampleData/Documents/PullRequestPageViewModelDesigner.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ Depends on #1993
5959
new CommitListViewModel(
6060
new CommitSummaryViewModel(new CommitModel
6161
{
62-
Author = new ActorModel { Login = "grokys" },
62+
Author = new CommitActorModel { User = new ActorModel{ Login = "grokys" }},
6363
AbbreviatedOid = "c7c7d25",
6464
MessageHeadline = "Refactor comment view models."
6565
}),
6666
new CommitSummaryViewModel(new CommitModel
6767
{
68-
Author = new ActorModel { Login = "shana" },
68+
Author = new CommitActorModel { User = new ActorModel{ Login = "shana" }},
6969
AbbreviatedOid = "04e6a90",
7070
MessageHeadline = "Refactor comment view models.",
7171
})),
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using GitHub.Models;
2+
3+
namespace GitHub.ViewModels
4+
{
5+
public class CommitActorViewModel: ActorViewModel, ICommitActorViewModel
6+
{
7+
public CommitActorViewModel(CommitActorModel model)
8+
:base(model.User)
9+
{
10+
Name = model.Name;
11+
Email = model.Email;
12+
HasLogin = model.User != null;
13+
}
14+
15+
public string Email { get; }
16+
public string Name { get; }
17+
public bool HasLogin { get; }
18+
}
19+
}

src/GitHub.App/ViewModels/Documents/CommitListViewModel.cs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public CommitListViewModel(params ICommitSummaryViewModel[] commits)
2525

2626
Commits = commits;
2727
Author = Commits[0].Author;
28+
AuthorName = GetAuthorDisplayName(Commits[0].Author);
2829
AuthorCaption = BuildAuthorCaption();
2930
}
3031

@@ -42,12 +43,16 @@ public CommitListViewModel(IEnumerable<ICommitSummaryViewModel> commits)
4243
}
4344

4445
Author = Commits[0].Author;
46+
AuthorName = GetAuthorDisplayName(Commits[0].Author);
4547
AuthorCaption = BuildAuthorCaption();
4648
}
4749

4850
/// <inheritdoc/>
49-
public IActorViewModel Author { get; }
51+
public ICommitActorViewModel Author { get; }
5052

53+
/// <inheritdoc/>
54+
public string AuthorName { get; }
55+
5156
/// <inheritdoc/>
5257
public string AuthorCaption { get; }
5358

@@ -58,7 +63,7 @@ string BuildAuthorCaption()
5863
{
5964
var result = new StringBuilder();
6065

61-
if (Commits.Any(x => x.Author.Login != Author.Login))
66+
if (Commits.Any(x => GetAuthorDisplayName(x.Author) != AuthorName))
6267
{
6368
result.Append(Resources.AndOthers);
6469
result.Append(' ');
@@ -67,5 +72,10 @@ string BuildAuthorCaption()
6772
result.Append(Resources.AddedSomeCommits);
6873
return result.ToString();
6974
}
75+
76+
string GetAuthorDisplayName(ICommitActorViewModel commitActorViewModel)
77+
{
78+
return commitActorViewModel.HasLogin ? commitActorViewModel.Login : commitActorViewModel.Name;
79+
}
7080
}
7181
}

src/GitHub.App/ViewModels/Documents/CommitSummaryViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class CommitSummaryViewModel : ViewModelBase, ICommitSummaryViewModel
1414
public CommitSummaryViewModel(CommitModel commit)
1515
{
1616
AbbreviatedOid = commit.AbbreviatedOid;
17-
Author = new ActorViewModel(commit.Author);
17+
Author = new CommitActorViewModel(commit.Author);
1818
Header = commit.MessageHeadline;
1919
Oid = commit.Oid;
2020
}
@@ -23,7 +23,7 @@ public CommitSummaryViewModel(CommitModel commit)
2323
public string AbbreviatedOid { get; private set; }
2424

2525
/// <inheritdoc/>
26-
public IActorViewModel Author { get; private set; }
26+
public ICommitActorViewModel Author { get; private set; }
2727

2828
/// <inheritdoc/>
2929
public string Header { get; private set; }

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.Exports.Reactive/ViewModels/Documents/ICommitListViewModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@ public interface ICommitListViewModel : IViewModel
1111
/// <summary>
1212
/// Gets the first author of the commits in the list.
1313
/// </summary>
14-
IActorViewModel Author { get; }
14+
ICommitActorViewModel Author { get; }
15+
16+
/// <summary>
17+
/// Gets a string to display the author login or the author name.
18+
/// </summary>
19+
string AuthorName { get; }
1520

1621
/// <summary>
1722
/// Gets a string to display next to the author in the view.

0 commit comments

Comments
 (0)