Skip to content

Commit a19c2e9

Browse files
committed
Ignore translations errors in prod
1 parent 2b659e3 commit a19c2e9

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

client/src/locale/I18n.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ if (["nl", "en", "pt"].indexOf(parameterByName) === -1) {
3232
I18n.locale = parameterByName;
3333

3434
I18n.missingTranslation.register("report-error", (i18n, scope) => {
35-
const user = useAppStore.getState().user;
36-
if (user && user.id && !scope.startsWith("tab")) {
35+
const {user, config} = useAppStore.getState();
36+
if (user && user.id && !isEmpty(config.environment)) {
3737
reportError({"Missing translation": scope});
3838
}
3939
return `[missing "${scope}" translation]`;

server/src/main/java/invite/api/UserController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ public UserController(Config config,
9898
public ResponseEntity<Config> config(User user,
9999
@RequestParam(value = "guest", required = false, defaultValue = "false") boolean guest) {
100100
LOG.debug("GET /config");
101-
Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
102101
Config result = new Config(this.config);
103102
result
104103
.withAuthenticated(user != null && user.getId() != null)

server/src/main/java/invite/config/Config.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public class Config {
2727
private String eduidIdpSchacHomeOrganization;
2828
private List<String> missingAttributes;
2929
private String languages;
30+
private String environment;
3031

3132
public Config(Config base) {
3233
this.clientUrl = base.clientUrl;
@@ -40,6 +41,7 @@ public Config(Config base) {
4041
this.groupUrnPrefix = base.groupUrnPrefix;
4142
this.eduidIdpSchacHomeOrganization = base.eduidIdpSchacHomeOrganization;
4243
this.languages = base.languages;
44+
this.environment = base.environment;
4345
}
4446

4547
public Config withAuthenticated(boolean authenticated) {

server/src/main/resources/application.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ config:
124124
performance-seed-allowed: True
125125
eduid-idp-schac-home-organization: "test.eduid.nl"
126126
languages: "nl, en"
127+
environment: ${gui.disclaimer.content}
127128

128129
feature:
129130
enable-performance-seed: False

0 commit comments

Comments
 (0)