Merge remote-tracking branch 'upstream/master' into kruland-integration
Conflicts: core/resources/l10n/messages_fr.properties core/src/net/sf/openrocket/gui/dialogs/preferences/PreferencesDialog.java
This commit is contained in:
commit
701b8966a2
@ -1,4 +1,3 @@
|
|||||||
#
|
|
||||||
# French base translation file
|
# French base translation file
|
||||||
# Translated by Tripoli France
|
# Translated by Tripoli France
|
||||||
# Should you need to add new logical keys here is the proposed method
|
# Should you need to add new logical keys here is the proposed method
|
||||||
|
1576
core/resources/l10n/messages_pt.properties
Normal file
1576
core/resources/l10n/messages_pt.properties
Normal file
File diff suppressed because it is too large
Load Diff
@ -129,7 +129,7 @@ public class PreferencesDialog extends JDialog {
|
|||||||
}
|
}
|
||||||
List<Named<Locale>> locales = new ArrayList<Named<Locale>>();
|
List<Named<Locale>> locales = new ArrayList<Named<Locale>>();
|
||||||
for (Locale l : SwingPreferences.getSupportedLocales()) {
|
for (Locale l : SwingPreferences.getSupportedLocales()) {
|
||||||
locales.add(new Named<Locale>(l, l.getDisplayLanguage()));
|
locales.add(new Named<Locale>(l, l.getDisplayLanguage(l) + "/" + l.getDisplayLanguage()));
|
||||||
}
|
}
|
||||||
Collections.sort(locales);
|
Collections.sort(locales);
|
||||||
locales.add(0, new Named<Locale>(null, trans.get("languages.default")));
|
locales.add(0, new Named<Locale>(null, trans.get("languages.default")));
|
||||||
@ -281,7 +281,7 @@ public class PreferencesDialog extends JDialog {
|
|||||||
//// Check for software updates at startup
|
//// Check for software updates at startup
|
||||||
final JCheckBox softwareUpdateBox =
|
final JCheckBox softwareUpdateBox =
|
||||||
new JCheckBox(trans.get("pref.dlg.checkbox.Checkupdates"));
|
new JCheckBox(trans.get("pref.dlg.checkbox.Checkupdates"));
|
||||||
softwareUpdateBox.setSelected( preferences.getCheckUpdates());
|
softwareUpdateBox.setSelected(preferences.getCheckUpdates());
|
||||||
softwareUpdateBox.addActionListener(new ActionListener() {
|
softwareUpdateBox.addActionListener(new ActionListener() {
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
@ -302,7 +302,6 @@ public class PreferencesDialog extends JDialog {
|
|||||||
});
|
});
|
||||||
panel.add(button, "right, wrap");
|
panel.add(button, "right, wrap");
|
||||||
|
|
||||||
|
|
||||||
final JCheckBox autoOpenDesignFile = new JCheckBox(trans.get("pref.dlg.but.openlast"));
|
final JCheckBox autoOpenDesignFile = new JCheckBox(trans.get("pref.dlg.but.openlast"));
|
||||||
autoOpenDesignFile.setSelected(preferences.isAutoOpenLastDesignOnStartupEnabled());
|
autoOpenDesignFile.setSelected(preferences.isAutoOpenLastDesignOnStartupEnabled());
|
||||||
autoOpenDesignFile.addActionListener(new ActionListener() {
|
autoOpenDesignFile.addActionListener(new ActionListener() {
|
||||||
@ -477,44 +476,44 @@ public class PreferencesDialog extends JDialog {
|
|||||||
|
|
||||||
JRadioButton showPrompt = new JRadioButton(trans.get("EditDecalDialog.lbl.prompt"));
|
JRadioButton showPrompt = new JRadioButton(trans.get("EditDecalDialog.lbl.prompt"));
|
||||||
showPrompt.setSelected(!preferences.isDecalEditorPreferenceSet());
|
showPrompt.setSelected(!preferences.isDecalEditorPreferenceSet());
|
||||||
showPrompt.addItemListener( new ItemListener() {
|
showPrompt.addItemListener(new ItemListener() {
|
||||||
@Override
|
@Override
|
||||||
public void itemStateChanged(ItemEvent e) {
|
public void itemStateChanged(ItemEvent e) {
|
||||||
if ( ((JRadioButton) e.getItem()).isSelected() ) {
|
if (((JRadioButton) e.getItem()).isSelected()) {
|
||||||
preferences.clearDecalEditorPreference();
|
preferences.clearDecalEditorPreference();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(showPrompt,"wrap");
|
panel.add(showPrompt, "wrap");
|
||||||
execGroup.add(showPrompt);
|
execGroup.add(showPrompt);
|
||||||
|
|
||||||
if (Desktop.getDesktop().isSupported(Desktop.Action.EDIT) ) {
|
if (Desktop.getDesktop().isSupported(Desktop.Action.EDIT)) {
|
||||||
|
|
||||||
JRadioButton systemRadio = new JRadioButton(trans.get("EditDecalDialog.lbl.system"));
|
JRadioButton systemRadio = new JRadioButton(trans.get("EditDecalDialog.lbl.system"));
|
||||||
systemRadio.setSelected( preferences.isDecalEditorPreferenceSystem() );
|
systemRadio.setSelected(preferences.isDecalEditorPreferenceSystem());
|
||||||
systemRadio.addItemListener( new ItemListener() {
|
systemRadio.addItemListener(new ItemListener() {
|
||||||
@Override
|
@Override
|
||||||
public void itemStateChanged(ItemEvent e) {
|
public void itemStateChanged(ItemEvent e) {
|
||||||
if ( ((JRadioButton) e.getItem()).isSelected() ) {
|
if (((JRadioButton) e.getItem()).isSelected()) {
|
||||||
preferences.setDecalEditorPreference(true, null);
|
preferences.setDecalEditorPreference(true, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
panel.add(systemRadio,"wrap");
|
panel.add(systemRadio, "wrap");
|
||||||
execGroup.add(systemRadio);
|
execGroup.add(systemRadio);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean commandLineIsSelected = preferences.isDecalEditorPreferenceSet() && ! preferences.isDecalEditorPreferenceSystem();
|
boolean commandLineIsSelected = preferences.isDecalEditorPreferenceSet() && !preferences.isDecalEditorPreferenceSystem();
|
||||||
final JRadioButton commandRadio = new JRadioButton(trans.get("EditDecalDialog.lbl.cmdline"));
|
final JRadioButton commandRadio = new JRadioButton(trans.get("EditDecalDialog.lbl.cmdline"));
|
||||||
commandRadio.setSelected(commandLineIsSelected);
|
commandRadio.setSelected(commandLineIsSelected);
|
||||||
panel.add(commandRadio,"wrap");
|
panel.add(commandRadio, "wrap");
|
||||||
execGroup.add(commandRadio);
|
execGroup.add(commandRadio);
|
||||||
|
|
||||||
final JTextArea commandText = new JTextArea();
|
final JTextArea commandText = new JTextArea();
|
||||||
commandText.setEnabled(commandLineIsSelected);
|
commandText.setEnabled(commandLineIsSelected);
|
||||||
commandText.setText( commandLineIsSelected ? preferences.getDecalEditorCommandLine() : "" );
|
commandText.setText(commandLineIsSelected ? preferences.getDecalEditorCommandLine() : "");
|
||||||
commandText.getDocument().addDocumentListener( new DocumentListener() {
|
commandText.getDocument().addDocumentListener(new DocumentListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertUpdate(DocumentEvent e) {
|
public void insertUpdate(DocumentEvent e) {
|
||||||
@ -536,13 +535,13 @@ public class PreferencesDialog extends JDialog {
|
|||||||
|
|
||||||
final JButton chooser = new JButton(trans.get("EditDecalDialog.btn.chooser"));
|
final JButton chooser = new JButton(trans.get("EditDecalDialog.btn.chooser"));
|
||||||
chooser.setEnabled(commandLineIsSelected);
|
chooser.setEnabled(commandLineIsSelected);
|
||||||
chooser.addActionListener( new ActionListener() {
|
chooser.addActionListener(new ActionListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void actionPerformed(ActionEvent e) {
|
public void actionPerformed(ActionEvent e) {
|
||||||
JFileChooser fc = new JFileChooser();
|
JFileChooser fc = new JFileChooser();
|
||||||
int action = fc.showOpenDialog(SwingUtilities.windowForComponent(PreferencesDialog.this));
|
int action = fc.showOpenDialog(SwingUtilities.windowForComponent(PreferencesDialog.this));
|
||||||
if ( action == JFileChooser.APPROVE_OPTION) {
|
if (action == JFileChooser.APPROVE_OPTION) {
|
||||||
String commandLine = fc.getSelectedFile().getAbsolutePath();
|
String commandLine = fc.getSelectedFile().getAbsolutePath();
|
||||||
commandText.setText(commandLine);
|
commandText.setText(commandLine);
|
||||||
preferences.setDecalEditorPreference(false, commandLine);
|
preferences.setDecalEditorPreference(false, commandLine);
|
||||||
@ -554,7 +553,7 @@ public class PreferencesDialog extends JDialog {
|
|||||||
panel.add(chooser, "growx, wrap");
|
panel.add(chooser, "growx, wrap");
|
||||||
|
|
||||||
|
|
||||||
commandRadio.addChangeListener( new ChangeListener() {
|
commandRadio.addChangeListener(new ChangeListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void stateChanged(ChangeEvent e) {
|
public void stateChanged(ChangeEvent e) {
|
||||||
|
@ -38,7 +38,7 @@ public class SwingPreferences extends net.sf.openrocket.startup.Preferences {
|
|||||||
private static final List<Locale> SUPPORTED_LOCALES;
|
private static final List<Locale> SUPPORTED_LOCALES;
|
||||||
static {
|
static {
|
||||||
List<Locale> list = new ArrayList<Locale>();
|
List<Locale> list = new ArrayList<Locale>();
|
||||||
for (String lang : new String[] { "en", "de", "es", "fr", "it", "ru", "cs", "pl" }) {
|
for (String lang : new String[] { "en", "de", "es", "fr", "it", "ru", "cs", "pl", "ja", "pt" }) {
|
||||||
list.add(new Locale(lang));
|
list.add(new Locale(lang));
|
||||||
}
|
}
|
||||||
SUPPORTED_LOCALES = Collections.unmodifiableList(list);
|
SUPPORTED_LOCALES = Collections.unmodifiableList(list);
|
||||||
@ -232,10 +232,10 @@ public class SwingPreferences extends net.sf.openrocket.startup.Preferences {
|
|||||||
compdir.mkdirs();
|
compdir.mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( !compdir.isDirectory() ) {
|
if (!compdir.isDirectory()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if( !compdir.canRead() ) {
|
if (!compdir.canRead()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return compdir;
|
return compdir;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user