Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-07-29 10:27:17 -0400
committerThomas Wolf2018-08-13 16:10:06 -0400
commit6b603f5ea4b9b17bee51bb777373a5448a62e860 (patch)
tree4acae4b011ab395afb6a37b8a614ae1df918dae6
parent627a3a7a4b00722f2442c52b259321cfddbaa791 (diff)
downloadegit-github-6b603f5ea4b9b17bee51bb777373a5448a62e860.tar.gz
egit-github-6b603f5ea4b9b17bee51bb777373a5448a62e860.tar.xz
egit-github-6b603f5ea4b9b17bee51bb777373a5448a62e860.zip
Add missing blank in github wizard labels
Leading or trailing blanks in property files are hard to manage, therefore the concatenation of the existing strings doesn't produce a blank. Use plurals instead. Bug: 537469 Change-Id: Id83ebc1149069f9036f47facd711d75213719d48 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/Messages.java11
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositorySearchWizardPage.java27
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/messages.properties5
3 files changed, 7 insertions, 36 deletions
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/Messages.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/Messages.java
index 7cde9890..0963f9a5 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/Messages.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/Messages.java
@@ -67,12 +67,6 @@ public class Messages extends NLS {
public static String RepositorySearchWizardPage_Description;
/** */
- public static String RepositorySearchWizardPage_Fork;
-
- /** */
- public static String RepositorySearchWizardPage_Forks;
-
- /** */
public static String RepositorySearchWizardPage_SearchButton;
/** */
@@ -85,10 +79,7 @@ public class Messages extends NLS {
public static String RepositorySearchWizardPage_Title;
/** */
- public static String RepositorySearchWizardPage_Watcher;
-
- /** */
- public static String RepositorySearchWizardPage_Watchers;
+ public static String RepositorySearchWizardPage_counters;
/** */
public static String RepositorySelectionWizardPage_Description;
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositorySearchWizardPage.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositorySearchWizardPage.java
index 241b033b..81c9635a 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositorySearchWizardPage.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositorySearchWizardPage.java
@@ -166,28 +166,11 @@ public class RepositorySearchWizardPage extends WizardPage implements
styled.append(" (" + language + ")", //$NON-NLS-1$ //$NON-NLS-2$
StyledString.QUALIFIER_STYLER);
- int forks = repo.getForks();
- if (forks != 1)
- styled.append(MessageFormat.format(
- Messages.RepositorySearchWizardPage_Forks,
- forks), StyledString.COUNTER_STYLER);
- else
- styled.append(
- Messages.RepositorySearchWizardPage_Fork,
- StyledString.COUNTER_STYLER);
-
- int watchers = repo.getWatchers();
- if (watchers != 1)
- styled.append(
- MessageFormat
- .format(Messages.RepositorySearchWizardPage_Watchers,
- watchers),
- StyledString.COUNTER_STYLER);
- else
- styled.append(
- Messages.RepositorySearchWizardPage_Watcher,
- StyledString.COUNTER_STYLER);
-
+ String counters = " " + MessageFormat.format( //$NON-NLS-1$
+ Messages.RepositorySearchWizardPage_counters,
+ Integer.valueOf(repo.getForks()),
+ Integer.valueOf(repo.getWatchers()));
+ styled.append(counters, StyledString.COUNTER_STYLER);
return styled;
}
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/messages.properties b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/messages.properties
index 9a919cff..91187f2b 100644
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/messages.properties
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/messages.properties
@@ -13,14 +13,11 @@ RepositorySearchWizardPage_Found=Found {0} repositories
RepositorySearchWizardPage_Error=Error searching repositories: {0}
RepositorySearchWizardPage_AnyLanguage=Any Language
RepositorySearchWizardPage_Description=Search for repositories to clone
-RepositorySearchWizardPage_Fork=\ (1 fork,
-RepositorySearchWizardPage_Forks=\ ({0} forks,
+RepositorySearchWizardPage_counters=({0,choice,0#No forks|1#One fork|1<{0} forks}, {1,choice,0#no watchers|1#one watcher|1<{1} watchers})
RepositorySearchWizardPage_SearchButton=&Search
RepositorySearchWizardPage_SearchForRepositories=Search for repositories written in
RepositorySearchWizardPage_Searching=Searching for ''{0}''
RepositorySearchWizardPage_Title=Import Git repositories from GitHub
-RepositorySearchWizardPage_Watcher=1 watcher)
-RepositorySearchWizardPage_Watchers={0} watchers)
RepositorySelectionWizardPage_Description=Select repositories to import
RepositorySelectionWizardPage_ErrorLoading=Error loading repositories: {0}
RepositorySelectionWizardPage_LabelAddGist=Add Gist task repository

Back to the top