Skip to content

Commit

Permalink
tweak fi date format settings
Browse files Browse the repository at this point in the history
STTNHUB-260
  • Loading branch information
petrjasek committed Nov 1, 2023
1 parent 09bbc8a commit ad88f02
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
23 changes: 13 additions & 10 deletions server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async-timeout==4.0.3
# via redis
authlib==0.14.3
# via superdesk-core
babel==2.13.0
babel==2.13.1
# via flask-babel
bcrypt==3.1.7
# via superdesk-core
Expand All @@ -34,15 +34,15 @@ blinker==1.4
# raven
# sentry-sdk
# superdesk-core
boto3==1.28.68
boto3==1.28.74
# via superdesk-core
botocore==1.31.68
botocore==1.31.74
# via
# boto3
# s3transfer
cachelib==0.9.0
# via flask-caching
cachetools==5.3.1
cachetools==5.3.2
# via flask-oidc-ex
celery[redis]==5.2.7
# via
Expand Down Expand Up @@ -86,7 +86,7 @@ click-repl==0.3.0
# via celery
croniter==0.3.37
# via superdesk-core
cryptography==41.0.4
cryptography==41.0.5
# via
# authlib
# jwcrypto
Expand Down Expand Up @@ -256,6 +256,8 @@ pyhanko-certvalidator==0.22.0
# via
# pyhanko
# xhtml2pdf
pyjwt==2.4.0
# via superdesk-core
pymemcache==4.0.0
# via superdesk-core
pymongo==3.11.4
Expand All @@ -268,7 +270,7 @@ pyparsing==3.1.1
# via
# httplib2
# pyrtf3
pypdf==3.16.4
pypdf==3.17.0
# via xhtml2pdf
pypng==0.20220715.0
# via qrcode
Expand Down Expand Up @@ -316,9 +318,10 @@ redis==4.5.5
# superdesk-core
regex==2020.7.14
# via superdesk-core
reportlab==3.6.6
reportlab==3.6.13
# via
# newsroom-core
# superdesk-core
# svglib
# xhtml2pdf
requests==2.31.0
Expand Down Expand Up @@ -352,9 +355,9 @@ six==1.16.0
# oauth2client
# python-bidi
# python-dateutil
superdesk-core @ git+https://github.com/superdesk/superdesk-core.git@develop
superdesk-core @ git+https://github.com/superdesk/superdesk-core.git@v2.7.0-rc1
# via newsroom-core
superdesk-planning @ git+https://github.com/superdesk/superdesk-planning.git@develop
superdesk-planning @ git+https://github.com/superdesk/superdesk-planning.git@v2.7.0-rc1
# via newsroom-core
svglib==1.5.1
# via xhtml2pdf
Expand Down Expand Up @@ -388,7 +391,7 @@ vine==5.0.0
# amqp
# celery
# kombu
wcwidth==0.2.8
wcwidth==0.2.9
# via prompt-toolkit
webencodings==0.5.1
# via
Expand Down
17 changes: 17 additions & 0 deletions server/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
BLUEPRINTS as DEFAULT_BLUEPRINT,
CORE_APPS as DEFAULT_CORE_APPS,
CELERY_BEAT_SCHEDULE as CELERY_BEAT_SCHEDULE_DEFAULT,
CLIENT_LOCALE_FORMATS,
)

SERVER_PATH = pathlib.Path(__file__).resolve().parent
Expand Down Expand Up @@ -167,3 +168,19 @@
SAML_CLIENTS = [
"eduskunta",
]

CLIENT_LOCALE_FORMATS["fi"] = {
"TIME_FORMAT": "H.mm",
"DATE_FORMAT": "D.M.YYYY",
"DATETIME_FORMAT": "H.mm D.M.YYYY",
"COVERAGE_DATE_FORMAT": "LL",
"COVERAGE_DATE_TIME_FORMAT": "HH.mm d.M.YYYY",
"AGENDA_DATE_FORMAT_SHORT": "d.M",
"AGENDA_DATE_FORMAT_LONG": "d.M.YYYY",

# server formats
"DATE_FORMAT_HEADER": "d.M.yyyy H.mm",
"NOTIFICATION_EMAIL_TIME_FORMAT": "H.mm",
"NOTIFICATION_EMAIL_DATE_FORMAT": "d.M.yyyy",
"NOTIFICATION_EMAIL_DATETIME_FORMAT": "d.M.yyyy klo H.mm",
}

0 comments on commit ad88f02

Please sign in to comment.