Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit 0e48924

Browse files
Moving text to constants
1 parent de19150 commit 0e48924

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/PUblishView.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ class PublishView : Subview
1313
private const string PrivateRepoMessage = "You choose who can see and commit to this repository";
1414
private const string PublicRepoMessage = "Anyone can see this repository. You choose who can commit";
1515
private const string PublishViewCreateButton = "Create";
16+
private const string SelectedOwnerLabel = "Owner";
17+
private const string RepositoryNameLabel = "Repository Name";
18+
private const string DescriptionLabel = "Description";
19+
private const string CreatePrivateRepositoryLabel = "Create as a private repository";
1620

1721
[SerializeField] private string username;
1822
[SerializeField] private string[] owners = { };
@@ -138,7 +142,7 @@ public override void OnGUI()
138142
{
139143
GUILayout.BeginVertical();
140144
{
141-
GUILayout.Label("Owner");
145+
GUILayout.Label(SelectedOwnerLabel);
142146

143147
selectedOwner = EditorGUILayout.Popup(0, owners);
144148
}
@@ -153,22 +157,22 @@ public override void OnGUI()
153157

154158
GUILayout.BeginVertical();
155159
{
156-
GUILayout.Label("Repository Name");
160+
GUILayout.Label(RepositoryNameLabel);
157161
repoName = EditorGUILayout.TextField(repoName);
158162
}
159163
GUILayout.EndVertical();
160164
}
161165
GUILayout.EndHorizontal();
162166

163-
GUILayout.Label("Description");
167+
GUILayout.Label(DescriptionLabel);
164168
repoDescription = EditorGUILayout.TextField(repoDescription);
165169
GUILayout.Space(Styles.PublishViewSpacingHeight);
166170

167171
GUILayout.BeginVertical();
168172
{
169173
GUILayout.BeginHorizontal();
170174
{
171-
togglePrivate = GUILayout.Toggle(togglePrivate, "Create as a private repository");
175+
togglePrivate = GUILayout.Toggle(togglePrivate, CreatePrivateRepositoryLabel);
172176
}
173177
GUILayout.EndHorizontal();
174178

0 commit comments

Comments
 (0)