diff options
author | Mürsel Türk | 2020-07-07 12:02:55 +0200 |
---|---|---|
committer | Mürsel Türk | 2020-07-07 12:02:55 +0200 |
commit | de374cea11032e8ea839ee349d7d68a68ffdea70 (patch) | |
tree | d30db205733d28004d2bdc7faa59f897e6f28460 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java | |
parent | [client] Add resource bundle files for activity classes. Update the activity ... (diff) | |
download | tutor-module-de374cea11032e8ea839ee349d7d68a68ffdea70.tar.gz tutor-module-de374cea11032e8ea839ee349d7d68a68ffdea70.tar.xz tutor-module-de374cea11032e8ea839ee349d7d68a68ffdea70.zip |
[client] Add resource bundle files for configurator classes. Update the configurator classes accordingly.
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java')
-rwxr-xr-x | dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java index 15959322..817289be 100755 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/configurator/LdapFilterConfigurator.java @@ -29,6 +29,7 @@ import org.openslx.dozmod.gui.control.table.CheckListTable.Wrapper; import org.openslx.dozmod.gui.control.table.LectureLdapFilterTable; import org.openslx.dozmod.gui.control.table.QScrollPane; import org.openslx.dozmod.gui.helper.GridManager; +import org.openslx.dozmod.gui.helper.I18n; import org.openslx.dozmod.gui.helper.MessageType; import org.openslx.dozmod.thrift.cache.MetaDataCache; @@ -63,7 +64,7 @@ public class LdapFilterConfigurator extends LdapFilterConfiguratorLayout { txtAttribute.setEnabled(editable); txtValue.setEnabled(editable); if (editable) - btnAdd.setText("Ändern"); + btnAdd.setText(I18n.CONFIGURATOR.getString("LdapFilter.Button.add.text.0")); if (item == null) { clearInputFields(); return; @@ -82,7 +83,8 @@ public class LdapFilterConfigurator extends LdapFilterConfiguratorLayout { LdapFilter input = new LdapFilter(); input.attribute = txtAttribute.getText(); if (input.attribute == null || input.attribute.isEmpty()) { - Gui.showMessageBox("Kein Attribut angegeben", MessageType.ERROR, null, null); + Gui.showMessageBox(I18n.CONFIGURATOR.getString("LdapFilter.Message.error.noAttribute"), + MessageType.ERROR, null, null); return; } input.value = txtValue.getText(); @@ -97,7 +99,8 @@ public class LdapFilterConfigurator extends LdapFilterConfiguratorLayout { // creating a new one, either way add it to the list and update // the table, if its not present already if (oldList.contains(newEntry)) { - Gui.showMessageBox("Eintrag bereits vorhanden", MessageType.ERROR, null, null); + Gui.showMessageBox(I18n.CONFIGURATOR.getString("LdapFilter.Message.error.entryAlreadyExists"), + MessageType.ERROR, null, null); return; } // now decide whether to create a new entry or update existing one @@ -143,7 +146,7 @@ public class LdapFilterConfigurator extends LdapFilterConfiguratorLayout { btnDel.setEnabled(false); txtAttribute.setText(null); txtValue.setText(null); - btnAdd.setText("Hinzufügen"); + btnAdd.setText(I18n.CONFIGURATOR.getString("LdapFilter.Button.add.text.1")); } public List<LdapFilter> getState() { @@ -205,11 +208,6 @@ class LdapFilterConfiguratorLayout extends JPanel { private static final long serialVersionUID = 6479838641542743622L; - private final static String HELPTEXT = "Geben Sie hier LDAP Filter ein, die die Sichtbarkeit" - + " der Veranstaltung abhängig vom angemeldeten Benutzer einschränken. Eine Veranstaltung" - + " ist sichtbar, sobald einer der angegebenen Filter zutrifft. Zusätzliche Raumbeschränkungen" - + " greifen weiterhin."; - protected final LectureLdapFilterTable tblFilters = new LectureLdapFilterTable(); protected final JTextField txtAttribute, txtValue; protected final JButton btnAdd, btnDel; @@ -217,27 +215,29 @@ class LdapFilterConfiguratorLayout extends JPanel { public LdapFilterConfiguratorLayout() { GridManager grid = new GridManager(this, 1, true, new Insets(3, 3, 3, 3)); // top info panel - grid.add(new WordWrapLabel(HELPTEXT)).fill(true, false).expand(true, false); + grid.add(new WordWrapLabel(I18n.CONFIGURATOR.getString("LdapFilter.Label.info.text"))) + .fill(true, false).expand(true, false); grid.nextRow(); // middle filter list grid.add(new QScrollPane(tblFilters)).fill(true, true).expand(true, true); grid.nextRow(); - btnDel = new JButton("Entfernen"); + btnDel = new JButton(I18n.CONFIGURATOR.getString("LdapFilter.Button.delete.text")); grid.add(btnDel).anchor(GridBagConstraints.EAST); grid.nextRow(); JPanel pnlNewShare = new JPanel(); GridManager gridNewFilter = new GridManager(pnlNewShare, 3, true); - pnlNewShare.setBorder(BorderFactory.createTitledBorder("Eigene Filter definieren")); - gridNewFilter.add(new QLabel("Attribut")); + pnlNewShare.setBorder(BorderFactory.createTitledBorder( + I18n.CONFIGURATOR.getString("LdapFilter.TitledBorder.newShare.title"))); + gridNewFilter.add(new QLabel(I18n.CONFIGURATOR.getString("LdapFilter.Label.attribute.text"))); txtAttribute = new JTextField(); gridNewFilter.add(txtAttribute, 2).fill(true, false).expand(true, false); gridNewFilter.nextRow(); - gridNewFilter.add(new QLabel("Wert")); + gridNewFilter.add(new QLabel(I18n.CONFIGURATOR.getString("LdapFilter.Label.value.text"))); txtValue = new JTextField(); gridNewFilter.add(txtValue).fill(true, false).expand(true, false); - btnAdd = new JButton("Hinzufügen"); + btnAdd = new JButton(I18n.CONFIGURATOR.getString("LdapFilter.Button.add.text.1")); gridNewFilter.add(btnAdd).anchor(GridBagConstraints.EAST); gridNewFilter.nextRow(); gridNewFilter.finish(false); |