mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Merge pull request #2777 from joelmoniz/fixContribManagersNotSh
Contributions Managers now show specific titles (like "Mode Manager", "Tool Manager", etc.) in the user's preferred language
This commit is contained in:
@@ -44,6 +44,7 @@ public class ContributionManagerDialog {
|
||||
static final String ANY_CATEGORY = Language.text("contrib.all");
|
||||
|
||||
JFrame dialog;
|
||||
String title;
|
||||
ContributionFilter filter;
|
||||
JComboBox categoryChooser;
|
||||
JScrollPane scrollPane;
|
||||
@@ -61,8 +62,16 @@ public class ContributionManagerDialog {
|
||||
|
||||
public ContributionManagerDialog(ContributionType type) {
|
||||
if (type == null) {
|
||||
title = Language.text("contrib.manager_title.update");
|
||||
filter = ContributionType.createUpdateFilter();
|
||||
} else {
|
||||
if (type == ContributionType.MODE)
|
||||
title = Language.text("contrib.manager_title.mode");
|
||||
else if (type == ContributionType.TOOL)
|
||||
title = Language.text("contrib.manager_title.tool");
|
||||
else if (type == ContributionType.LIBRARY)
|
||||
title = Language.text("contrib.manager_title.library");
|
||||
|
||||
filter = type.createFilter();
|
||||
}
|
||||
contribListing = ContributionListing.getInstance();
|
||||
@@ -84,7 +93,7 @@ public class ContributionManagerDialog {
|
||||
this.editor = editor;
|
||||
|
||||
if (dialog == null) {
|
||||
dialog = new JFrame(Language.text("contrib"));
|
||||
dialog = new JFrame(title);
|
||||
|
||||
restartButton = new JButton(Language.text("contrib.restart"));
|
||||
restartButton.setVisible(false);
|
||||
@@ -98,7 +107,7 @@ public class ContributionManagerDialog {
|
||||
Editor ed = iter.next();
|
||||
if (ed.getSketch().isModified()) {
|
||||
int option = Base
|
||||
.showYesNoQuestion(editor, Language.text("contrib"),
|
||||
.showYesNoQuestion(editor, title,
|
||||
Language.text("contrib.unsaved_changes"),
|
||||
Language.text("contrib.unsaved_changes.prompt"));
|
||||
|
||||
|
||||
@@ -260,6 +260,10 @@ editor.status.printing.canceled = Printing canceled.
|
||||
# Contribution Panel
|
||||
|
||||
contrib = Contribution Manager
|
||||
contrib.manager_title.update = Update Manager
|
||||
contrib.manager_title.mode = Mode Manager
|
||||
contrib.manager_title.tool = Tool Manager
|
||||
contrib.manager_title.library = Library Manager
|
||||
contrib.category = Category:
|
||||
contrib.filter_your_search = Filter your search...
|
||||
contrib.restart = Restart Processing
|
||||
|
||||
Reference in New Issue
Block a user