JAL-3468 i18n and additional unit tests
[jalview.git] / src / jalview / gui / SeqPanel.java
index 796d339..7020265 100644 (file)
@@ -1074,24 +1074,24 @@ public class SeqPanel extends JPanel
         }
       }
     }
-    if (tooltipText.length() == 6) // <html>
+    if (tooltipText.length() == 6) // "<html>"
     {
       setToolTipText(null);
       lastTooltip = null;
     }
     else
     {
-      if (tooltipText.length() > MAX_TOOLTIP_LENGTH) // constant
+      if (tooltipText.length() > MAX_TOOLTIP_LENGTH)
       {
         tooltipText.setLength(MAX_TOOLTIP_LENGTH);
-        tooltipText.append("...TOOLONG!");
+        tooltipText.append("...");
       }
       if (unshownFeatures > 0)
       {
         tooltipText.append("<br/>").append("... ").append("<i>")
-                .append(unshownFeatures)
-                .append(" feature").append(unshownFeatures == 1 ? "" : "s")
-                .append(" not shown</i>");
+                .append(MessageManager.formatMessage(
+                        "label.features_not_shown", unshownFeatures))
+                .append("</i>");
       }
       String textString = tooltipText.toString();
       if (lastTooltip == null || !lastTooltip.equals(textString))