Skip to content

Commit 467a412

Browse files
Merge pull request #33 from dataforgoodfr/31-bug-locale-fr_fr-introuvable
31 bug locale fr fr introuvable
2 parents 1bc5340 + 09aca6e commit 467a412

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

dashboards/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ RUN apt-get update
88
RUN mkdir zds
99
WORKDIR zds
1010

11+
RUN apt-get install -y locales
12+
RUN echo "fr_FR.UTF-8 UTF-8" | tee -a /etc/locale.gen && locale-gen fr_FR.UTF-8
13+
1114
COPY app/ ./
1215
RUN pip install -r requirements.txt
1316

dashboards/Dockerfile-dev

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ RUN apt-get update
88
RUN mkdir zds
99
WORKDIR zds
1010

11+
RUN apt-get install -y locales
12+
RUN echo "fr_FR.UTF-8 UTF-8" | tee -a /etc/locale.gen && locale-gen fr_FR.UTF-8
13+
1114
COPY app/requirements.txt .
1215
RUN pip install -r requirements.txt
1316

dashboards/app/pages/data.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
)
3535

3636
# Définir les paramètres linguistiques FR pour l'affichage des nombres
37-
locale.setlocale(locale.LC_NUMERIC, "fr_FR")
37+
locale.setlocale(locale.LC_NUMERIC, "fr_FR.utf8")
3838

3939
# Fonction pour améliorer l'affichage des nombres (milliers, millions, milliards)
4040
def french_format(x: int) -> str:

0 commit comments

Comments
 (0)