]> source.dussan.org Git - gitblit.git/commitdiff
Externalized some more strings. Updated Spanish translation from eguervos.
authorJames Moger <james.moger@gitblit.com>
Fri, 15 Jun 2012 19:50:59 +0000 (15:50 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 15 Jun 2012 19:50:59 +0000 (15:50 -0400)
src/com/gitblit/wicket/GitBlitWebApp.properties
src/com/gitblit/wicket/GitBlitWebApp_es.properties
src/com/gitblit/wicket/pages/BlamePage.html
src/com/gitblit/wicket/pages/CommitDiffPage.java
src/com/gitblit/wicket/pages/EditRepositoryPage.java
src/com/gitblit/wicket/pages/GravatarProfilePage.html
src/com/gitblit/wicket/pages/RepositoriesPage.java
src/com/gitblit/wicket/pages/RootPage.java
src/com/gitblit/wicket/panels/RepositoriesPanel.java
src/com/gitblit/wicket/panels/UsersPanel.java

index 83b716af431bb204a60c68fca400393a177082f8..6d61cc33a405cefffa2d0f63de464730c94b281a 100644 (file)
@@ -276,4 +276,36 @@ gb.failedToSendProposal = Failed to send proposal!
 gb.userServiceDoesNotPermitAddUser = {0} does not permit adding a user account!\r
 gb.userServiceDoesNotPermitPasswordChanges = {0} does not permit password changes!\r
 gb.displayName = display name\r
-gb.emailAddress = email address
\ No newline at end of file
+gb.emailAddress = email address\r
+gb.errorAdminLoginRequired = Administration requires a login\r
+gb.errorOnlyAdminMayCreateRepository = Only an administrator may create a repository\r
+gb.errorOnlyAdminOrOwnerMayEditRepository = Only an administrator or the owner may edit a repository\r
+gb.errorAdministrationDisabled = Administration is disabled\r
+gb.lastNDays = last {0} days\r
+gb.completeGravatarProfile = Complete profile on Gravatar.com\r
+gb.none = none\r
+gb.line = line\r
+gb.content = content\r
+gb.empty = empty\r
+gb.inherited = inherited\r
+gb.deleteRepository = Delete repository \"{0}\"?\r
+gb.repositoryDeleted = Repository ''{0}'' deleted.\r
+gb.repositoryDeleteFailed = Failed to delete repository ''{0}''!\r
+gb.deleteUser = Delete user \"{0}\"?\r
+gb.userDeleted = User ''{0}'' deleted.\r
+gb.userDeleteFailed = Failed to delete user ''{0}''!\r
+gb.time.justNow = just now\r
+gb.time.yesterday = yesterday\r
+gb.time.minsAgo = {0} mins ago\r
+gb.time.hoursAgo = {0} hours ago\r
+gb.time.daysAgo = {0} days ago\r
+gb.time.weeksAgo = {0} weeks ago\r
+gb.time.monthsAgo = {0} months ago\r
+gb.time.oneYearAgo = 1 year ago\r
+gb.time.yearsAgo = {0} years ago\r
+gb.duration.oneDay = 1 day\r
+gb.duration.days = {0} days\r
+gb.duration.oneMonth = 1 month\r
+gb.duration.months = {0} months\r
+gb.duration.oneYear = 1 year\r
+gb.duration.years = {0} years\r
index 47e151bedb2c6515b5c0a11f2d03ee4f52cf9835..fb84e925c4cab9485fbc84465e0b6d2bc32e4aad 100644 (file)
@@ -38,7 +38,7 @@ gb.tickets = Tickets
 gb.pageFirst = Primera\r
 gb.pagePrevious Anterior\r
 gb.pageNext = Siguiente\r
-gb.head = PRINCIPAL\r
+gb.head = HEAD\r
 gb.blame = Acuse\r
 gb.login = Idenfiticarse\r
 gb.logout = Salir\r
@@ -131,8 +131,8 @@ gb.registrations = Registros de federaci\u00F3n
 gb.sendProposal = Proponer\r
 gb.status = Estado\r
 gb.origin = Origen\r
-gb.headRef = Rama por defecto (PRINCIPAL)\r
-gb.headRefDescription = Cambiar la Ref. a la que apunta PRINCIPAL ej. refs/heads/master\r
+gb.headRef = Rama por defecto (HEAD)\r
+gb.headRefDescription = Cambiar la Ref. a la que apunta HEAD ej. refs/heads/master\r
 gb.federationStrategy = Estrategia de federaci\u00F3n\r
 gb.federationRegistration = Registro de federaci\u00F3n\r
 gb.federationResults = Resultados de recibos federados\r
@@ -276,4 +276,36 @@ gb.failedToSendProposal = /u00A1Fallo al enviar la propuesta!
 gb.userServiceDoesNotPermitAddUser = \u00A1{0} no permite a\u00F1adir una cuenta de usuario!\r
 gb.userServiceDoesNotPermitPasswordChanges = \u00A1{0} no permite cambio de contrase\u00F1a!\r
 gb.displayName = Nombre\r
-gb.emailAddress = Direcci\u00F3n de correo
\ No newline at end of file
+gb.emailAddress = Direcci\u00F3n de correo\r
+gb.errorAdminLoginRequired = La administraci&oacute;n requiere identificarse\r
+gb.errorOnlyAdminMayCreateRepository = S&oacute;lo un administrador puede crear un repositorio\r
+gb.errorOnlyAdminOrOwnerMayEditRepository = S&oacute;lo un administrador o el propietario puede editar un repositorio\r
+gb.errorAdministrationDisabled = La administraci&oacute;n est&aacute; desactivada\r
+gb.lastNDays = \u00FAltimos {0} d\u00EDas\r
+gb.completeGravatarProfile = Perfil completo en Gravatar.com\r
+gb.none = nadie\r
+gb.line = L&iacutenea\r
+gb.content = Contenido\r
+gb.empty = vacio\r
+gb.inherited = inherited\r
+gb.deleteRepository = \u00BFBorrar el repositorio \"{0}\"?\r
+gb.repositoryDeleted = Repositorio ''{0}'' borrado.\r
+gb.repositoryDeleteFailed = \u00A1Fallo al borrar el repositorio ''{0}''!\r
+gb.deleteUser = Delete user \"{0}\"?\r
+gb.userDeleted = User ''{0}'' deleted.\r
+gb.userDeleteFailed = Failed to delete user ''{0}''!\r
+gb.time.justNow = just now\r
+gb.time.yesterday = ayer\r
+gb.time.minsAgo = hace {0} min\r
+gb.time.hoursAgo = hace {0} horas\r
+gb.time.daysAgo = hace {0} d\u00EDas\r
+gb.time.weeksAgo = hace {0} semanas\r
+gb.time.monthsAgo = hace {0} meses\r
+gb.time.oneYearAgo = hace 1 a\u00F1o\r
+gb.time.yearsAgo = hace {0} a\u00F1os\r
+gb.duration.oneDay = 1 d\u00EDa\r
+gb.duration.days = {0} d\u00EDas\r
+gb.duration.oneMonth = 1 mes\r
+gb.duration.months = {0} meses\r
+gb.duration.oneYear = 1 a\u00F1o\r
+gb.duration.years = {0} a\u00F1os
\ No newline at end of file
index ccbfcecb7fdf3a979b7d8cea43aa650b341f62ae..9391eaf088f817e17abb372e66484260fecce3b1 100644 (file)
@@ -22,9 +22,9 @@
        <table class="annotated" style="margin-bottom:5px;">\r
                <tbody>\r
                        <tr>\r
-                               <th>Commit</th>\r
-                               <th>Line</th>\r
-                               <th>Content</th>\r
+                               <th><wicket:message key="gb.commit">[commit]</wicket:message></th>\r
+                               <th><wicket:message key="gb.line">[line]</wicket:message></th>\r
+                               <th><wicket:message key="gb.content">[content]</wicket:message></th>\r
                        </tr>\r
                        <tr wicket:id="annotation">\r
                                <td><span class="sha1" wicket:id="commit"></span></td>\r
index c6c9fd7c67e99bf3d5644c1d57f6cac210ab3d6b..cee065bb0fad6f35b13c1f253d57b2b7bf6a3191 100644 (file)
@@ -59,7 +59,7 @@ public class CommitDiffPage extends RepositoryPage {
 \r
                // commit page links\r
                if (parents.size() == 0) {\r
-                       add(new Label("parentLink", "none"));\r
+                       add(new Label("parentLink", getString("gb.none")));\r
                } else {\r
                        add(new LinkPanel("parentLink", null, parents.get(0).substring(0, 8),\r
                                        CommitDiffPage.class, newCommitParameter(parents.get(0))));\r
index 572f650d3638825e858f4784df7ee20414158b1e..a6f6af05804566d9daf2db155a85f3ab2940ca9e 100644 (file)
@@ -371,10 +371,10 @@ public class EditRepositoryPage extends RootSubPage {
                form.add(teamsPalette);\r
                form.add(federationSetsPalette);\r
                form.add(preReceivePalette);\r
-               form.add(new BulletListPanel("inheritedPreReceive", "inherited", GitBlit.self()\r
+               form.add(new BulletListPanel("inheritedPreReceive", getString("gb.inherited"), GitBlit.self()\r
                                .getPreReceiveScriptsInherited(repositoryModel)));\r
                form.add(postReceivePalette);\r
-               form.add(new BulletListPanel("inheritedPostReceive", "inherited", GitBlit.self()\r
+               form.add(new BulletListPanel("inheritedPostReceive", getString("gb.inherited"), GitBlit.self()\r
                                .getPostReceiveScriptsInherited(repositoryModel)));\r
                \r
                WebMarkupContainer customFieldsSection = new WebMarkupContainer("customFieldsSection");\r
@@ -414,13 +414,13 @@ public class EditRepositoryPage extends RootSubPage {
                        if (authenticateAdmin) {\r
                                if (user == null) {\r
                                        // No Login Available\r
-                                       error("Administration requires a login", true);\r
+                                       error(getString("gb.errorAdminLoginRequired"), true);\r
                                }\r
                                if (isCreate) {\r
                                        // Create Repository\r
                                        if (!user.canAdmin) {\r
                                                // Only Administrators May Create\r
-                                               error("Only an administrator may create a repository", true);\r
+                                               error(getString("gb.errorOnlyAdminMayCreateRepository"), true);\r
                                        }\r
                                } else {\r
                                        // Edit Repository\r
@@ -431,14 +431,14 @@ public class EditRepositoryPage extends RootSubPage {
                                        } else {\r
                                                if (!model.owner.equalsIgnoreCase(user.username)) {\r
                                                        // User is not an Admin nor Owner\r
-                                                       error("Only an administrator or the owner may edit a repository", true);\r
+                                                       error(getString("gb.errorOnlyAdminOrOwnerMayEditRepository"), true);\r
                                                }\r
                                        }\r
                                }\r
                        }\r
                } else {\r
                        // No Administration Permitted\r
-                       error("Administration is disabled", true);\r
+                       error(getString("gb.errorAdministrationDisabled"), true);\r
                }\r
        }\r
 \r
index 2a83de732b38abc60d94969d43866de1a1d8a09c..0cc0f1fc76effd421060561cb6bf6145026145c6 100644 (file)
@@ -13,7 +13,7 @@
        <div style="color:#888;"wicket:id="location"></div>\r
        <div style="padding-top:5px;" wicket:id="aboutMe"></div>\r
        <p></p>\r
-       <a wicket:id="profileLink">Complete profile on Gravatar.com</a>\r
+       <a wicket:id="profileLink"><wicket:message key="gb.completeGravatarProfile">[Complete profile on Gravatar.com]</wicket:message></a>\r
        <p></p>\r
 </wicket:extend>\r
 </body>\r
index 40d1a6527cca353e92ef3b89e2bed5bb9fe04d93..98dade6768b903e9945dc0e6e4394efa52c6048a 100644 (file)
@@ -17,6 +17,7 @@ package com.gitblit.wicket.pages;
 \r
 import java.io.File;\r
 import java.io.FileInputStream;\r
+import java.io.FileNotFoundException;\r
 import java.io.InputStream;\r
 import java.io.InputStreamReader;\r
 import java.text.MessageFormat;\r
@@ -26,6 +27,7 @@ import org.apache.wicket.Component;
 import org.apache.wicket.PageParameters;\r
 import org.apache.wicket.markup.html.basic.Label;\r
 import org.apache.wicket.resource.ContextRelativeResource;\r
+import org.apache.wicket.util.resource.ResourceStreamNotFoundException;\r
 import org.eclipse.jgit.lib.Constants;\r
 \r
 import com.gitblit.GitBlit;\r
@@ -138,13 +140,34 @@ public class RepositoriesPage extends RootPage {
        }\r
 \r
        private String readDefaultMarkdown(String file) {\r
+               String content = readDefaultMarkdown(file, getLanguageCode());\r
+               if (StringUtils.isEmpty(content)) {\r
+                       content = readDefaultMarkdown(file, null);\r
+               }\r
+               return content;\r
+       }\r
+       \r
+       private String readDefaultMarkdown(String file, String lc) {\r
+               if (!StringUtils.isEmpty(lc)) {\r
+                       // convert to file_lc.mkd\r
+                       file = file.substring(0, file.lastIndexOf('.')) + "_" + lc + file.substring(file.lastIndexOf('.'));\r
+               }\r
                String message;\r
-               try {\r
+               try {                   \r
                        ContextRelativeResource res = WicketUtils.getResource(file);\r
                        InputStream is = res.getResourceStream().getInputStream();\r
                        InputStreamReader reader = new InputStreamReader(is, Constants.CHARACTER_ENCODING);\r
                        message = MarkdownUtils.transformMarkdown(reader);\r
                        reader.close();\r
+               } catch (ResourceStreamNotFoundException t) {\r
+                       if (lc == null) {\r
+                               // could not find default language resource\r
+                               message = MessageFormat.format(getString("gb.failedToReadMessage"), file);\r
+                               error(message, t, false);\r
+                       } else {\r
+                               // ignore so we can try default language resource\r
+                               message = null;\r
+                       }\r
                } catch (Throwable t) {\r
                        message = MessageFormat.format(getString("gb.failedToReadMessage"), file);\r
                        error(message, t, false);\r
index deb2f4b4184d17079213630f79f49cbdefabdc12..636ed00e8d9520d328daa314b1ac2c2bcaa364f3 100644 (file)
@@ -297,8 +297,9 @@ public abstract class RootPage extends BasePage {
                Set<Integer> choicesSet = new HashSet<Integer>(Arrays.asList(daysBack, 14, 28, 60, 90, 180));\r
                List<Integer> choices = new ArrayList<Integer>(choicesSet);\r
                Collections.sort(choices);\r
+               String lastDaysPattern = getString("gb.lastNDays");\r
                for (Integer db : choices) {\r
-                       String txt = "last " + db + (db.intValue() > 1 ? " days" : "day");\r
+                       String txt = MessageFormat.format(lastDaysPattern, db);\r
                        items.add(new DropDownMenuItem(txt, "db", db.toString(), params));\r
                }\r
                items.add(new DropDownMenuItem());\r
index ee6e119138dc571799e9099a7f16d03104c39202..3b42972026c407156fa39d5866feb43070d42c5b 100644 (file)
@@ -185,7 +185,7 @@ public class RepositoriesPanel extends BasePanel {
                                        row.add(new Label("repositorySize", entry.size).setVisible(showSize));\r
                                } else {\r
                                        // New repository\r
-                                       row.add(new Label("repositorySize", "<span class='empty'>(empty)</span>")\r
+                                       row.add(new Label("repositorySize", "<span class='empty'>(" + getString("gb.empty") + ")</span>")\r
                                                        .setEscapeModelStrings(false));\r
                                }\r
 \r
@@ -262,20 +262,19 @@ public class RepositoriesPanel extends BasePanel {
                                                @Override\r
                                                public void onClick() {\r
                                                        if (GitBlit.self().deleteRepositoryModel(entry)) {\r
-                                                               info(MessageFormat.format("Repository ''{0}'' deleted.", entry));\r
+                                                               info(MessageFormat.format(getString("gb.repositoryDeleted"), entry));\r
                                                                if (dp instanceof SortableRepositoriesProvider) {\r
                                                                        ((SortableRepositoriesProvider) dp).remove(entry);\r
                                                                } else {\r
                                                                        ((RepositoriesProvider) dp).remove(entry);\r
                                                                }\r
                                                        } else {\r
-                                                               error(MessageFormat.format("Failed to delete repository ''{0}''!",\r
-                                                                               entry));\r
+                                                               error(MessageFormat.format(getString("gb.repositoryDeleteFailed"), entry));\r
                                                        }\r
                                                }\r
                                        };\r
                                        deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(\r
-                                                       "Delete repository \"{0}\"?", entry)));\r
+                                                       getString("gb.deleteRepository"), entry)));\r
                                        repositoryLinks.add(deleteLink);\r
                                        row.add(repositoryLinks);\r
                                } else if (showOwner) {\r
index ecf4537d0617323943797faef825b8dc77757386..39a5963a3914f07d80921c53c8a153127f04337a 100644 (file)
@@ -87,15 +87,15 @@ public class UsersPanel extends BasePanel {
                                        public void onClick() {\r
                                                if (GitBlit.self().deleteUser(entry.username)) {\r
                                                        users.remove(entry);\r
-                                                       info(MessageFormat.format("User ''{0}'' deleted.", entry.username));\r
+                                                       info(MessageFormat.format(getString("gb.userDeleted"), entry.username));\r
                                                } else {\r
-                                                       error(MessageFormat.format("Failed to delete user ''{0}''!",\r
+                                                       error(MessageFormat.format(getString("gb.deleteUserFailed"),\r
                                                                        entry.username));\r
                                                }\r
                                        }\r
                                };\r
                                deleteLink.add(new JavascriptEventConfirmation("onclick", MessageFormat.format(\r
-                                               "Delete user \"{0}\"?", entry.username)));\r
+                                               getString("gb.deleteUser"), entry.username)));\r
                                userLinks.add(deleteLink);\r
                                item.add(userLinks);\r
 \r