Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Keppler2018-11-03 10:55:29 -0400
committerMichael Keppler2018-12-29 08:12:32 -0500
commitf36f2823a3549000f182bffe9c49a9483cf8de41 (patch)
tree36b5f02e5c3f47da80ad54a9544c8705df5008ba
parent8965cf6115809e34bb7e0d22289da78296d32615 (diff)
downloadegit-github-f36f2823a3549000f182bffe9c49a9483cf8de41.tar.gz
egit-github-f36f2823a3549000f182bffe9c49a9483cf8de41.tar.xz
egit-github-f36f2823a3549000f182bffe9c49a9483cf8de41.zip
Use plurals in localization
Instead of selecting between 2 localization strings, use ChoiceFormat to select between singular and plural. Change-Id: I61d28497ddc330870d051569d0468eb3ef93a9ad Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
-rwxr-xr-xorg.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositoryImportWizard.java9
-rw-r--r--org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/messages.properties6
2 files changed, 6 insertions, 9 deletions
diff --git a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositoryImportWizard.java b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositoryImportWizard.java
index c0f02c3e..e450f25c 100755
--- a/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositoryImportWizard.java
+++ b/org.eclipse.mylyn.github.ui/src/org/eclipse/mylyn/internal/github/ui/RepositoryImportWizard.java
@@ -103,16 +103,13 @@ public class RepositoryImportWizard extends Wizard implements IImportWizard {
public boolean performFinish() {
final SearchRepository[] repositories = repositorySearchWizardPage
.getRepositories();
- String name = repositories.length != 1 ? MessageFormat.format(
+ String name = MessageFormat.format(
Messages.RepositoryImportWizard_CloningRepositories,
- Integer.valueOf(repositories.length))
- : Messages.RepositoryImportWizard_CloningRepository;
+ Integer.valueOf(repositories.length));
Job job = new Job(name) {
@Override
protected IStatus run(IProgressMonitor monitor) {
- monitor.beginTask(
- Messages.RepositoryImportWizard_CloningRepository,
- repositories.length * 3);
+ monitor.beginTask(name, repositories.length * 3);
GitHubClient client = GitHub
.configureClient(new GitHubClient());
RepositoryUtil repositoryUtil = Activator.getDefault()
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 91187f2b..be839ef5 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
@@ -5,11 +5,11 @@ CredentialsWizardPage_LabelPassword=Password:
CredentialsWizardPage_LabelUser=User ID:
CredentialsWizardPage_Title=GitHub Credentials
RepositoryImportWizard_Cloning=Cloning {0}
-RepositoryImportWizard_CloningRepositories=Cloning {0} repositories from GitHub
-RepositoryImportWizard_CloningRepository=Cloning 1 repository from GitHub
+RepositoryImportWizard_CloningRepositories=Cloning {0,choice,1#1 repository|1<{0} repositories} from GitHub
+RepositoryImportWizard_CloningRepository=Cloning repository from GitHub
RepositoryImportWizard_CreatingOperation=Creating clone operation for {0}
RepositoryImportWizard_Registering=Registering repository for {0}
-RepositorySearchWizardPage_Found=Found {0} repositories
+RepositorySearchWizardPage_Found=Found {0,choice,0#no repository|1#1 repository|1<{0} repositories}
RepositorySearchWizardPage_Error=Error searching repositories: {0}
RepositorySearchWizardPage_AnyLanguage=Any Language
RepositorySearchWizardPage_Description=Search for repositories to clone

Back to the top