- Added *protect-refs.groovy* (Github/plm) \r
- Allow setting default branch (relinking HEAD) to a branch or a tag (Github/plm)\r
- Added Ubuntu service init script (issue 72)\r
+- Added partial Japanese translation (Github/zakki)\r
\r
#### fixes \r
\r
gb.workingCopyWarning = this repository has a working copy and can not receive pushes\r
gb.query = query\r
gb.queryHelp = Standard query syntax is supported.<p/><p/>Please see <a target="_new" href="http://lucene.apache.org/core/old_versioned_docs/versions/3_5_0/queryparsersyntax.html">Lucene Query Parser Syntax</a> for details.\r
+gb.queryResults = results {0} - {1} ({2} hits)\r
+gb.noHits = no hits\r
gb.authored = authored\r
gb.committed = committed\r
gb.indexedBranches = indexed branches\r
gb.noIndexedRepositoriesWarning = none of your repositories are configured for Lucene indexing\r
gb.undefinedQueryWarning = query is undefined!\r
gb.noSelectedRepositoriesWarning = please select one or more repositories!\r
-gb.luceneDisabled = Lucene indexing is disabled
\ No newline at end of file
+gb.luceneDisabled = Lucene indexing is disabled\r
+gb.failedtoRead = Failed to read\r
+gb.isNotValidFile = is not a valid file\r
+gb.failedToReadMessage = Failed to read default message from {0}!\r
+gb.passwordsDoNotMatch = Passwords do not match!\r
+gb.passwordTooShort = Password is too short. Minimum length is {0} characters.\r
+gb.passwordChanged = Password successfully changed.\r
+gb.passwordChangeAborted = Password change aborted.\r
+gb.pleaseSetRepositoryName = Please set repository name!\r
+gb.illegalLeadingSlash = Leading root folder references (/) are prohibited.\r
+gb.illegalRelativeSlash = Relative folder references (../) are prohibited.\r
+gb.illegalCharacterRepositoryName = Illegal character ''{0}'' in repository name!\r
+gb.selectAccessRestriction = Please select access restriction!\r
+gb.selectFederationStrategy = Please select federation strategy!\r
+gb.pleaseSetTeamName = Please enter a teamname!\r
+gb.teamNameUnavailable = Team name ''{0}'' is unavailable.\r
+gb.teamMustSpecifyRepository = A team must specify at least one repository.\r
+gb.teamCreated = New team ''{0}'' successfully created.\r
+gb.pleaseSetUsername = Please enter a username!\r
+gb.usernameUnavailable = Username ''{0}'' is unavailable.\r
+gb.combinedMd5Rename = Gitblit is configured for combined-md5 password hashing. You must enter a new password on account rename.\r
+gb.userCreated = New user ''{0}'' successfully created.\r
+gb.couldNotFindFederationRegistration = Could not find federation registration!\r
+gb.failedToFindGravatarProfile = Failed to find Gravatar profile for {0}\r
+gb.branchStats = {0} commits and {1} tags in {2}\r
+gb.repositoryNotSpecified = Repository not specified!\r
+gb.repositoryNotSpecifiedFor = Repository not specified for {0}!\r
+gb.canNotLoadRepository = Can not load repository\r
+gb.commitIsNull = Commit is null\r
+gb.unauthorizedAccessForRepository = Unauthorized access for repository\r
+gb.failedToFindCommit = Failed to find commit \"{0}\" in {1} for {2} page!\r
+gb.couldNotFindFederationProposal = Could not find federation proposal!\r
+gb.invalidUsernameOrPassword = Invalid username or password!\r
+gb.OneProposalToReview = There is 1 federation proposal awaiting review. \r
+gb.nFederationProposalsToReview = There are {0} federation proposals awaiting review.\r
+gb.couldNotFindTag = Could not find tag {0}\r
+gb.couldNotCreateFederationProposal = Could not create federation proposal!\r
+gb.pleaseSetGitblitUrl = Please enter your Gitblit url!\r
+gb.pleaseSetDestinationUrl = Please enter a destination url for your proposal!\r
+gb.proposalReceived = Proposal successfully received by {0}.\r
+gb.noGitblitFound = Sorry, {0} could not find a Gitblit instance at {1}.\r
+gb.noProposals = Sorry, {0} is not accepting proposals at this time.\r
+gb.noFederation = Sorry, {0} is not configured to federate with any Gitblit instances.\r
+gb.proposalFailed = Sorry, {0} did not receive any proposal data!\r
+gb.proposalError = Sorry, {0} reports that an unexpected error occurred!\r
+gb.failedToSendProposal = Failed to send proposal!
\ No newline at end of file
gb.sendProposal = propose\r
gb.status = status\r
gb.origin = origin\r
+gb.headRef = default branch (HEAD) \r
gb.headRefDescription = HEAD \u306e\u30ea\u30f3\u30af\u5148 ref \u3092\u5909\u66f4\u3059\u308b e.g. refs/heads/master\r
gb.federationStrategy = federation strategy\r
gb.federationRegistration = federation registration\r
gb.pages = \u30da\u30fc\u30b8\r
gb.workingCopy = \u4f5c\u696d\u30b3\u30d4\u30fc\r
gb.workingCopyWarning = \u3053\u306e\u30ea\u30dd\u30b8\u30c8\u30ea\u306b\u306f\u4f5c\u696d\u30b3\u30d4\u30fc\u304c\u3042\u308b\u305f\u3081 push \u3067\u304d\u307e\u305b\u3093\r
+gb.query = query\r
+gb.queryHelp = Standard query syntax is supported.<p/><p/>Please see <a target="_new" href="http://lucene.apache.org/core/old_versioned_docs/versions/3_5_0/queryparsersyntax.html">Lucene Query Parser Syntax</a> for details.\r
+gb.queryResults = results {0} - {1} ({2} hits)\r
+gb.noHits = no hits\r
+gb.authored = authored\r
+gb.committed = committed\r
+gb.indexedBranches = indexed branches\r
+gb.indexedBranchesDescription = select the branches to include in your Lucene index\r
+gb.noIndexedRepositoriesWarning = none of your repositories are configured for Lucene indexing\r
+gb.undefinedQueryWarning = query is undefined!\r
+gb.noSelectedRepositoriesWarning = please select one or more repositories!\r
+gb.luceneDisabled = Lucene indexing is disabled\r
+gb.failedtoRead = Failed to read\r
+gb.isNotValidFile = is not a valid file\r
+gb.failedToReadMessage = Failed to read default message from {0}!\r
+gb.passwordsDoNotMatch = Passwords do not match!\r
+gb.passwordTooShort = Password is too short. Minimum length is {0} characters.\r
+gb.passwordChanged = Password successfully changed.\r
+gb.passwordChangeAborted = Password change aborted.\r
+gb.pleaseSetRepositoryName = Please set repository name!\r
+gb.illegalLeadingSlash = Leading root folder references (/) are prohibited.\r
+gb.illegalRelativeSlash = Relative folder references (../) are prohibited.\r
+gb.illegalCharacterRepositoryName = Illegal character ''{0}'' in repository name!\r
+gb.selectAccessRestriction = Please select access restriction!\r
+gb.selectFederationStrategy = Please select federation strategy!\r
+gb.pleaseSetTeamName = Please enter a teamname!\r
+gb.teamNameUnavailable = Team name ''{0}'' is unavailable.\r
+gb.teamMustSpecifyRepository = A team must specify at least one repository.\r
+gb.teamCreated = New team ''{0}'' successfully created.\r
+gb.pleaseSetUsername = Please enter a username!\r
+gb.usernameUnavailable = Username ''{0}'' is unavailable.\r
+gb.combinedMd5Rename = Gitblit is configured for combined-md5 password hashing. You must enter a new password on account rename.\r
+gb.userCreated = New user ''{0}'' successfully created.\r
+gb.couldNotFindFederationRegistration = Could not find federation registration!\r
+gb.failedToFindGravatarProfile = Failed to find Gravatar profile for {0}\r
+gb.branchStats = {0} commits and {1} tags in {2}\r
+gb.repositoryNotSpecified = Repository not specified!\r
+gb.repositoryNotSpecifiedFor = Repository not specified for {0}!\r
+gb.canNotLoadRepository = Can not load repository\r
+gb.commitIsNull = Commit is null\r
+gb.unauthorizedAccessForRepository = Unauthorized access for repository\r
+gb.failedToFindCommit = Failed to find commit \"{0}\" in {1} for {2} page!\r
+gb.couldNotFindFederationProposal = Could not find federation proposal!\r
+gb.invalidUsernameOrPassword = Invalid username or password!\r
+gb.OneProposalToReview = There is 1 federation proposal awaiting review. \r
+gb.nFederationProposalsToReview = There are {0} federation proposals awaiting review.\r
+gb.couldNotFindTag = Could not find tag {0}\r
+gb.couldNotCreateFederationProposal = Could not create federation proposal!\r
+gb.pleaseSetGitblitUrl = Please enter your Gitblit url!\r
+gb.pleaseSetDestinationUrl = Please enter a destination url for your proposal!\r
+gb.proposalReceived = Proposal successfully received by {0}.\r
+gb.noGitblitFound = Sorry, {0} could not find a Gitblit instance at {1}.\r
+gb.noProposals = Sorry, {0} is not accepting proposals at this time.\r
+gb.noFederation = Sorry, {0} is not configured to federate with any Gitblit instances.\r
+gb.proposalFailed = Sorry, {0} did not receive any proposal data!\r
+gb.proposalError = Sorry, {0} reports that an unexpected error occurred!\r
+gb.failedToSendProposal = Failed to send proposal!
\ No newline at end of file
String confirmPassword = ChangePasswordPage.this.confirmPassword.getObject();\r
// ensure passwords match\r
if (!password.equals(confirmPassword)) {\r
- error("Passwords do not match!");\r
+ error(getString("gb.passwordsDoNotMatch"));\r
return;\r
}\r
\r
minLength = 4;\r
}\r
if (password.length() < minLength) {\r
- error(MessageFormat.format(\r
- "Password is too short. Minimum length is {0} characters.", minLength));\r
+ error(MessageFormat.format(getString("gb.passwordTooShort"), minLength));\r
return;\r
}\r
\r
return;\r
}\r
setRedirect(false);\r
- info("Password successfully changed.");\r
+ info(getString("gb.passwordChanged"));\r
setResponsePage(RepositoriesPage.class);\r
}\r
};\r
confirmPasswordField.setResetPassword(false);\r
form.add(confirmPasswordField);\r
\r
- form.add(new Button("save"));\r
- Button cancel = new Button("cancel") {\r
+ form.add(new Button(getString("gb.save")));\r
+ Button cancel = new Button(getString("gb.cancel")) {\r
private static final long serialVersionUID = 1L;\r
\r
@Override\r
public void onSubmit() {\r
setRedirect(false);\r
- error("Password change aborted.");\r
+ error(getString("gb.passwordChangeAborted"));\r
setResponsePage(RepositoriesPage.class);\r
}\r
};\r
try {\r
// confirm a repository name was entered\r
if (StringUtils.isEmpty(repositoryModel.name)) {\r
- error("Please set repository name!");\r
+ error(getString("gb.pleaseSetRepositoryName"));\r
return;\r
}\r
\r
\r
// prohibit folder paths\r
if (repositoryModel.name.startsWith("/")) {\r
- error("Leading root folder references (/) are prohibited.");\r
+ error(getString("gb.illegalLeadingSlash"));\r
return;\r
}\r
if (repositoryModel.name.startsWith("../")) {\r
- error("Relative folder references (../) are prohibited.");\r
+ error(getString("gb.illegalRelativeSlash"));\r
return;\r
}\r
if (repositoryModel.name.contains("/../")) {\r
- error("Relative folder references (../) are prohibited.");\r
+ error(getString("gb.illegalRelativeSlash"));\r
return;\r
}\r
\r
// confirm valid characters in repository name\r
Character c = StringUtils.findInvalidCharacter(repositoryModel.name);\r
if (c != null) {\r
- error(MessageFormat.format("Illegal character ''{0}'' in repository name!",\r
+ error(MessageFormat.format(getString("gb.illegalCharacterRepositoryName"),\r
c));\r
return;\r
}\r
\r
// confirm access restriction selection\r
if (repositoryModel.accessRestriction == null) {\r
- error("Please select access restriction!");\r
+ error(getString("gb.selectAccessRestriction"));\r
return;\r
}\r
\r
// confirm federation strategy selection\r
if (repositoryModel.federationStrategy == null) {\r
- error("Please select federation strategy!");\r
+ error(getString("gb.selectFederationStrategy"));\r
return;\r
}\r
\r
form.add(new BulletListPanel("inheritedPostReceive", "inherited", GitBlit.self()\r
.getPostReceiveScriptsInherited(repositoryModel)));\r
\r
- form.add(new Button("save"));\r
- Button cancel = new Button("cancel") {\r
+ form.add(new Button(getString("gb.save")));\r
+ Button cancel = new Button(getString("gb.cancel")) {\r
private static final long serialVersionUID = 1L;\r
\r
@Override\r
protected void onSubmit() {\r
String teamname = teamModel.name;\r
if (StringUtils.isEmpty(teamname)) {\r
- error("Please enter a teamname!");\r
+ error(getString("gb.pleaseSetTeamName"));\r
return;\r
}\r
if (isCreate) {\r
TeamModel model = GitBlit.self().getTeamModel(teamname);\r
if (model != null) {\r
- error(MessageFormat.format("Team name ''{0}'' is unavailable.", teamname));\r
+ error(MessageFormat.format(getString("gb.teamNameUnavailable"), teamname));\r
return;\r
}\r
}\r
repos.add(selectedRepositories.next().toLowerCase());\r
}\r
if (repos.size() == 0) {\r
- error("A team must specify at least one repository.");\r
+ error(getString("gb.teamMustSpecifyRepository"));\r
return;\r
}\r
teamModel.repositories.clear();\r
setRedirect(false);\r
if (isCreate) {\r
// create another team\r
- info(MessageFormat.format("New team ''{0}'' successfully created.",\r
+ info(MessageFormat.format(getString("gb.teamCreated"),\r
teamModel.name));\r
}\r
// back to users page\r
form.add(new BulletListPanel("inheritedPostReceive", "inherited", GitBlit.self()\r
.getPostReceiveScriptsInherited(null)));\r
\r
- form.add(new Button("save"));\r
- Button cancel = new Button("cancel") {\r
+ form.add(new Button(getString("gb.save")));\r
+ Button cancel = new Button(getString("gb.cancel")) {\r
private static final long serialVersionUID = 1L;\r
\r
@Override\r
@Override\r
protected void onSubmit() {\r
if (StringUtils.isEmpty(userModel.username)) {\r
- error("Please enter a username!");\r
+ error(getString("gb.pleaseSetUsername"));\r
return;\r
}\r
// force username to lower-case\r
if (isCreate) {\r
UserModel model = GitBlit.self().getUserModel(username);\r
if (model != null) {\r
- error(MessageFormat.format("Username ''{0}'' is unavailable.", username));\r
+ error(MessageFormat.format(getString("gb.usernameUnavailable"), username));\r
return;\r
}\r
}\r
boolean rename = !StringUtils.isEmpty(oldName)\r
&& !oldName.equalsIgnoreCase(username);\r
if (!userModel.password.equals(confirmPassword.getObject())) {\r
- error("Passwords do not match!");\r
+ error(getString("gb.passwordsDoNotMatch"));\r
return;\r
}\r
String password = userModel.password;\r
minLength = 4;\r
}\r
if (password.trim().length() < minLength) {\r
- error(MessageFormat.format(\r
- "Password is too short. Minimum length is {0} characters.",\r
+ error(MessageFormat.format(getString("gb.passwordTooShort"),\r
minLength));\r
return;\r
}\r
}\r
} else if (rename\r
&& password.toUpperCase().startsWith(StringUtils.COMBINED_MD5_TYPE)) {\r
- error("Gitblit is configured for combined-md5 password hashing. You must enter a new password on account rename.");\r
+ error(getString("gb.combinedMd5Rename"));\r
return;\r
}\r
\r
setRedirect(false);\r
if (isCreate) {\r
// create another user\r
- info(MessageFormat.format("New user ''{0}'' successfully created.",\r
+ info(MessageFormat.format(getString("gb.userCreated"),\r
userModel.username));\r
setResponsePage(EditUserPage.class);\r
} else {\r
form.add(repositories);\r
form.add(teams);\r
\r
- form.add(new Button("save"));\r
- Button cancel = new Button("cancel") {\r
+ form.add(new Button(getString("gb.save")));\r
+ Button cancel = new Button(getString("gb.cancel")) {\r
private static final long serialVersionUID = 1L;\r
\r
@Override\r
\r
FederationModel registration = GitBlit.self().getFederationRegistration(url, name);\r
if (registration == null) {\r
- error("Could not find federation registration!", true);\r
+ error(getString("gb.couldNotFindFederationRegistration"), true);\r
}\r
\r
setupPage(registration.isResultData() ? getString("gb.federationResults")\r
profile = ActivityUtils.getGravatarProfile(object);\r
}\r
} catch (IOException e) {\r
- error(MessageFormat.format("Failed to find Gravatar profile for {0}", object), e, true);\r
+ error(MessageFormat.format(getString("gb.failedToFindGravatarProfile"), object), e, true);\r
}\r
\r
if (profile == null) {\r
- error(MessageFormat.format("Failed to find Gravatar profile for {0}", object), true);\r
+ error(MessageFormat.format(getString("gb.failedToFindGravatarProfile"), object), true);\r
}\r
add(new Label("displayName", profile.displayName));\r
add(new Label("username", profile.preferredUsername));\r
if (results.size() == 0) {\r
if (!ArrayUtils.isEmpty(searchRepositories) && !StringUtils.isEmpty(query)) {\r
add(new Label("resultsHeader", query).setRenderBodyOnly(true));\r
- add(new Label("resultsCount", "0 hits").setRenderBodyOnly(true));\r
+ add(new Label("resultsCount", getString("gb.noHits")).setRenderBodyOnly(true));\r
} else {\r
add(new Label("resultsHeader").setVisible(false));\r
add(new Label("resultsCount").setVisible(false));\r
}\r
} else {\r
add(new Label("resultsHeader", query).setRenderBodyOnly(true));\r
- add(new Label("resultsCount", MessageFormat.format("results {0} - {1} ({2} hits)",\r
+ add(new Label("resultsCount", MessageFormat.format(getString("gb.queryResults"),\r
results.get(0).hitId, results.get(results.size() - 1).hitId, results.get(0).totalHits)).\r
setRenderBodyOnly(true));\r
}\r
add(new Label("branchStats", ""));\r
} else {\r
add(new Label("branchStats",\r
- MessageFormat.format("{0} commits and {1} tags in {2}", metricsTotal.count,\r
+ MessageFormat.format(getString("gb.branchStats"), metricsTotal.count,\r
metricsTotal.tag, TimeUtils.duration(metricsTotal.duration))));\r
}\r
insertLinePlot("commitsChart", metrics);\r
super(params);\r
\r
if (!params.containsKey("r")) {\r
- GitBlitWebSession.get().cacheErrorMessage("Repository not specified!");\r
+ GitBlitWebSession.get().cacheErrorMessage(getString("gb.repositoryNotSpecified"));\r
redirectToInterceptPage(new RepositoriesPage());\r
return;\r
}\r
\r
Repository r = GitBlit.self().getRepository(repositoryName);\r
if (r == null) {\r
- GitBlitWebSession.get().cacheErrorMessage("Can not load repository " + repositoryName);\r
+ GitBlitWebSession.get().cacheErrorMessage(getString("gb.canNotLoadRepository") + " " + repositoryName);\r
redirectToInterceptPage(new RepositoriesPage());\r
return;\r
}\r
\r
RevCommit commit = JGitUtils.getCommit(r, objectId);\r
if (commit == null) {\r
- GitBlitWebSession.get().cacheErrorMessage("Commit is null");\r
+ GitBlitWebSession.get().cacheErrorMessage(getString("gb.commitIsNull"));\r
redirectToInterceptPage(new RepositoriesPage());\r
return;\r
}\r
super(params);\r
\r
if (!params.containsKey("r")) {\r
- error("Repository not specified!");\r
+ error(getString("gb.repositoryNotSpecified"));\r
redirectToInterceptPage(new RepositoriesPage());\r
}\r
final String repositoryName = WicketUtils.getRepositoryName(params);\r
\r
Repository r = GitBlit.self().getRepository(repositoryName);\r
if (r == null) {\r
- error("Can not load repository " + repositoryName);\r
+ error(getString("gb.canNotLoadRepository") + " " + repositoryName);\r
redirectToInterceptPage(new RepositoriesPage());\r
return;\r
}\r
message = MarkdownUtils.transformMarkdown(reader);\r
reader.close();\r
} catch (Throwable t) {\r
- message = "Failed to read " + file;\r
+ message = getString("gb.failedToRead") + " " + file;\r
warn(message, t);\r
}\r
} else {\r
- message = messageSource + " is not a valid file.";\r
+ message = messageSource + " " + getString("gb.isNotValidFile");\r
}\r
}\r
}\r
message = MarkdownUtils.transformMarkdown(reader);\r
reader.close();\r
} catch (Throwable t) {\r
- message = MessageFormat.format("Failed to read default message from {0}!", file);\r
+ message = MessageFormat.format(getString("gb.failedToReadMessage"), file);\r
error(message, t, false);\r
}\r
return message;\r
objectId = WicketUtils.getObject(params);\r
\r
if (StringUtils.isEmpty(repositoryName)) {\r
- error(MessageFormat.format("Repository not specified for {0}!", getPageName()), true);\r
+ error(MessageFormat.format(getString("gb.repositoryNotSpecifiedFor"), getPageName()), true);\r
}\r
\r
if (!getRepositoryModel().hasCommits) {\r
if (r == null) {\r
Repository r = GitBlit.self().getRepository(repositoryName);\r
if (r == null) {\r
- error("Can not load repository " + repositoryName, true);\r
+ error(getString("gb.canNotLoadRepository") + " " + repositoryName, true);\r
return null;\r
}\r
this.r = r;\r
RepositoryModel model = GitBlit.self().getRepositoryModel(\r
GitBlitWebSession.get().getUser(), repositoryName);\r
if (model == null) {\r
- authenticationError("Unauthorized access for repository " + repositoryName);\r
+ authenticationError(getString("gb.unauthorizedAccessForRepository") + " " + repositoryName);\r
return null;\r
}\r
m = model;\r
protected RevCommit getCommit() {\r
RevCommit commit = JGitUtils.getCommit(r, objectId);\r
if (commit == null) {\r
- error(MessageFormat.format("Failed to find commit \"{0}\" in {1} for {2} page!",\r
+ error(MessageFormat.format(getString("gb.failedToFindCommit"),\r
objectId, repositoryName, getPageName()), true);\r
}\r
return commit;\r
Constants.SearchType searchType = searchTypeModel.getObject();\r
String searchString = searchBoxModel.getObject();\r
if (searchString == null) {\r
- // FIXME IE intermittently has no searchString. Wicket bug?\r
return;\r
}\r
for (Constants.SearchType type : Constants.SearchType.values()) {\r
\r
FederationProposal proposal = GitBlit.self().getPendingFederationProposal(token);\r
if (proposal == null) {\r
- error("Could not find federation proposal!", true);\r
+ error(getString("gb.couldNotFindFederationProposal"), true);\r
}\r
\r
setupPage(getString("gb.proposals"), proposal.url);\r
\r
UserModel user = GitBlit.self().authenticate(username, password);\r
if (user == null) {\r
- error("Invalid username or password!");\r
+ error(getString("gb.invalidUsernameOrPassword"));\r
} else if (user.username.equals(Constants.FEDERATION_USER)) {\r
// disallow the federation user from logging in via the\r
// web ui\r
- error("Invalid username or password!");\r
+ error(getString("gb.invalidUsernameOrPassword"));\r
user = null;\r
} else {\r
loginUser(user);\r
} else if (showAdmin) {\r
int pendingProposals = GitBlit.self().getPendingFederationProposals().size();\r
if (pendingProposals == 1) {\r
- info("There is 1 federation proposal awaiting review.");\r
+ info(getString("gb.OneProposalToReview"));\r
} else if (pendingProposals > 1) {\r
- info(MessageFormat.format("There are {0} federation proposals awaiting review.",\r
+ info(MessageFormat.format(getString("gb.nFederationProposalsToReview"),\r
pendingProposals));\r
}\r
}\r
// temporary proposal\r
FederationProposal proposal = GitBlit.self().createFederationProposal(myUrl, token);\r
if (proposal == null) {\r
- error("Could not create federation proposal!", true);\r
+ error(getString("gb.couldNotCreateFederationProposal"), true);\r
}\r
\r
CompoundPropertyModel<SendProposalPage> model = new CompoundPropertyModel<SendProposalPage>(\r
protected void onSubmit() {\r
// confirm a repository name was entered\r
if (StringUtils.isEmpty(myUrl)) {\r
- error("Please enter your Gitblit url!");\r
+ error(getString("gb.pleaseSetGitblitUrl"));\r
return;\r
}\r
if (StringUtils.isEmpty(destinationUrl)) {\r
- error("Please enter a destination url for your proposal!");\r
+ error(getString("gb.pleaseSetDestinationUrl"));\r
return;\r
}\r
\r
.propose(destinationUrl, proposal);\r
switch (res) {\r
case ACCEPTED:\r
- info(MessageFormat.format("Proposal successfully received by {0}.",\r
+ info(MessageFormat.format(getString("gb.proposalReceived"),\r
destinationUrl));\r
setResponsePage(RepositoriesPage.class);\r
break;\r
case NO_POKE:\r
- error(MessageFormat.format(\r
- "Sorry, {0} could not find a Gitblit instance at {1}.",\r
+ error(MessageFormat.format(getString("noGitblitFound"),\r
destinationUrl, myUrl));\r
break;\r
case NO_PROPOSALS:\r
- error(MessageFormat.format(\r
- "Sorry, {0} is not accepting proposals at this time.",\r
+ error(MessageFormat.format(getString("gb.noProposals"),\r
destinationUrl));\r
break;\r
case FEDERATION_DISABLED:\r
error(MessageFormat\r
- .format("Sorry, {0} is not configured to federate with any Gitblit instances.",\r
+ .format(getString("gb.noFederation"),\r
destinationUrl));\r
break;\r
case MISSING_DATA:\r
- error(MessageFormat.format("Sorry, {0} did not receive any proposal data!",\r
+ error(MessageFormat.format(getString("gb.proposalFailed"),\r
destinationUrl));\r
break;\r
case ERROR:\r
- error(MessageFormat.format(\r
- "Sorry, {0} reports that an unexpected error occurred!",\r
+ error(MessageFormat.format(getString("gb.proposalError"),\r
destinationUrl));\r
break;\r
}\r
if (!StringUtils.isEmpty(e.getMessage())) {\r
error(e.getMessage());\r
} else {\r
- error("Failed to send proposal!");\r
+ error(getString("gb.failedToSendProposal"));\r
}\r
}\r
}\r
form.add(new Label("tokenType", proposal.tokenType.name()));\r
form.add(new Label("token", proposal.token));\r
\r
- form.add(new Button("save"));\r
- Button cancel = new Button("cancel") {\r
+ form.add(new Button(getString("gb.save")));\r
+ Button cancel = new Button(getString("gb.cancel")) {\r
private static final long serialVersionUID = 1L;\r
\r
@Override\r
add(new Label("branchStats", ""));\r
} else {\r
add(new Label("branchStats",\r
- MessageFormat.format("{0} commits and {1} tags in {2}", metricsTotal.count,\r
+ MessageFormat.format(getString("gb.branchStats"), metricsTotal.count,\r
metricsTotal.tag, TimeUtils.duration(metricsTotal.duration))));\r
}\r
add(new BookmarkablePageLink<Void>("metrics", MetricsPage.class,\r
\r
// Failed to find tag!\r
if (tagRef == null) {\r
- error(MessageFormat.format("Could not find tag {0}", objectId), true);\r
+ error(MessageFormat.format(getString("gb.couldNotFindTag"), objectId), true);\r
}\r
\r
// Display tag.\r