James Moger
2013-05-04 90d07f5768af79e33fe044843e0ee1a47a979706
Simplified "clone with" translation strings
2 files modified
26 ■■■■ changed files
src/main/java/com/gitblit/wicket/GitBlitWebApp.properties 5 ●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java 21 ●●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/wicket/GitBlitWebApp.properties
@@ -452,7 +452,4 @@
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
gb.cloneWithApp  = clone with {0}
src/main/java/com/gitblit/wicket/panels/RepositoryUrlPanel.java
@@ -83,36 +83,39 @@
            add(new Label("repositoryGitDaemonUrl").setVisible(false));
        }
        
        String cloneWith = localizer.getString("gb.cloneWithApp", owner);
        final List<AppCloneLink> cloneLinks = new ArrayList<AppCloneLink>();
        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"));
            }
        }