Skip to content

Commit

Permalink
more labels
Browse files Browse the repository at this point in the history
  • Loading branch information
msrocka committed Jul 13, 2018
1 parent d3b3477 commit f6dc533
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 46 deletions.
2 changes: 2 additions & 0 deletions src/app/M.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public class M extends NLS {

public static String MaterialProperties;
public static String MaterialProperties_Description;
public static String Memory;
public static String ModellingAndValidation;
public static String Module;
public static String Modules;
Expand Down Expand Up @@ -229,6 +230,7 @@ public class M extends NLS {
public static String Status;
public static String Subtype;
public static String Synchronize;
public static String SynchronizeReferenceDataOnStartup;
public static String SynchronizeDependentDataSets;
public static String SynchronizeWithModules;
public static String Synonyms;
Expand Down
86 changes: 43 additions & 43 deletions src/app/editors/settings/AppSection.java
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
package app.editors.settings;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import app.M;
import app.util.UI;

class AppSection {

private final SettingsPage page;

AppSection(SettingsPage page) {
this.page = page;
}

void render(Composite body, FormToolkit tk) {
Composite comp = UI.formSection(body, tk, M.ApplicationSettings);
LangCombo langCombo = new LangCombo(page.ini.lang);
langCombo.render(comp, tk);
langCombo.onChange(lang -> {
page.ini.lang = lang;
page.setDirty();
});
Text memText = UI.formText(comp, tk, "Memory [MB]");
memText.setText(Integer.toString(page.ini.maxMemory));
UI.gridData(memText, false, false).widthHint = 315;
memText.addModifyListener(e -> {
String s = memText.getText().trim();
try {
page.ini.maxMemory = Integer.parseInt(s);
page.setDirty();
} catch (Exception ex) {
Logger log = LoggerFactory.getLogger(getClass());
log.warn("ini-settings: {} is not a number", s);
}
});
}

}
package app.editors.settings;

import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import app.M;
import app.util.UI;

class AppSection {

private final SettingsPage page;

AppSection(SettingsPage page) {
this.page = page;
}

void render(Composite body, FormToolkit tk) {
Composite comp = UI.formSection(body, tk, M.ApplicationSettings);
LangCombo langCombo = new LangCombo(page.ini.lang);
langCombo.render(comp, tk);
langCombo.onChange(lang -> {
page.ini.lang = lang;
page.setDirty();
});
Text memText = UI.formText(comp, tk, M.Memory + " [MB]");
memText.setText(Integer.toString(page.ini.maxMemory));
UI.gridData(memText, false, false).widthHint = 315;
memText.addModifyListener(e -> {
String s = memText.getText().trim();
try {
page.ini.maxMemory = Integer.parseInt(s);
page.setDirty();
} catch (Exception ex) {
Logger log = LoggerFactory.getLogger(getClass());
log.warn("ini-settings: {} is not a number", s);
}
});
}

}
2 changes: 1 addition & 1 deletion src/app/editors/settings/DataSetSection.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ private void xmlCheck(Composite comp, FormToolkit tk) {

private void syncCheck(Composite comp, FormToolkit tk) {
Button check = UI.formCheckBox(comp, tk,
"#Synchronize reference data on startup");
M.SynchronizeReferenceDataOnStartup);
check.setSelection(settings().syncRefDataOnStartup);
Controls.onSelect(check, e -> {
settings().syncRefDataOnStartup = check.getSelection();
Expand Down
4 changes: 3 additions & 1 deletion src/app/messages.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Fri Jul 13 13:02:48 CEST 2018
#Fri Jul 13 13:12:23 CEST 2018
AboutEPDEditor=About EPD Editor
AccessRestrictions=Access restrictions
AccreditedThirdPartyReview=Accredited third party review
Expand Down Expand Up @@ -127,6 +127,7 @@ Locations=Locations
Logo=Logo
MaterialProperties=Material properties
MaterialProperties_Description=Edit the list of available material properties (like raw density) for the description of declared products.
Memory=Memory
ModellingAndValidation=Modelling and validation
Module=Module
Modules=Modules
Expand Down Expand Up @@ -210,6 +211,7 @@ Status=Status
Subtype=Subtype
Synchronize=Synchronize
SynchronizeDependentDataSets=Synchronize dependent data sets
SynchronizeReferenceDataOnStartup=Synchronize reference data on startup
SynchronizeWithModules=Synchronize with modules
Synonyms=Synonyms
TechnologicalApplicability=Technical purpose of product or process
Expand Down
4 changes: 3 additions & 1 deletion src/app/messages_de.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#Fri Jul 13 13:02:48 CEST 2018
#Fri Jul 13 13:12:23 CEST 2018
AboutEPDEditor=\u00DCber den EPD-Editor
AccessRestrictions=Zugangsbeschr\u00E4nkungen
AccreditedThirdPartyReview=Akkreditierte Pr\u00FCfung durch Dritte
Expand Down Expand Up @@ -127,6 +127,7 @@ Locations=Orte
Logo=Logo
MaterialProperties=Materialeigenschaften
MaterialProperties_Description=Editiere die Liste der Materialeigenschaften (z.B. Rohdichte), die in deklarierten Produkten verwendet werden k\u00F6nnen.
Memory=Speicher
ModellingAndValidation=Modellierung und Validierung
Module=Modul
Modules=Module
Expand Down Expand Up @@ -210,6 +211,7 @@ Status=Status
Subtype=Subtyp
Synchronize=Synchronisiere
SynchronizeDependentDataSets=Abh\u00E4ngige Datens\u00E4tze synchronisieren
SynchronizeReferenceDataOnStartup=Referenzdaten beim Start aktualisieren
SynchronizeWithModules=Synchronisiere mit Modulen
Synonyms=Synonyme
TechnologicalApplicability=Technisches Anwendungsgebiet
Expand Down

0 comments on commit f6dc533

Please sign in to comment.