Skip to content

Commit 380ebf7

Browse files
author
Joe Wegner
committed
Change button names to sart with upper case. Send error message to log when failing to open a manager
1 parent 30a20c8 commit 380ebf7

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

app/src/cc/arduino/contributions/ContributionsSelfCheck.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import cc.arduino.contributions.packages.ContributionInstaller;
3636
import cc.arduino.contributions.packages.filters.UpdatablePlatformPredicate;
3737
import cc.arduino.view.NotificationPopup;
38+
import com.sun.javafx.binding.Logging;
3839
import processing.app.*;
3940

4041
import javax.swing.*;
@@ -85,6 +86,10 @@ public void run() {
8586
final String text;
8687
final String button1Name;
8788
final String button2Name;
89+
final String boardsButtonName = tr("Boards");
90+
final String librariesButtonName = tr("Libraries");
91+
92+
// default to no anchors
8893
String openAnchor1 = "";
8994
String closeAnchor1 = "";
9095
String openAnchor2 = "";
@@ -93,7 +98,7 @@ public void run() {
9398
if (updatableLibraries && !updatablePlatforms) {
9499
if (setAccessible) {
95100
button1Name = null;
96-
button2Name = tr("libraries");
101+
button2Name = librariesButtonName;
97102
}
98103
else {
99104
button1Name = null;
@@ -104,7 +109,7 @@ public void run() {
104109
text = I18n.format(tr("Updates available for some of your {0}libraries{1}"), openAnchor1, closeAnchor1);
105110
} else if (!updatableLibraries && updatablePlatforms) {
106111
if (setAccessible) {
107-
button1Name = tr("boards");
112+
button1Name = boardsButtonName;
108113
button2Name = null;
109114
}
110115
else {
@@ -116,8 +121,8 @@ public void run() {
116121
text = I18n.format(tr("Updates available for some of your {0}boards{1}"), openAnchor1, closeAnchor1);
117122
} else {
118123
if (setAccessible) {
119-
button1Name = tr("boards");
120-
button2Name = tr("libraries");
124+
button1Name = boardsButtonName;
125+
button2Name = librariesButtonName;
121126
}
122127
else {
123128
button1Name = null;
@@ -173,6 +178,7 @@ private void goToManager(String link) {
173178
((UpdatableBoardsLibsFakeURLsHandler) hyperlinkListener).openBoardLibManager(new URL(link));
174179
}
175180
catch (Exception e){
181+
Logging.getLogger().warning("Exception while attempting to go to board manager", e);
176182
}
177183
}
178184
// callback for boards button

0 commit comments

Comments
 (0)