Skip to content

Commit

Permalink
Unify observed labels format (#1636)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r authored Jan 8, 2024
1 parent 097692c commit 5b307c1
Show file tree
Hide file tree
Showing 368 changed files with 26,804 additions and 26,754 deletions.
2 changes: 1 addition & 1 deletion docs/source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ will include January 2nd, 2012 as a holiday:
>>> date(2012, 1, 2) in us_holidays
True
>>> us_holidays.get(date(2012 ,1, 2))
"New Year's Day (Observed)"
"New Year's Day (observed)"
The values of :py:attr:`observed` and :py:attr:`expand` can be changed on the
fly and the holiday list will be adjusted accordingly:
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/albania.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Albania(
"""

country = "AL"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/angola.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class Angola(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat
country = "AO"
default_language = "pt_AO"
supported_languages = ("en_US", "pt_AO", "uk")
# %s (Observed).
observed_label = tr("%s (Ponte)")
# %s (observed).
observed_label = tr("%s (ponte)")

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/argentina.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ class Argentina(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, S
country = "AR"
default_language = "es"
supported_languages = ("en_US", "es", "uk")
# %s (Observed).
observed_label = tr("%s (Observado)")
# %s (observed).
observed_label = tr("%s (observado)")

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/australia.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Australia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, S
"""

country = "AU"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"
subdivisions = ("ACT", "NSW", "NT", "QLD", "SA", "TAS", "VIC", "WA")

@property
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/azerbaijan.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Azerbaijan(ObservedHolidayBase, InternationalHolidays, IslamicHolidays, St
default_language = "az"
# Estimated label.
estimated_label = tr("%s (təxmini)")
# %s (Observed).
# %s (observed).
observed_label = tr("%s (müşahidə olunur)")
supported_categories = (PUBLIC, WORKDAY)
supported_languages = ("az", "en_US", "uk")
Expand Down
18 changes: 9 additions & 9 deletions holidays/countries/bahamas.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class Bahamas(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
"""

country = "BS"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand All @@ -53,9 +53,9 @@ def _populate_public_holidays(self):

# New Year's Day.
# Pre-2012 Observance:
# - If TUE, New Year's Day (Observed) prev MON.
# - If WED or THU, New Year's Day (Observed) next FRI.
# 2012 and beyond Observance: If SUN, New Year's Day (Observed) next MON (not for SAT).
# - If TUE, New Year's Day (observed) prev MON.
# - If WED or THU, New Year's Day (observed) next FRI.
# 2012 and beyond Observance: If SUN, New Year's Day (observed) next MON (not for SAT).
self._add_observed(
self._add_new_years_day("New Year's Day"),
rule=SUN_TO_NEXT_MON
Expand Down Expand Up @@ -93,8 +93,8 @@ def _populate_public_holidays(self):
# Known as "Discovery Day" prior to 2013, with its date fixed as Oct 12 annually.
# Got its name changed on Oct 11, 2013 under Majority Rule (Public Holiday) Act 2013.
# Pre-2013 Observance:
# - If TUE, Discovery Day (Observed) prev MON.
# - If WED or THU, Discovery Day (Observed) next FRI.
# - If TUE, Discovery Day (observed) prev MON.
# - If WED or THU, Discovery Day (observed) next FRI.
if self._year >= 2013:
self._add_holiday_2nd_mon_of_oct("National Heroes Day")
else:
Expand All @@ -105,9 +105,9 @@ def _populate_public_holidays(self):

# Christmas Holidays Exception Rules.
# Observance Exception:
# FRI-SAT -> Boxing Day (Observed) next MON.
# SAT-SUN -> Boxing Day (Observed) next MON.
# SUN-MON -> Christmas Day (Observed) next TUE.
# FRI-SAT -> Boxing Day (observed) next MON.
# SAT-SUN -> Boxing Day (observed) next MON.
# SUN-MON -> Christmas Day (observed) next TUE.

# Christmas Day.
self._add_observed(self._add_christmas_day("Christmas Day"), rule=SUN_TO_NEXT_TUE)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/barbados.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Barbados(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, St
"""

country = "BB"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/belize.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Belize(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
"""

country = "BZ"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/bolivia.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class Bolivia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
country = "BO"
default_language = "es"
supported_languages = ("en_US", "es", "uk")
# %s (Observed).
observed_label = tr("%s (Observado)")
# %s (observed).
observed_label = tr("%s (observado)")
subdivisions = (
"B", # El Beni
"C", # Cochabamba
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/bosnia_and_herzegovina.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class BosniaAndHerzegovina(
country = "BA"
default_language = "bs"
supported_languages = ("bs", "en_US", "sr", "uk")
# %s (Observed).
# %s (observed).
observed_label = tr("%s (preneseno)")
subdivisions = (
"BIH", # Federacija Bosne i Hercegovine
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/botswana.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Botswana(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, St
"""

country = "BW"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/brunei.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class Brunei(
country = "BN"
default_language = "ms"
estimated_label = tr("%s (anggaran)")
observed_label = tr("%s - Diperhatikan")
observed_label = tr("%s (diperhatikan)")
supported_languages = ("en_US", "ms", "th")

def __init__(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/bulgaria.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Bulgaria(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):

country = "BG"
default_language = "bg"
# %s (Observed).
# %s (observed).
observed_label = tr("%s (почивен ден)")
supported_categories = (PUBLIC, SCHOOL)
supported_languages = ("bg", "en_US", "uk")
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/burkina_faso.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class BurkinaFaso(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
"""

country = "BF"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/burundi.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Burundi(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Isl
"""

country = "BI"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/cameroon.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Cameroon(
"""

country = "CM"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/canada.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ class Canada(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat

country = "CA"
default_language = "en_CA"
# %s (Observed).
observed_label = tr("%s (Observed)")
# %s (observed).
observed_label = tr("%s (observed)")
supported_categories = (GOVERNMENT, OPTIONAL, PUBLIC)
subdivisions = (
"AB",
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/chad.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class Chad(
"""

country = "TD"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/china.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class China(ObservedHolidayBase, ChineseCalendarHolidays, InternationalHolidays,
"""

country = "CN"
# %s (Observed).
# %s (observed).
observed_label = tr("%s(观察日)")
supported_categories = (PUBLIC, HALF_DAY)
default_language = "zh_CN"
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/colombia.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ class Colombia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):

country = "CO"
default_language = "es"
# %s (Observed).
observed_label = tr("%s (Observado)")
# %s (observed).
observed_label = tr("%s (observado)")
supported_languages = ("en_US", "es", "uk")

def __init__(self, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/costa_rica.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class CostaRica(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):

country = "CR"
default_language = "es"
# %s (Observed).
observed_label = tr("%s (Observado)")
# %s (observed).
observed_label = tr("%s (observado)")
supported_languages = ("en_US", "es", "uk")

def __init__(self, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/cuba.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class Cuba(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):

country = "CU"
default_language = "es"
# %s Observed.
observed_label = tr("%s (Observado)")
# %s observed.
observed_label = tr("%s (observado)")
supported_languages = ("en_US", "es", "uk")

def __init__(self, *args, **kwargs):
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/ecuador.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ class Ecuador(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):

country = "EC"
default_language = "es"
# %s (Observed).
observed_label = tr("%s (Observado)")
# %s (observed).
observed_label = tr("%s (observado)")
supported_languages = ("en_US", "es", "uk")

def __init__(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/eswatini.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Eswatini(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, St
"""

country = "SZ"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/greece.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Greece(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):

country = "GR"
default_language = "el"
# %s (Observed).
# %s (observed).
observed_label = tr("%s (παρατηρήθηκε)")
supported_categories = (HALF_DAY, PUBLIC)
supported_languages = ("el", "en_US", "uk")
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/ireland.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Ireland(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Sta
"""

country = "IE"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/israel.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class Israel(ObservedHolidayBase):

country = "IL"
default_language = "he"
# %s (Observed).
# %s (observed).
observed_label = tr("(נצפה) %s")
supported_categories = (OPTIONAL, PUBLIC, SCHOOL)
supported_languages = ("en_US", "he", "uk")
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/jamaica.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Jamaica(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
"""

country = "JM"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/kazakhstan.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Kazakhstan(ObservedHolidayBase, ChristianHolidays, InternationalHolidays,
"""

country = "KZ"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self, JULIAN_CALENDAR)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/kenya.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Kenya(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stati
"""

country = "KE"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/latvia.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Latvia(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat

country = "LV"
default_language = "lv"
# %s (Observed).
# %s (observed).
observed_label = tr("%s (brīvdiena)")
supported_languages = ("en_US", "lv", "uk")

Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/malawi.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Malawi(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
"""

country = "MW"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self)
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/malaysia.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Malaysia(
StaticHolidays,
):
country = "MY"
observed_label = "%s [In lieu]"
observed_label = "%s (in lieu)"
subdivisions = (
"JHR",
"KDH",
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/monaco.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ class Monaco(ObservedHolidayBase, ChristianHolidays, InternationalHolidays, Stat

country = "MC"
default_language = "fr"
# %s (Observed).
observed_label = tr("%s (Observé)")
# %s (observed).
observed_label = tr("%s (observé)")
supported_languages = ("en_US", "fr", "uk")

def __init__(self, *args, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion holidays/countries/montenegro.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Montenegro(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
"""

country = "ME"
observed_label = "%s (Observed)"
observed_label = "%s (observed)"

def __init__(self, *args, **kwargs):
ChristianHolidays.__init__(self, calendar=JULIAN_CALENDAR)
Expand Down
4 changes: 2 additions & 2 deletions holidays/countries/mozambique.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
class Mozambique(ObservedHolidayBase, ChristianHolidays, InternationalHolidays):
country = "MZ"
default_language = "pt_MZ"
# %s (Observed).
observed_label = tr("%s (Ponte)")
# %s (observed).
observed_label = tr("%s (ponte)")
supported_languages = ("en_US", "pt_MZ", "uk")

def __init__(self, *args, **kwargs):
Expand Down
Loading

0 comments on commit 5b307c1

Please sign in to comment.