Skip to content

Commit f34e18c

Browse files
committed
fix hardcoded translations
1 parent 35e4986 commit f34e18c

4 files changed

Lines changed: 87 additions & 44 deletions

File tree

README.md

Lines changed: 73 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
https://github.com/SORMAS-Foundation/SORMAS-Project/compare/feat/13832-ngsurvey-integration?expand=1
2-
3-
41
<p align="center">
52
<a href="https://sormas.org/">
63
<img
@@ -18,68 +15,110 @@ https://github.com/SORMAS-Foundation/SORMAS-Project/compare/feat/13832-ngsurvey-
1815

1916
# SORMAS
2017

21-
**SORMAS** (Surveillance Outbreak Response Management and Analysis System) is an open source eHealth system - consisting of separate web and mobile apps - that is geared towards optimizing the processes used in monitoring the spread of infectious diseases and responding to outbreak situations.
18+
**SORMAS** (Surveillance Outbreak Response Management and Analysis System) is an open source eHealth system - consisting
19+
of separate web and mobile apps - that is geared towards optimizing the processes used in monitoring the spread of
20+
infectious diseases and responding to outbreak situations.
2221

2322
## FAQ (Frequently Asked Questions)
2423

2524
### Where can I find the documentation?
2625

27-
We provide an extensive documentation of SORMAS for users, system administrators, Developers and DevOps in our <a href="https://wiki.sorm.as" target="_blank">Wiki</a>.
26+
We provide an extensive documentation of SORMAS for users, system administrators, Developers and DevOps in
27+
our <a href="https://wiki.sorm.as" target="_blank">Wiki</a>.
2828

2929
### How Does it Work?
3030

3131
You can give SORMAS a try on our demo server at <https://demo.sormas.org>!
3232

3333
### How Can I Get Involved?
3434

