From 90d07f5768af79e33fe044843e0ee1a47a979706 Mon Sep 17 00:00:00 2001 From: James Moger Date: Sat, 4 May 2013 07:49:14 -0400 Subject: [PATCH] Simplified "clone with" translation strings --- .../gitblit/wicket/GitBlitWebApp.properties | 5 +---- .../wicket/panels/RepositoryUrlPanel.java | 21 +++++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties b/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties index 4752e99d..c0c9b5b8 100644 --- a/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties +++ b/src/main/java/com/gitblit/wicket/GitBlitWebApp.properties @@ -452,7 +452,4 @@ gb.incrementalPushTagMessage = Auto-tagged [{0}] branch on push gb.externalPermissions = {0} access permissions for {1} are externally maintained gb.viewAccess = You do not have Gitblit read or write access gb.yourProtocolPermissionIs = Your {0} access permission for {1} is {2} -gb.cloneWithSparkleShare = clone with SparkleShare\u2122 -gb.cloneWithSourceTree = clone with SourceTree\u2122 -gb.cloneWithGitHub = clone with GitHub\u2122 for {0} -gb.cloneWithSmartGit = clone with SmartGit\u2122 \ No newline at end of file +gb.cloneWithApp = clone with {0} \ No newline at end of file diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java index 3afb7b15..892f1ca8 100644 --- a/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java @@ -83,36 +83,39 @@ public class RepositoryUrlPanel extends BasePanel { add(new Label("repositoryGitDaemonUrl").setVisible(false)); } + String cloneWith = localizer.getString("gb.cloneWithApp", owner); final List cloneLinks = new ArrayList(); if (user.canClone(repository) && GitBlit.getBoolean(Keys.web.allowAppCloneLinks, true)) { // universal app clone urls -// cloneLinks.add(new AppCloneLink(localizer.getString("gb.cloneWithSmartGit", owner), +// cloneLinks.add(new AppCloneLink(MessageFormat.format(cloneWith, "SmartGit\u2122"), // MessageFormat.format("smartgit://cloneRepo/{0}", primaryUrl), // "Syntevo SmartGit\u2122")); if (isWindows()) { // Windows client app clone urls - cloneLinks.add(new AppCloneLink(localizer.getString("gb.cloneWithSourceTree", owner), + cloneLinks.add(new AppCloneLink(MessageFormat.format(cloneWith, "SourceTree\u2122"), MessageFormat.format("sourcetree://cloneRepo/{0}", primaryUrl), "Atlassian SourceTree\u2122")); // cloneLinks.add(new AppCloneLink( -// MessageFormat.format(localizer.getString("gb.cloneWithGitHub", owner), "Windows"), -// MessageFormat.format("github-windows://openRepo/{0}", primaryUrl))); +// MessageFormat.format(cloneWith, "GitHub\u2122 for Windows"), +// MessageFormat.format("github-windows://openRepo/{0}", primaryUrl), +// "GitHub\u2122 for Windows")); } else if (isMac()) { // Mac client app clone urls - cloneLinks.add(new AppCloneLink(localizer.getString("gb.cloneWithSourceTree", owner), + cloneLinks.add(new AppCloneLink(MessageFormat.format(cloneWith, "SourceTree\u2122"), MessageFormat.format("sourcetree://cloneRepo/{0}", primaryUrl), "Atlassian SourceTree\u2122")); // cloneLinks.add(new AppCloneLink( -// MessageFormat.format(localizer.getString("gb.cloneWithGitHub", owner), "Mac"), -// MessageFormat.format("github-mac://openRepo/{0}", primaryUrl))); +// MessageFormat.format(cloneWith, "GitHub\u2122 for Mac"), +// MessageFormat.format("github-mac://openRepo/{0}", primaryUrl), +// "GitHub\u2122 for Mac")); } // sparkleshare invite url String sparkleshareUrl = getSparkleShareInviteUrl(user, repository); if (!StringUtils.isEmpty(sparkleshareUrl)) { - cloneLinks.add(new AppCloneLink(localizer.getString("gb.cloneWithSparkleShare", owner), - sparkleshareUrl, "SparkleShare \u2122", "icon-star")); + cloneLinks.add(new AppCloneLink(MessageFormat.format(cloneWith, "SparkleShare\u2122"), + sparkleshareUrl, "SparkleShare\u2122", "icon-star")); } } -- 2.39.5