Skip to content

Commit ed39a67

Browse files
committed
show translated application title in about dialog
fixes #47
1 parent a9f8480 commit ed39a67

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

Core/src/main/java/de/openindex/support/core/gui/AboutDialog.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,20 @@ public void windowClosing(WindowEvent e) {
147147
protected abstract String getAboutText();
148148

149149
private String replaceVariables(String text) {
150-
Properties replacements = new Properties();
151-
152-
replacements.setProperty("app.title", settings.getString("title"));
150+
final Properties replacements = new Properties();
151+
152+
String appTitle = StringUtils.trimToNull(settings.getString("i18n.appTitle"));
153+
if (appTitle == null) {
154+
appTitle = StringUtils.trimToEmpty(settings.getString("title"))
155+
+ " " + StringUtils.trimToEmpty(settings.getString("version"));
156+
}
157+
replacements.setProperty("app.title", appTitle);
153158
replacements.setProperty("app.version", settings.getString("version"));
154159
replacements.setProperty("openjdk.name", StringUtils.defaultIfBlank(
155160
SystemUtils.JAVA_RUNTIME_NAME, SystemUtils.JAVA_VM_NAME));
156161
replacements.setProperty("openjdk.version", StringUtils.defaultIfBlank(
157162
SystemUtils.JAVA_RUNTIME_VERSION, SystemUtils.JAVA_VERSION));
163+
158164
return StringSubstitutor.replace(text, replacements);
159165
}
160166
}

Customer/src/main/resources/de/openindex/support/customer/resources/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</head>
1111
<body>
1212

13-
<h2>${app.title} ${app.version}</h2>
13+
<h2>${app.title}</h2>
1414
<p>
1515
This application was initially created by Andreas Rudolph &amp; Walter Wagner
1616
(<a href="https://openindex.de/">OpenIndex.de</a>) in order to provide safe and private remote support for their

Customer/src/main/resources/de/openindex/support/customer/resources/about_de.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</head>
1111
<body>
1212

13-
<h2>${app.title} ${app.version}</h2>
13+
<h2>${app.title}</h2>
1414
<p>
1515
Dieses Programm wurde ursprünglich von Andreas Rudolph &amp; Walter Wagner
1616
(<a href="https://openindex.de/">OpenIndex.de</a>) erstellt, um ihren Kunden eine sichere und private Möglichkeit

Staff/src/main/resources/de/openindex/support/staff/resources/about.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</head>
1111
<body>
1212

13-
<h2>${app.title} ${app.version}</h2>
13+
<h2>${app.title}</h2>
1414
<p>
1515
This application was initially created by Andreas Rudolph &amp; Walter Wagner
1616
(<a href="https://openindex.de/">OpenIndex.de</a>) in order to provide safe and private remote support for their

Staff/src/main/resources/de/openindex/support/staff/resources/about_de.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
</head>
1111
<body>
1212

13-
<h2>${app.title} ${app.version}</h2>
13+
<h2>${app.title}</h2>
1414
<p>
1515
Dieses Programm wurde ursprünglich von Andreas Rudolph &amp; Walter Wagner
1616
(<a href="https://openindex.de/">OpenIndex.de</a>) erstellt, um ihren Kunden eine sichere und private Möglichkeit

0 commit comments

Comments
 (0)