]> source.dussan.org Git - gitblit.git/commitdiff
Externalized a bunch of strings for translation
authorJames Moger <james.moger@gitblit.com>
Mon, 26 Mar 2012 02:32:55 +0000 (22:32 -0400)
committerJames Moger <james.moger@gitblit.com>
Mon, 26 Mar 2012 02:32:55 +0000 (22:32 -0400)
20 files changed:
docs/04_releases.mkd
src/com/gitblit/wicket/GitBlitWebApp.properties
src/com/gitblit/wicket/GitBlitWebApp_ja.properties
src/com/gitblit/wicket/pages/ChangePasswordPage.java
src/com/gitblit/wicket/pages/EditRepositoryPage.java
src/com/gitblit/wicket/pages/EditTeamPage.java
src/com/gitblit/wicket/pages/EditUserPage.java
src/com/gitblit/wicket/pages/FederationRegistrationPage.java
src/com/gitblit/wicket/pages/GravatarProfilePage.java
src/com/gitblit/wicket/pages/LuceneSearchPage.java
src/com/gitblit/wicket/pages/MetricsPage.java
src/com/gitblit/wicket/pages/PatchPage.java
src/com/gitblit/wicket/pages/RawPage.java
src/com/gitblit/wicket/pages/RepositoriesPage.java
src/com/gitblit/wicket/pages/RepositoryPage.java
src/com/gitblit/wicket/pages/ReviewProposalPage.java
src/com/gitblit/wicket/pages/RootPage.java
src/com/gitblit/wicket/pages/SendProposalPage.java
src/com/gitblit/wicket/pages/SummaryPage.java
src/com/gitblit/wicket/pages/TagPage.java

index 5fec6e990d740da759ad340520d6b59db17f2c4b..f4c182f677572c281d45562c0e0b01d220199a2c 100644 (file)
@@ -36,6 +36,7 @@ Push requests to these repositories will be rejected.
 - 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
index 4300c04b686c3d024d59bc16cd29bbbd4492be7c..e73addc8d261128c2c75940df1a22b8a17fe4c24 100644 (file)
@@ -216,6 +216,8 @@ gb.workingCopy = working copy
 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
@@ -223,4 +225,49 @@ gb.indexedBranchesDescription = select the branches to include in your Lucene in
 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
index 87bea04b0edf2afa3074d1333a7f3ee5f50157c3..ebf19abda7f4af4925a0c5be8b204c037da4bad2 100755 (executable)
@@ -131,6 +131,7 @@ gb.registrations = federation registrations
 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
@@ -213,3 +214,60 @@ gb.reset = \u30ea\u30bb\u30c3\u30c8
 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
index d7c774d90784a6e3c6937bf0f816eb933676dbbd..5e15c8fc8fd8b339120012363b173fd59d7483b4 100644 (file)
@@ -62,7 +62,7 @@ public class ChangePasswordPage extends RootSubPage {
                                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
@@ -72,8 +72,7 @@ public class ChangePasswordPage extends RootSubPage {
                                        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
@@ -102,7 +101,7 @@ public class ChangePasswordPage extends RootSubPage {
                                        return;\r
                                }\r
                                setRedirect(false);\r
-                               info("Password successfully changed.");\r
+                               info(getString("gb.passwordChanged"));\r
                                setResponsePage(RepositoriesPage.class);\r
                        }\r
                };\r
