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
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
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
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ón requiere identificarse\r
+gb.errorOnlyAdminMayCreateRepository = Sólo un administrador puede crear un repositorio\r
+gb.errorOnlyAdminOrOwnerMayEditRepository = Sólo un administrador o el propietario puede editar un repositorio\r
+gb.errorAdministrationDisabled = La administración está desactivada\r
+gb.lastNDays = \u00FAltimos {0} d\u00EDas\r
+gb.completeGravatarProfile = Perfil completo en Gravatar.com\r
+gb.none = nadie\r
+gb.line = Línea\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
<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
\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
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
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
} 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
<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
\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
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
}\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
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
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
@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
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