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
|
||||
# Translated by Tripoli France
|
||||
# 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>>();
|
||||
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);
|
||||
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
|
||||
final JCheckBox softwareUpdateBox =
|
||||
new JCheckBox(trans.get("pref.dlg.checkbox.Checkupdates"));
|
||||
softwareUpdateBox.setSelected( preferences.getCheckUpdates());
|
||||
softwareUpdateBox.setSelected(preferences.getCheckUpdates());
|
||||
softwareUpdateBox.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
@ -302,7 +302,6 @@ public class PreferencesDialog extends JDialog {
|
||||
});
|
||||
panel.add(button, "right, wrap");
|
||||
|
||||
|
||||
final JCheckBox autoOpenDesignFile = new JCheckBox(trans.get("pref.dlg.but.openlast"));
|
||||
autoOpenDesignFile.setSelected(preferences.isAutoOpenLastDesignOnStartupEnabled());
|
||||
autoOpenDesignFile.addActionListener(new ActionListener() {
|
||||
@ -477,44 +476,44 @@ public class PreferencesDialog extends JDialog {
|
||||
|
||||
JRadioButton showPrompt = new JRadioButton(trans.get("EditDecalDialog.lbl.prompt"));
|
||||
showPrompt.setSelected(!preferences.isDecalEditorPreferenceSet());
|
||||
showPrompt.addItemListener( new ItemListener() {
|
||||
showPrompt.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
if ( ((JRadioButton) e.getItem()).isSelected() ) {
|
||||
if (((JRadioButton) e.getItem()).isSelected()) {
|
||||
preferences.clearDecalEditorPreference();
|
||||
}
|
||||
}
|
||||
});
|
||||
panel.add(showPrompt,"wrap");
|
||||
panel.add(showPrompt, "wrap");
|
||||
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"));
|
||||
systemRadio.setSelected( preferences.isDecalEditorPreferenceSystem() );
|
||||
systemRadio.addItemListener( new ItemListener() {
|
||||
systemRadio.setSelected(preferences.isDecalEditorPreferenceSystem());
|
||||
systemRadio.addItemListener(new ItemListener() {
|
||||
@Override
|
||||
public void itemStateChanged(ItemEvent e) {
|
||||
if ( ((JRadioButton) e.getItem()).isSelected() ) {
|
||||
if (((JRadioButton) e.getItem()).isSelected()) {
|
||||
preferences.setDecalEditorPreference(true, null);
|
||||
}
|
||||
}
|
||||
});
|
||||
panel.add(systemRadio,"wrap");
|
||||
panel.add(systemRadio, "wrap");
|
||||
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"));
|
||||
commandRadio.setSelected(commandLineIsSelected);
|
||||
panel.add(commandRadio,"wrap");
|
||||
panel.add(commandRadio, "wrap");
|
||||
execGroup.add(commandRadio);
|
||||
|
||||
final JTextArea commandText = new JTextArea();
|
||||
commandText.setEnabled(commandLineIsSelected);
|
||||
commandText.setText( commandLineIsSelected ? preferences.getDecalEditorCommandLine() : "" );
|
||||
commandText.getDocument().addDocumentListener( new DocumentListener() {
|
||||
commandText.setText(commandLineIsSelected ? preferences.getDecalEditorCommandLine() : "");
|
||||
commandText.getDocument().addDocumentListener(new DocumentListener() {
|
||||
|
||||
@Override
|
||||
public void insertUpdate(DocumentEvent e) {
|
||||
@ -536,13 +535,13 @@ public class PreferencesDialog extends JDialog {
|
||||
|
||||
final JButton chooser = new JButton(trans.get("EditDecalDialog.btn.chooser"));
|
||||
chooser.setEnabled(commandLineIsSelected);
|
||||
chooser.addActionListener( new ActionListener() {
|
||||
chooser.addActionListener(new ActionListener() {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
JFileChooser fc = new JFileChooser();
|
||||
int action = fc.showOpenDialog(SwingUtilities.windowForComponent(PreferencesDialog.this));
|
||||
if ( action == JFileChooser.APPROVE_OPTION) {
|
||||
if (action == JFileChooser.APPROVE_OPTION) {
|
||||
String commandLine = fc.getSelectedFile().getAbsolutePath();
|
||||
commandText.setText(commandLine);
|
||||
preferences.setDecalEditorPreference(false, commandLine);
|
||||
@ -554,7 +553,7 @@ public class PreferencesDialog extends JDialog {
|
||||
panel.add(chooser, "growx, wrap");
|
||||
|
||||
|
||||
commandRadio.addChangeListener( new ChangeListener() {
|
||||
commandRadio.addChangeListener(new ChangeListener() {
|
||||
|
||||
@Override
|
||||
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;
|
||||
static {
|
||||
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));
|
||||
}
|
||||
SUPPORTED_LOCALES = Collections.unmodifiableList(list);
|
||||
@ -232,10 +232,10 @@ public class SwingPreferences extends net.sf.openrocket.startup.Preferences {
|
||||
compdir.mkdirs();
|
||||
}
|
||||
|
||||
if( !compdir.isDirectory() ) {
|
||||
if (!compdir.isDirectory()) {
|
||||
return null;
|
||||
}
|
||||
if( !compdir.canRead() ) {
|
||||
if (!compdir.canRead()) {
|
||||
return null;
|
||||
}
|
||||
return compdir;
|
||||
|
Loading…
x
Reference in New Issue
Block a user