35-
Read through our [*Contributing Readme*](docs/CONTRIBUTING.md) and contact us at info@sormas.org to learn how you can help to drive the development of SORMAS forward,
36-
or check out our [Discussions](https://github.com/sormas-foundation/SORMAS-Project/discussions) to get development support from the core developers and other community members.
35+
Read through our [*Contributing Readme*](docs/CONTRIBUTING.md) and contact us at info@sormas.org to learn how you can
36+
help to drive the development of SORMAS forward,
37+
or check out our [Discussions](https://github.com/sormas-foundation/SORMAS-Project/discussions) to get development
38+
support from the core developers and other community members.
3739
SORMAS is a community-driven project, and we'd love to have you on board!
3840

39-
If you want to contribute to the code, please strictly adhere to the [*Development Environment*](docs/DEVELOPMENT_ENVIRONMENT.md) guide to ensure that everything is set up correctly.
40-
Please also make sure that you've read the [*Development Contributing Guidelines*](docs/CONTRIBUTING.md#development-contributing-guidelines) before you start to develop.
41+
If you want to contribute to the code, please strictly adhere to the [*Development
42+
Environment*](docs/DEVELOPMENT_ENVIRONMENT.md) guide to ensure that everything is set up correctly.
43+
Please also make sure that you've read the [*Development Contributing
44+
Guidelines*](docs/CONTRIBUTING.md#development-contributing-guidelines) before you start to develop.
4145

4246
### How Can I Report a Bug or Request a Feature?
4347

44-
If you want to report a **security issue**, please read and follow our [*Security Policies*](docs/SECURITY.md). For bugs without security implications, change and feature requests, please [create a new issue](https://github.com/sormas-foundation/SORMAS-Project/issues/new/choose) and
45-
read the [*Submitting an Issue*](docs/CONTRIBUTING.md#submitting-an-issue) guide for more detailed instructions. We appreciate your help!
48+
If you want to report a **security issue**, please read and follow our [*Security Policies*](docs/SECURITY.md). For bugs
49+
without security implications, change and feature requests,
50+
please [create a new issue](https://github.com/sormas-foundation/SORMAS-Project/issues/new/choose) and
51+
read the [*Submitting an Issue*](docs/CONTRIBUTING.md#submitting-an-issue) guide for more detailed instructions. We
52+
appreciate your help!
4653

4754
### Which Browsers and Android Versions are Supported?
4855

49-
SORMAS officially supports and is tested on **Chromium-based browsers** (like Google Chrome) and **Mozilla Firefox**, and all Android versions starting from **Android 7.0** (Nougat). In principle, SORMAS should be usable with all web browsers that are supported by Vaadin 8 (Chrome, Firefox, Safari, Edge, Internet Explorer 11; see <https://vaadin.com/faq>).
56+
SORMAS officially supports and is tested on **Chromium-based browsers** (like Google Chrome) and **Mozilla Firefox**,
57+
and all Android versions starting from **Android 7.0** (Nougat). In principle, SORMAS should be usable with all web
58+
browsers that are supported by Vaadin 8 (Chrome, Firefox, Safari, Edge, Internet Explorer 11;
59+
see <https://vaadin.com/faq>).
5060

51-
Making use of the SORMAS web application through a mobile device web browser is possible and acceptable also in countries that are subject to the General Data Protection Regulation (GDPR) as enforced by the European Union. However, in such countries that are subject to the GDPR, the Android application (.apk file) for SORMAS should not be used on mobile devices until further notice.
61+
Making use of the SORMAS web application through a mobile device web browser is possible and acceptable also in
62+
countries that are subject to the General Data Protection Regulation (GDPR) as enforced by the European Union. However,
63+
in such countries that are subject to the GDPR, the Android application (.apk file) for SORMAS should not be used on
64+
mobile devices until further notice.
5265

5366
### Is there a ReST API documentation?
5467

55-
Yes! Please download the [latest release](https://github.com/sormas-foundation/SORMAS-Project/releases/latest) and copy the content of /deploy/openapi/sormas-rest.yaml to an editor that generates a visual API documentation(e.g. <https://editor.swagger.io/>).
56-
A runtime Swagger documentation of the External Visits Resource (used by external symptom journals such as CLIMEDO or PIA) is available at ``<<host>>/sormas-rest/openapi.json`` or ``<<host>>/sormas-rest/openapi.yaml``
68+
Yes! Please download the [latest release](https://github.com/sormas-foundation/SORMAS-Project/releases/latest) and copy
69+
the content of /deploy/openapi/sormas-rest.yaml to an editor that generates a visual API documentation(
70+
e.g. <https://editor.swagger.io/>).
71+
A runtime Swagger documentation of the External Visits Resource (used by external symptom journals such as CLIMEDO or
72+
PIA) is available at ``<<host>>/sormas-rest/openapi.json`` or ``<<host>>/sormas-rest/openapi.yaml``
5773

5874
### Who is responsible for Data Protection and Data Security?
5975

60-
We herewith explicitly would like to draw your attention to the fact, that the respective public health agency running SORMAS is in charge of data security and data protection and has to ensure compliance with national data protection and data security regulations in their respective jurisdiction.
61-
It has to ensure that state-of-the art requirements for data protection and data security are fulfilled. All those prerequisites and examinations have to be done in the context of the country and its respective legal framework.
62-
For these reasons, HZI cannot take the responsibility from the respective public health agency running the SORMAS systems and is not liable for any violation of data protection of the agency as the data generated by SORMAS belong to that very agency.
76+
We herewith explicitly would like to draw your attention to the fact, that the respective public health agency running
77+
SORMAS is in charge of data security and data protection and has to ensure compliance with national data protection and
78+
data security regulations in their respective jurisdiction.
79+
It has to ensure that state-of-the art requirements for data protection and data security are fulfilled. All those
80+
prerequisites and examinations have to be done in the context of the country and its respective legal framework.
81+
For these reasons, HZI cannot take the responsibility from the respective public health agency running the SORMAS
82+
systems and is not liable for any violation of data protection of the agency as the data generated by SORMAS belong to
83+
that very agency.
6384

6485
<p align="center"><img src="https://user-images.githubusercontent.com/23701005/74659600-ebb8fc00-5194-11ea-836b-a7ca9d682301.png"/></p>
6586

6687
## Guidelines and Resources
6788

68-
If you want to learn more about the development and contribution process, setting up or customizing your own system, or technical details, please consider the following guides and resources available in this repository. You can also view this readme and all guides outside the Wiki with a full table of content and search functionality here: <https://sormas-foundation.github.io/SORMAS-Project/>
69-
70-
* **[GitHub Wiki](https://github.com/sormas-foundation/SORMAS-Project/wiki) - Our wiki contains additional guides for server customization and development instructions. Please have a look at it if you need information on anything that this readme does not contain.**
71-
* [Contributing Guidelines](docs/CONTRIBUTING.md) - These are mandatory literature if you want to contribute to this repository in any way (e.g. by submitting issues, developing code, or translating SORMAS into new languages).
72-
* [Development Environment Setup Instructions](docs/DEVELOPMENT_ENVIRONMENT.md) - If you want to get involved with development, this guide tells you how to correctly set up your system in order to contribute to the code in adherence with codestyle guidelines, development practices, etc.
73-
* [Troubleshooting](docs/TROUBLESHOOTING.md) - A collection of solutions to common (mostly development) problems. Please consult this readme when encountering issues before issuing a support request.
74-
* [Server Customization](docs/SERVER_CUSTOMIZATION.md) - If you are maintaining a SORMAS server or are a developer, this guide explains core concepts such as turning features on or off, importing infrastructure data or adjusting the configuration file.
75-
* [Internationalization](docs/I18N.md) - SORMAS can be translated in any language by using the open source tool [Crowdin](https://crowdin.com/project/sormas); this resource explains how this process is working.
76-
* [Disease Definition Instructions](docs/SOP_DISEASES.md) - We already support a large number of diseases, but not all of them are fully configured for case-based surveillance, and some might not be part of SORMAS at all yet; if you need SORMAS to support a specific disease, please use these instructions to give us all the information we need in order to extend the software with your requested disease.
89+
If you want to learn more about the development and contribution process, setting up or customizing your own system, or
90+
technical details, please consider the following guides and resources available in this repository. You can also view
91+
this readme and all guides outside the Wiki with a full table of content and search functionality
92+
here: <https://sormas-foundation.github.io/SORMAS-Project/>
93+
94+
* **[GitHub Wiki](https://github.com/sormas-foundation/SORMAS-Project/wiki) - Our wiki contains additional guides for
95+
server customization and development instructions. Please have a look at it if you need information on anything that
96+
this readme does not contain.**
97+
* [Contributing Guidelines](docs/CONTRIBUTING.md) - These are mandatory literature if you want to contribute to this
98+
repository in any way (e.g. by submitting issues, developing code, or translating SORMAS into new languages).
99+
* [Development Environment Setup Instructions](docs/DEVELOPMENT_ENVIRONMENT.md) - If you want to get involved with
100+
development, this guide tells you how to correctly set up your system in order to contribute to the code in adherence
101+
with codestyle guidelines, development practices, etc.
102+
* [Troubleshooting](docs/TROUBLESHOOTING.md) - A collection of solutions to common (mostly development) problems. Please
103+
consult this readme when encountering issues before issuing a support request.
104+
* [Server Customization](docs/SERVER_CUSTOMIZATION.md) - If you are maintaining a SORMAS server or are a developer, this
105+
guide explains core concepts such as turning features on or off, importing infrastructure data or adjusting the
106+
configuration file.
107+
* [Internationalization](docs/I18N.md) - SORMAS can be translated in any language by using the open source
108+
tool [Crowdin](https://crowdin.com/project/sormas); this resource explains how this process is working.
109+
* [Disease Definition Instructions](docs/SOP_DISEASES.md) - We already support a large number of diseases, but not all
110+
of them are fully configured for case-based surveillance, and some might not be part of SORMAS at all yet; if you need
111+
SORMAS to support a specific disease, please use these instructions to give us all the information we need in order to
112+
extend the software with your requested disease.
77113
* [Sormas2Sormas](docs/SORMAS2SORMAS.md) - The Sormas2Sormas API is used to share entities between SORMAS instances.
78114

79-
* [Security Policies](docs/SECURITY.md) - These contain important information about how to report security problems and the processes we are using to take care of them.
80-
* [Third-Party License Acknowledgement](docs/3RD_PARTY_ACK.md) - This resource contains the names and license copies of external resources that SORMAS is using.
115+
* [Security Policies](docs/SECURITY.md) - These contain important information about how to report security problems and
116+
the processes we are using to take care of them.
117+
* [Third-Party License Acknowledgement](docs/3RD_PARTY_ACK.md) - This resource contains the names and license copies of
118+
external resources that SORMAS is using.
81119

82-
If you want to set up a SORMAS instance for production, testing or development purposes, please refer to the following guides:
120+
If you want to set up a SORMAS instance for production, testing or development purposes, please refer to the following
121+
guides:
83122

84123
* [Installing a SORMAS Server](docs/SERVER_SETUP.md)
85124
* [Updating a SORMAS Server](docs/SERVER_UPDATE.md)
@@ -95,8 +134,10 @@ The project consists of the following modules:
95134
- [**sormas-backend:**](/sormas-backend) Server entity services, facades, etc.
96135
- [**sormas-base:**](/sormas-base) Base project that also contains build scripts
97136
- [**sormas-cargoserver:**](/sormas-cargoserver) Setup for a local dev server using maven-cargo
98-
- [**sormas-e2e-performance-tests:**](/sormas-e2e-performance-tests) Automated performance tests addressing the ReST interface (sormas-rest)
99-
- [**sormas-e2e-tests:**](/sormas-e2e-tests) Automated frontend tests addressing sormas-ui **and** API tests against sormas-rest. The API steps are partly used to prepare data for UI tests.
137+
- [**sormas-e2e-performance-tests:**](/sormas-e2e-performance-tests) Automated performance tests addressing the ReST
138+
interface (sormas-rest)
139+
- [**sormas-e2e-tests:**](/sormas-e2e-tests) Automated frontend tests addressing sormas-ui **and** API tests against
140+
sormas-rest. The API steps are partly used to prepare data for UI tests.
100141
- [**sormas-ear:**](/sormas-ear) The ear needed to build the application
101142
- [**sormas-keycloak-service-provider:**](/sormas-keycloak-service-provider) Custom Keycloak SPI for SORMAS
102143
- [**sormas-rest:**](/sormas-rest) The REST interface; see [`sormas-rest/README.md`](sormas-rest/README.md)

sormas-ui/src/main/java/de/symeda/sormas/ui/SormasErrorHandler.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import com.vaadin.shared.ui.ErrorLevel;
4141
import com.vaadin.ui.AbstractComponent;
4242
import com.vaadin.ui.Notification;
43-
import com.vaadin.ui.UI;
4443
import com.vaadin.v7.data.Buffered;
4544
import com.vaadin.v7.data.Validator;
4645
import com.vaadin.v7.ui.AbstractField;
@@ -77,8 +76,6 @@ public static void handleError(ErrorEvent event) {
7776
return;
7877
}
7978

80-
UI.getCurrent().getPage().getJavaScript().execute("Java exception: " + ExceptionUtils.getRootCauseMessage(t));
81-
8279
ErrorMessage errorMessage = getErrorMessageForException(t);
8380

8481
if (t != null) {

sormas-ui/src/main/java/de/symeda/sormas/ui/externalmessage/surveyresponse/SurveyResponseDetailsWindow.java

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public SurveyResponseDetailsWindow(ExternalMessageDto externalMessage, Runnable
7272
CssStyles.style(generalInfoHeading, CssStyles.H3);
7373
layout.addComponent(generalInfoHeading);
7474

75-
addReadOnlyField(layout, "UUID", externalMessage.getUuid());
75+
addReadOnlyField(layout, I18nProperties.getCaption(Captions.surveyResponseUuid), externalMessage.getUuid());
7676
addReadOnlyField(
7777
layout,
7878
I18nProperties.getPrefixCaption(ExternalMessageDto.I18N_PREFIX, ExternalMessageDto.DISEASE),
@@ -88,13 +88,13 @@ public SurveyResponseDetailsWindow(ExternalMessageDto externalMessage, Runnable
8888
CssStyles.style(metadataHeading, CssStyles.H3);
8989
layout.addComponent(metadataHeading);
9090

91-
addReadOnlyField(layout, "External Survey ID", request.getExternalSurveyId());
92-
addReadOnlyField(layout, "Token", request.getToken());
93-
addReadOnlyField(layout, "Respondent ID", request.getExternalRespondentId());
94-
addReadOnlyField(layout, "Response Received", toStringOrEmpty(request.getResponseReceivedDate()));
95-
addReadOnlyField(layout, "Replacement Strategy", toStringOrEmpty(request.getReplacementStrategy()));
96-
addReadOnlyField(layout, "Empty Value Behavior", toStringOrEmpty(request.getEmptyValueBehavior()));
97-
addReadOnlyField(layout, "Patched in Case of Failures", String.valueOf(request.isPatchedInCaseOfFailures()));
91+
addReadOnlyField(layout, I18nProperties.getCaption(Captions.surveyResponseExternalSurveyId), request.getExternalSurveyId());
92+
addReadOnlyField(layout, I18nProperties.getCaption(Captions.surveyResponseToken), request.getToken());
93+
addReadOnlyField(layout, I18nProperties.getCaption(Captions.surveyResponseRespondentId), request.getExternalRespondentId());
94+
addReadOnlyField(layout, I18nProperties.getCaption(Captions.surveyResponseResponseReceivedDate), toStringOrEmpty(request.getResponseReceivedDate()));
95+
addReadOnlyField(layout, I18nProperties.getCaption(Captions.surveyResponseReplacementStrategy), toStringOrEmpty(request.getReplacementStrategy()));
96+
addReadOnlyField(layout, I18nProperties.getCaption(Captions.surveyResponseEmptyValueBehavior), toStringOrEmpty(request.getEmptyValueBehavior()));
97+
addReadOnlyField(layout, I18nProperties.getCaption(Captions.surveyResponsePatchedInCaseOfFailures), String.valueOf(request.isPatchedInCaseOfFailures()));
9898

9999
// --- Patch Dictionary section ---
100100
Label dictionaryHeading = new Label(I18nProperties.getCaption(Captions.surveyResponsePatchDictionary));
@@ -170,7 +170,10 @@ public SurveyResponseDetailsWindow(ExternalMessageDto externalMessage, Runnable
170170

171171
DataPatchResponse patchResponse = result.getPatchResponse();
172172
if (patchResponse != null) {
173-
addReadOnlyField(layout, I18nProperties.getCaption(Captions.surveyResponseApplied), patchResponse.isApplied() ? "Yes" : "No");
173+
addReadOnlyField(
174+
layout,
175+
I18nProperties.getCaption(Captions.surveyResponseApplied),
176+
patchResponse.isApplied() ? I18nProperties.getCaption(Captions.actionYes) : I18nProperties.getCaption(Captions.actionNo));
174177

175178
if (patchResponse.hasFailures()) {
176179
Label failuresHeading = new Label(I18nProperties.getString(Strings.headingSurveyResponseFailures));

sormas-ui/src/main/java/de/symeda/sormas/ui/survey/SurveyQuestionnaireWindow.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
/**
3333
* Modal window displaying a survey questionnaire as a structured HTML view.
3434
* Shows questions, their answers and nested subquestions.
35+
*
36+
* @implNote this was inspired from a survey tool's simplified view within EMAL.
3537
*/
3638
public class SurveyQuestionnaireWindow {
3739

0 commit comments

Comments
 (0)