Repository: urlaubsverwaltung/urlaubsverwaltung (java)

Issue:
Polnische Feiertage
Unser polnischer Standort möchte gerne die Urlaubsverwaltung verwenden. Gibt es eine Möglichkeit die polnischen Feiertage hinzuzufügen?

[Feiertage Polen (Wikipedia)](https://de.wikipedia.org/wiki/Feiertage_in_Polen )



Pull request description:
Add public holidays of poland
closes #4668

Patch:
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayConfiguration.java b/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayConfiguration.java
index 2344115cf..b7679c40b 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayConfiguration.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/publicholiday/PublicHolidayConfiguration.java
@@ -13,7 +13,7 @@ import java.util.Map;
 @Configuration
 class PublicHolidayConfiguration {
 
-    private static final List<String> COUNTRIES = List.of("de", "at", "ch", "gb", "gr", "mt", "it", "hr", "es", "nl", "lt", "be");
+    private static final List<String> COUNTRIES = List.of("de", "at", "ch", "gb", "gr", "mt", "it", "hr", "es", "nl", "lt", "be", "pl");
 
     @Bean
     Map<String, HolidayManager> holidayManagerMap() {
diff --git a/src/main/java/org/synyx/urlaubsverwaltung/workingtime/FederalState.java b/src/main/java/org/synyx/urlaubsverwaltung/workingtime/FederalState.java
index 48077e61a..eb7538d2a 100644
--- a/src/main/java/org/synyx/urlaubsverwaltung/workingtime/FederalState.java
+++ b/src/main/java/org/synyx/urlaubsverwaltung/workingtime/FederalState.java
@@ -116,7 +116,9 @@ public enum FederalState {
 
     LITHUANIA("lt", "lt"),
 
-    BELGIUM("be", "be");
+    BELGIUM("be", "be"),
+
+    POLAND("pl", "pl");
 
     private final String[] codes;
 
diff --git a/src/main/resources/Holidays_pl.xml b/src/main/resources/Holidays_pl.xml
new file mode 100644
index 000000000..15282c264
--- /dev/null
+++ b/src/main/resources/Holidays_pl.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<Configuration hierarchy="pl" description="Poland"
+               xmlns="https://focus_shift.de/jollyday/schema/holiday"
+               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+               xsi:schemaLocation="https://focus_shift.de/jollyday/schema/holiday https://focus_shift.de/jollyday/schema/holiday/holiday.xsd">
+  <Holidays>
+    <Fixed month="JANUARY" day="1" descriptionPropertiesKey="NEW_YEAR"/>
+    <Fixed month="JANUARY" day="6" descriptionPropertiesKey="EPIPHANY"/>
+    <Fixed month="MAY" day="1" descriptionPropertiesKey="LABOUR_DAY"/>
+    <Fixed month="MAY" day="3" descriptionPropertiesKey="CONSTITUTION_DAY"/>
+    <Fixed month="AUGUST" day="15" descriptionPropertiesKey="ASSUMPTION_DAY"/>
+    <Fixed month="NOVEMBER" day="1" descriptionPropertiesKey="ALL_SAINTS"/>
+    <Fixed month="NOVEMBER" day="11" descriptionPropertiesKey="INDEPENDENCE_DAY"/>
+    <Fixed month="DECEMBER" day="24" descriptionPropertiesKey="CHRISTMAS_EVE" localizedType="UNOFFICIAL_HOLIDAY"/>
+    <Fixed month="DECEMBER" day="25" descriptionPropertiesKey="CHRISTMAS"/>
+    <Fixed month="DECEMBER" day="26" descriptionPropertiesKey="STEPHENS"/>
+    <Fixed month="DECEMBER" day="31" descriptionPropertiesKey="NEW_YEARS_EVE" localizedType="UNOFFICIAL_HOLIDAY"/>
+    <ChristianHoliday type="EASTER" descriptionPropertiesKey="christian.EASTER"/>
+    <ChristianHoliday type="EASTER_MONDAY" descriptionPropertiesKey="christian.EASTER_MONDAY"/>
+    <ChristianHoliday type="PENTECOST" descriptionPropertiesKey="christian.PENTECOST"/>
+    <ChristianHoliday type="CORPUS_CHRISTI" descriptionPropertiesKey="christian.CORPUS_CHRISTI"/>
+  </Holidays>
+</Configuration>
diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties
index 6d15aa41a..ca594fb7b 100644
--- a/src/main/resources/messages.properties
+++ b/src/main/resources/messages.properties
@@ -1110,6 +1110,7 @@ country.es=Spanien
 country.nl=Niederlande
 country.lt=Litauen
 country.be=Belgien
+country.pl=Polen
 
 # No Federal States
 federalState.NONE=Keine Feiertagesregelung
@@ -1229,6 +1230,9 @@ federalState.LITHUANIA=Litauen
 # Federal States Belgium
 federalState.BELGIUM=Belgien
 
+# Federal States Poland
+federalState.POLAND=Polen
+
 # DEPARTMENTS
 departments.header.title=Abteilungsübersicht
 departments.title=Abteilungen
diff --git a/src/main/resources/messages_de_AT.properties b/src/main/resources/messages_de_AT.properties
index a2b7998bc..19e866c7a 100644
--- a/src/main/resources/messages_de_AT.properties
+++ b/src/main/resources/messages_de_AT.properties
@@ -1062,6 +1062,7 @@ country.es=Spanien
 country.nl=Niederlande
 country.lt=Litauen
 country.be=Belgien
+country.pl=Polen
 
 # No Federal States
 federalState.NONE=Keine Feiertagesregelung
@@ -1181,6 +1182,9 @@ federalState.LITHUANIA=Litauen
 # Federal States Belgium
 federalState.BELGIUM=Belgien
 
+# Federal States Poland
+federalState.POLAND=Polen
+
 # DEPARTMENTS
 departments.header.title=Abteilungsübersicht
 departments.title=Abteilungen
diff --git a/src/main/resources/messages_el.properties b/src/main/resources/messages_el.properties
index f23d453cd..3a22ee70b 100644
--- a/src/main/resources/messages_el.properties
+++ b/src/main/resources/messages_el.properties
@@ -1007,6 +1007,7 @@ country.es=Ισπανία
 country.nl=Ολλανδία
 country.lt=Λιθουανία
 country.be=Βέλγιο
+country.pl=Πολωνία
 
 # No Federal States
 federalState.NONE=Κανένας κανονισμός επίσημων αργιών
@@ -1126,6 +1127,9 @@ federalState.LITHUANIA=Λιθουανία
 # Federal States Belgium
 federalState.BELGIUM=Βέλγιο
 
+# Federal States Poland
+federalState.POLAND=Πολωνία
+
 # DEPARTMENTS
 departments.header.title=Επισκόπηση τμημάτων
 departments.title=Τμήματα
diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties
index 659bd0b8f..ed6b8ca93 100644
--- a/src/main/resources/messages_en.properties
+++ b/src/main/resources/messages_en.properties
@@ -1081,6 +1081,7 @@ country.es=Spain
 country.nl=The Netherlands
 country.lt=Lithuania
 country.be=Belgium
+country.pl=Poland
 
 # No Federal States
 federalState.NONE=No public holiday regulation
@@ -1200,6 +1201,9 @@ federalState.LITHUANIA=Lithuania
 # Federal States Belgium
 federalState.BELGIUM=Belgium
 
+# Federal States Poland
+federalState.POLAND=Poland
+
 # DEPARTMENTS
 departments.header.title=Departments overview
 departments.title=Departments


Test patch:
diff --git a/src/test/java/org/synyx/urlaubsverwaltung/workingtime/FederalStateTest.java b/src/test/java/org/synyx/urlaubsverwaltung/workingtime/FederalStateTest.java
index eb54c2825..56213a851 100644
--- a/src/test/java/org/synyx/urlaubsverwaltung/workingtime/FederalStateTest.java
+++ b/src/test/java/org/synyx/urlaubsverwaltung/workingtime/FederalStateTest.java
@@ -50,6 +50,7 @@ import static org.synyx.urlaubsverwaltung.workingtime.FederalState.LITHUANIA;
 import static org.synyx.urlaubsverwaltung.workingtime.FederalState.MALTA;
 import static org.synyx.urlaubsverwaltung.workingtime.FederalState.NETHERLANDS;
 import static org.synyx.urlaubsverwaltung.workingtime.FederalState.NONE;
+import static org.synyx.urlaubsverwaltung.workingtime.FederalState.POLAND;
 import static org.synyx.urlaubsverwaltung.workingtime.FederalState.SPAIN_ANDALUCIA;
 import static org.synyx.urlaubsverwaltung.workingtime.FederalState.SPAIN_ARAGON;
 import static org.synyx.urlaubsverwaltung.workingtime.FederalState.SPAIN_ASTURIAS;
@@ -214,7 +215,9 @@ class FederalStateTest {
 
             Arguments.of(LITHUANIA, "lt", null),
 
-            Arguments.of(BELGIUM, "be", null)
+            Arguments.of(BELGIUM, "be", null),
+
+            Arguments.of(POLAND, "pl", null)
         );
     }
 
@@ -354,8 +357,9 @@ class FederalStateTest {
         final List<FederalState> nlFederalStates = Arrays.stream(FederalState.values()).filter(federalState -> "nl".equals(federalState.getCountry())).toList();
         final List<FederalState> ltFederalStates = Arrays.stream(FederalState.values()).filter(federalState -> "lt".equals(federalState.getCountry())).toList();
         final List<FederalState> beFederalStates = Arrays.stream(FederalState.values()).filter(federalState -> "be".equals(federalState.getCountry())).toList();
+        final List<FederalState> plFederalStates = Arrays.stream(FederalState.values()).filter(federalState -> "pl".equals(federalState.getCountry())).toList();
 
-        assertThat(federalStatesTypesByCountry).hasSize(12)
+        assertThat(federalStatesTypesByCountry).hasSize(13)
             .contains(entry("de", deFederalStates))
             .contains(entry("at", atFederalStates))
             .contains(entry("ch", chFederalStates))
@@ -367,6 +371,7 @@ class FederalStateTest {
             .contains(entry("es", esFederalStates))
             .contains(entry("nl", nlFederalStates))
             .contains(entry("lt", ltFederalStates))
-            .contains(entry("be", beFederalStates));
+            .contains(entry("be", beFederalStates))
+            .contains(entry("pl", plFederalStates));
     }
 }