@@ -114,14 +113,14 @@ public class ChangePasswordPage extends RootSubPage {
                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
index c2fc9f5f5c1d7447b33cf3ed2bfee8bdbbd2a152..ded154554dedb3afb6257d9a5bdbe7434b7f473a 100644 (file)
@@ -158,7 +158,7 @@ public class EditRepositoryPage extends RootSubPage {
                                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
@@ -169,35 +169,35 @@ public class EditRepositoryPage extends RootSubPage {
 \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
@@ -332,8 +332,8 @@ public class EditRepositoryPage extends RootSubPage {
                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
index 2ed5fba68deb9a47ebc42399b036dc1a80452d45..feab1aa9b4c2892140fcd1d2916fc5ae59d293ce 100644 (file)
@@ -135,13 +135,13 @@ public class EditTeamPage extends RootSubPage {
                        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
@@ -151,7 +151,7 @@ public class EditTeamPage extends RootSubPage {
                                        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
@@ -206,7 +206,7 @@ public class EditTeamPage extends RootSubPage {
                                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
@@ -232,8 +232,8 @@ public class EditTeamPage extends RootSubPage {
                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
index 3e14d08347e4c1fbd7f1c06b4ff7997634e121be..ecc45924a0863156f1cc183ed601845f2e3ecf1c 100644 (file)
@@ -110,7 +110,7 @@ public class EditUserPage extends RootSubPage {
                        @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
@@ -119,14 +119,14 @@ public class EditUserPage extends RootSubPage {
                                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
@@ -139,8 +139,7 @@ public class EditUserPage extends RootSubPage {
                                                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
@@ -158,7 +157,7 @@ public class EditUserPage extends RootSubPage {
                                        }\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
@@ -189,7 +188,7 @@ public class EditUserPage extends RootSubPage {
                                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
@@ -216,8 +215,8 @@ public class EditUserPage extends RootSubPage {
                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
index e480eb76881383954fffb1e432a9f1c340a1a45d..751dac8f19e6691fd712491e3e00ba09fc5e7d1a 100644 (file)
@@ -41,7 +41,7 @@ public class FederationRegistrationPage extends RootSubPage {
 \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
index 0fa90095244a78c32b0afe1f0f50e2c8d26592bc..e8a96fd1ee5b2105805b7b8d7ec3123ea5777ab8 100644 (file)
@@ -49,11 +49,11 @@ public class GravatarProfilePage extends RootPage {
                                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
index ea94fa43eab7e1cbdd03d7e824865879375cd066..2894add427b5b04a1cdd628ac0bc8f30a336a8b7 100644 (file)
@@ -164,14 +164,14 @@ public class LuceneSearchPage extends RootPage {
                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
index 7a84f76ea5e3a4d75a27dda4834948108befeb86..f6df7c51e874aebd3fc4dbd4385ac9616971a595 100644 (file)
@@ -61,7 +61,7 @@ public class MetricsPage extends RepositoryPage {
                        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
index 04934735f4961c67f9a742290c4504ed21028de6..878cfb457c0c7e3e8701bc524ea84fb240f57fb6 100644 (file)
@@ -34,7 +34,7 @@ public class PatchPage extends WebPage {
                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
@@ -46,14 +46,14 @@ public class PatchPage extends WebPage {
 \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
index c1ebea5ceef1dc4f7c2fa67c06c10d6f38b0413a..f71d986f05bc66560cbb041015d122fdc41e5974 100644 (file)
@@ -37,7 +37,7 @@ public class RawPage extends WebPage {
                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
@@ -46,7 +46,7 @@ public class RawPage extends WebPage {
 \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
index 839f4e3469a33002184d11396a91f92b4eedbe6a..40d1a6527cca353e92ef3b89e2bed5bb9fe04d93 100644 (file)
@@ -126,11 +126,11 @@ public class RepositoriesPage extends RootPage {
                                                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
@@ -146,7 +146,7 @@ public class RepositoriesPage extends RootPage {
                        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
index d90d6273d0144636d0c6ef667be47f4f13a735ac..3f57fbf39a792149a6556432bab21d47dcabd9be 100644 (file)
@@ -73,7 +73,7 @@ public abstract class RepositoryPage extends BasePage {
                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
@@ -177,7 +177,7 @@ public abstract class RepositoryPage extends BasePage {
                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
@@ -190,7 +190,7 @@ public abstract class RepositoryPage extends BasePage {
                        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
@@ -201,7 +201,7 @@ public abstract class RepositoryPage extends BasePage {
        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
@@ -347,7 +347,6 @@ public abstract class RepositoryPage extends BasePage {
                        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
index 2b095f979ab0d77f739e972132c4cf86eead6cd2..25ceb65dc37234e98716dffb830dec4d51566c52 100644 (file)
@@ -46,7 +46,7 @@ public class ReviewProposalPage extends RootSubPage {
 \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
index d7b3ab73dcd4a3d43889102b511045a533abccc3..deb2f4b4184d17079213630f79f49cbdefabdc12 100644 (file)
@@ -130,11 +130,11 @@ public abstract class RootPage extends BasePage {
 \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
@@ -162,9 +162,9 @@ public abstract class RootPage extends BasePage {
                } 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
index a7fcadcf575d31527498c33bd076d87909775f8d..e97a090f6e7bd8150824a57ac2e3d872d16f5923 100644 (file)
@@ -59,7 +59,7 @@ public class SendProposalPage extends RootSubPage {
                // 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
@@ -72,11 +72,11 @@ public class SendProposalPage extends RootSubPage {
                        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
@@ -89,32 +89,29 @@ public class SendProposalPage extends RootSubPage {
                                                        .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
@@ -122,7 +119,7 @@ public class SendProposalPage extends RootSubPage {
                                        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
@@ -133,8 +130,8 @@ public class SendProposalPage extends RootSubPage {
                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
index 7e8995ede21a87dc80898c6c115d298499c48fb5..2996b662df12d8a5c06fd9c4b91f6639729ec67c 100644 (file)
@@ -89,7 +89,7 @@ public class SummaryPage extends RepositoryPage {
                        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
index acdd77f381576fefa0a41c5f03b55230eb3c05df..b7a53747b2083c51cfa722c23b891c1ded32e7b2 100644 (file)
@@ -51,7 +51,7 @@ public class TagPage extends RepositoryPage {
 \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