Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CityDoctor
CityDoctor2
Commits
e222bf99
Commit
e222bf99
authored
4 years ago
by
Matthias Betz
Browse files
Options
Download
Email Patches
Plain Diff
moved version string to Localization
parent
f3da76cf
Pipeline
#1012
passed with stage
in 1 minute and 52 seconds
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
CityDoctorParent/CityDoctorModel/pom.xml
+10
-1
CityDoctorParent/CityDoctorModel/pom.xml
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/Localization.java
+2
-0
...java/de/hft/stuttgart/citydoctor2/utils/Localization.java
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties
+1
-0
...odel/src/main/resources/CityDoctorLocalization.properties
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/CDVMessages.java
+0
-76
...c/main/java/de/hft/stuttgart/citydoctor2/CDVMessages.java
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/XmlStreamReporter.java
+2
-2
...ft/stuttgart/citydoctor2/reporting/XmlStreamReporter.java
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
+2
-2
...tuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
CityDoctorParent/CityDoctorValidation/src/main/resources/de/hft/stuttgart/citydoctor2/cdvmessages.properties
+0
-3
...urces/de/hft/stuttgart/citydoctor2/cdvmessages.properties
with
17 additions
and
84 deletions
+17
-84
CityDoctorParent/CityDoctorModel/pom.xml
+
10
-
1
View file @
e222bf99
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
<groupId>
org.jogamp.jogl
</groupId>
<groupId>
org.jogamp.jogl
</groupId>
<artifactId>
jogl-all-main
</artifactId>
<artifactId>
jogl-all-main
</artifactId>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
junit
</groupId>
<groupId>
junit
</groupId>
<artifactId>
junit
</artifactId>
<artifactId>
junit
</artifactId>
<scope>
test
</scope>
<scope>
test
</scope>
...
@@ -53,4 +53,13 @@
...
@@ -53,4 +53,13 @@
<artifactId>
proj4j
</artifactId>
<artifactId>
proj4j
</artifactId>
</dependency>
</dependency>
</dependencies>
</dependencies>
<build>
<resources>
<resource>
<directory>
src/main/resources
</directory>
<filtering>
true
</filtering>
</resource>
</resources>
</build>
</project>
</project>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/java/de/hft/stuttgart/citydoctor2/utils/Localization.java
+
2
-
0
View file @
e222bf99
...
@@ -27,6 +27,8 @@ import java.util.ResourceBundle;
...
@@ -27,6 +27,8 @@ import java.util.ResourceBundle;
*
*
*/
*/
public
class
Localization
{
public
class
Localization
{
public
static
final
String
VERSION
=
"CityDoctorValidation.Version"
;
private
static
ResourceBundle
bundle
;
private
static
ResourceBundle
bundle
;
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorModel/src/main/resources/CityDoctorLocalization.properties
+
1
-
0
View file @
e222bf99
CityDoctorValidation.Version
=
${project.version}
DistanceError.distanceFromPlane
=
distance from plane
DistanceError.distanceFromPlane
=
distance from plane
AboutDialog.developedBy
=
Developed by
AboutDialog.developedBy
=
Developed by
AboutDialog.contact
=
Contact
AboutDialog.contact
=
Contact
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/CDVMessages.java
deleted
100644 → 0
+
0
-
76
View file @
f3da76cf
/*-
* Copyright 2020 Beuth Hochschule für Technik Berlin, Hochschule für Technik Stuttgart
*
* This file is part of CityDoctor2.
*
* CityDoctor2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CityDoctor2 is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with CityDoctor2. If not, see <https://www.gnu.org/licenses/>.
*/
package
de.hft.stuttgart.citydoctor2
;
import
java.text.MessageFormat
;
import
java.util.Locale
;
import
java.util.ResourceBundle
;
/**
* Provides access to message strings in different languages.
*
* @author Matthias Betz - 12bema1bif@hft-stuttgart.de
* @version 1.0
*
*/
public
class
CDVMessages
{
public
static
final
String
MISSING_SOURCE_FILE
=
"ArgumentParser.MissingSourceFile"
;
public
static
final
String
INVALID_PARAMETER
=
"ArgumentParser.InvalidParameter"
;
public
static
final
String
VERSION
=
"CityDoctorValidation.Version"
;
private
static
final
String
BUNDLE_NAME
=
"de.hft.stuttgart.citydoctor2.cdvmessages"
;
private
static
final
ResourceBundle
RESOURCE_BUNDLE
;
static
{
RESOURCE_BUNDLE
=
ResourceBundle
.
getBundle
(
BUNDLE_NAME
,
Locale
.
getDefault
());
}
/**
* Gives the message string for the given key based on the default locale.
*
* @param key
* the key for the message
* @return localized message.
*/
public
static
String
getString
(
String
key
)
{
return
RESOURCE_BUNDLE
.
getString
(
key
);
}
/**
* Constructs a string out of the key and the given parameters with the
* MessageFormatter.
*
* @param key
* the key for the message
* @param params
* the parameters for the message
* @return the localized message with the parameters substituted.
* @see MessageFormat#format(String, Object...);
*/
public
static
String
getString
(
String
key
,
Object
...
params
)
{
String
msg
=
getString
(
key
);
return
MessageFormat
.
format
(
msg
,
params
);
}
private
CDVMessages
()
{
}
}
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/XmlStreamReporter.java
+
2
-
2
View file @
e222bf99
...
@@ -32,7 +32,6 @@ import java.util.concurrent.atomic.AtomicInteger;
...
@@ -32,7 +32,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
de.hft.stuttgart.citydoctor2.CDVMessages
;
import
de.hft.stuttgart.citydoctor2.check.CheckConfiguration
;
import
de.hft.stuttgart.citydoctor2.check.CheckConfiguration
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
...
@@ -64,6 +63,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LandObject;
...
@@ -64,6 +63,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.LandObject;
import
de.hft.stuttgart.citydoctor2.datastructure.TransportationObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.TransportationObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vegetation
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vegetation
;
import
de.hft.stuttgart.citydoctor2.datastructure.WaterObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.WaterObject
;
import
de.hft.stuttgart.citydoctor2.utils.Localization
;
/**
/**
* Report for creating a XML report out of a stream of feature results
* Report for creating a XML report out of a stream of feature results
...
@@ -105,7 +105,7 @@ public class XmlStreamReporter implements StreamReporter {
...
@@ -105,7 +105,7 @@ public class XmlStreamReporter implements StreamReporter {
env
.
setJavaVmVersion
(
System
.
getProperties
().
getProperty
(
"java.version"
));
env
.
setJavaVmVersion
(
System
.
getProperties
().
getProperty
(
"java.version"
));
env
.
setOsArch
(
System
.
getProperties
().
getProperty
(
"os.arch"
));
env
.
setOsArch
(
System
.
getProperties
().
getProperty
(
"os.arch"
));
env
.
setOsName
(
System
.
getProperties
().
getProperty
(
"os.name"
));
env
.
setOsName
(
System
.
getProperties
().
getProperty
(
"os.name"
));
env
.
setValidationVersion
(
CDVMessages
.
getString
(
CDVMessages
.
VERSION
));
env
.
setValidationVersion
(
Localization
.
getText
(
Localization
.
VERSION
));
return
header
;
return
header
;
}
}
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/java/de/hft/stuttgart/citydoctor2/reporting/pdf/PdfStreamReporter.java
+
2
-
2
View file @
e222bf99
...
@@ -33,7 +33,6 @@ import java.util.concurrent.atomic.AtomicInteger;
...
@@ -33,7 +33,6 @@ import java.util.concurrent.atomic.AtomicInteger;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
de.hft.stuttgart.citydoctor2.CDVMessages
;
import
de.hft.stuttgart.citydoctor2.check.CheckConfiguration
;
import
de.hft.stuttgart.citydoctor2.check.CheckConfiguration
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckError
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
import
de.hft.stuttgart.citydoctor2.check.CheckId
;
...
@@ -57,6 +56,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.TransportationObject;
...
@@ -57,6 +56,7 @@ import de.hft.stuttgart.citydoctor2.datastructure.TransportationObject;
import
de.hft.stuttgart.citydoctor2.datastructure.Vegetation
;
import
de.hft.stuttgart.citydoctor2.datastructure.Vegetation
;
import
de.hft.stuttgart.citydoctor2.datastructure.WaterObject
;
import
de.hft.stuttgart.citydoctor2.datastructure.WaterObject
;
import
de.hft.stuttgart.citydoctor2.reporting.StreamReporter
;
import
de.hft.stuttgart.citydoctor2.reporting.StreamReporter
;
import
de.hft.stuttgart.citydoctor2.utils.Localization
;
/**
/**
* Reporter to create a PDF report out of a stream of feature results
* Reporter to create a PDF report out of a stream of feature results
...
@@ -156,7 +156,7 @@ public class PdfStreamReporter implements StreamReporter {
...
@@ -156,7 +156,7 @@ public class PdfStreamReporter implements StreamReporter {
env
.
addTextElement
(
"The checks were executed under the following environment:"
);
env
.
addTextElement
(
"The checks were executed under the following environment:"
);
Table
t
=
new
Table
(
2
);
Table
t
=
new
Table
(
2
);
t
.
setTitle
(
"Name"
,
"Value"
);
t
.
setTitle
(
"Name"
,
"Value"
);
t
.
addRow
(
"City Doctor Version"
,
CDVMessages
.
getString
(
CDVMessages
.
VERSION
));
t
.
addRow
(
"City Doctor Version"
,
Localization
.
getText
(
Localization
.
VERSION
));
t
.
addRow
(
"Java VM-Version"
,
System
.
getProperties
().
getProperty
(
"java.vm.version"
));
t
.
addRow
(
"Java VM-Version"
,
System
.
getProperties
().
getProperty
(
"java.vm.version"
));
t
.
addRow
(
"Java VM-Vendor"
,
System
.
getProperties
().
getProperty
(
"java.vm.vendor"
));
t
.
addRow
(
"Java VM-Vendor"
,
System
.
getProperties
().
getProperty
(
"java.vm.vendor"
));
t
.
addRow
(
"Java Version"
,
System
.
getProperties
().
getProperty
(
"java.version"
));
t
.
addRow
(
"Java Version"
,
System
.
getProperties
().
getProperty
(
"java.version"
));
...
...
This diff is collapsed.
Click to expand it.
CityDoctorParent/CityDoctorValidation/src/main/resources/de/hft/stuttgart/citydoctor2/cdvmessages.properties
deleted
100644 → 0
+
0
-
3
View file @
f3da76cf
CityDoctorValidation.Version
=
${project.version}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment