diff --git a/README.md b/README.md index d4be314e3..e642dd8b4 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ Stirling-PDF currently supports 39 languages! | Hungarian (Magyar) (hu_HU) | ![99%](https://geps.dev/progress/99) | | Indonesian (Bahasa Indonesia) (id_ID) | ![80%](https://geps.dev/progress/80) | | Irish (Gaeilge) (ga_IE) | ![91%](https://geps.dev/progress/91) | -| Italian (Italiano) (it_IT) | ![98%](https://geps.dev/progress/98) | +| Italian (Italiano) (it_IT) | ![99%](https://geps.dev/progress/99) | | Japanese (日本語) (ja_JP) | ![93%](https://geps.dev/progress/93) | | Korean (한국어) (ko_KR) | ![92%](https://geps.dev/progress/92) | | Norwegian (Norsk) (no_NB) | ![86%](https://geps.dev/progress/86) | diff --git a/src/main/java/stirling/software/SPDF/config/security/database/DatabaseService.java b/src/main/java/stirling/software/SPDF/config/security/database/DatabaseService.java index 04b470f92..27e9ae7b1 100644 --- a/src/main/java/stirling/software/SPDF/config/security/database/DatabaseService.java +++ b/src/main/java/stirling/software/SPDF/config/security/database/DatabaseService.java @@ -246,26 +246,28 @@ public class DatabaseService implements DatabaseInterface { boolean isDBUrlH2 = datasource.getCustomDatabaseUrl().contains("h2") || datasource.getCustomDatabaseUrl().contains("H2"); + boolean isCustomDatabase = datasource.isEnableCustomDatabase(); - if (isTypeH2 && !isDBUrlH2) { - log.warn( - "Datasource type is H2, but the URL does not contain 'h2'. " - + "Please check your configuration."); - throw new IllegalStateException( - "Datasource type is H2, but the URL does not contain 'h2'. Please check your" - + " configuration."); - } else if (!isTypeH2 && isDBUrlH2) { - log.warn( - "Datasource URL contains 'h2', but the type is not H2. " - + "Please check your configuration."); - throw new IllegalStateException( - "Datasource URL contains 'h2', but the type is not H2. Please check your" - + " configuration."); + if (isCustomDatabase) { + if (isTypeH2 && !isDBUrlH2) { + log.warn( + "Datasource type is H2, but the URL does not contain 'h2'. " + + "Please check your configuration."); + throw new IllegalStateException( + "Datasource type is H2, but the URL does not contain 'h2'. Please check" + + " your configuration."); + } else if (!isTypeH2 && isDBUrlH2) { + log.warn( + "Datasource URL contains 'h2', but the type is not H2. " + + "Please check your configuration."); + throw new IllegalStateException( + "Datasource URL contains 'h2', but the type is not H2. Please check your" + + " configuration."); + } } - boolean isH2 = isTypeH2 && isDBUrlH2; - return !datasource.isEnableCustomDatabase() || isH2; + return !isCustomDatabase || isH2; } /** diff --git a/src/main/resources/messages_it_IT.properties b/src/main/resources/messages_it_IT.properties index 3c654ddb5..9e2a54af4 100644 --- a/src/main/resources/messages_it_IT.properties +++ b/src/main/resources/messages_it_IT.properties @@ -609,7 +609,7 @@ login.userIsDisabled=L'utente è disattivato, l'accesso è attualmente bloccato login.alreadyLoggedIn=Hai già effettuato l'accesso a login.alreadyLoggedIn2=dispositivi. Esci dai dispositivi e riprova. login.toManySessions=Hai troppe sessioni attive -login.logoutMessage=You have been logged out. +login.logoutMessage=Sei stato disconnesso. #auto-redact autoRedact.title=Redazione automatica