Skip to content

Commit

Permalink
Merge pull request #33 from dataforgoodfr/31-bug-locale-fr_fr-introuv…
Browse files Browse the repository at this point in the history
…able

31 bug locale fr fr introuvable
  • Loading branch information
KyllianBeguin authored Oct 14, 2024
2 parents 1bc5340 + 09aca6e commit 467a412
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dashboards/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ RUN apt-get update
RUN mkdir zds
WORKDIR zds

RUN apt-get install -y locales
RUN echo "fr_FR.UTF-8 UTF-8" | tee -a /etc/locale.gen && locale-gen fr_FR.UTF-8

COPY app/ ./
RUN pip install -r requirements.txt

Expand Down
3 changes: 3 additions & 0 deletions dashboards/Dockerfile-dev
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ RUN apt-get update
RUN mkdir zds
WORKDIR zds

RUN apt-get install -y locales
RUN echo "fr_FR.UTF-8 UTF-8" | tee -a /etc/locale.gen && locale-gen fr_FR.UTF-8

COPY app/requirements.txt .
RUN pip install -r requirements.txt

Expand Down
2 changes: 1 addition & 1 deletion dashboards/app/pages/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
)

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

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

0 comments on commit 467a412

Please sign in to comment.