Fix message centering, fr l10n

This commit is contained in:
ABelliqueux 2024-02-23 12:02:24 +01:00
parent 8374c9370f
commit bac386dd98
3 changed files with 16 additions and 7 deletions

Binary file not shown.

View File

@ -14,18 +14,27 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: pygettext.py 1.5\n"
#: ../main_c.py:96
msgid "No configuration file found, using defaults."
msgstr "Aucun fichier de configuration trouvé, utilisation des valeurs par défaut."
#: ../main_c.py:87
msgid "Found configuration file in {}"
msgstr "Fichier de configuration trouvé dans {}"
#: ../main_c.py:156
msgid "No images yet! Start shooting..."
msgstr "Aucune image! Commencez à tourner..."
#: ../main_c.py:144
msgid "Warning: Some settings are not set to the recommended value!"
msgstr "Attention: certains paramètres ne sont pas optimaux!"
#: ../main_c.py:146
msgid "Camera not found or busy."
msgstr "Caméra introuvable ou occupée."
msgid ""
"\n"
"Camera not found or busy."
msgstr "\nCaméra introuvable ou occupée."
#: ../main_c.py:256
msgid "A previous session was found in {}, resume shooting ?"

View File

@ -26,10 +26,11 @@ import collections
import gettext
# DLSR support
import gphoto2 as gp
from io import BytesIO
from itertools import count
import locale
import os
from PIL import Image, ImageTk, ImageFilter
from PIL import Image, ImageTk, ImageFilter, ImageDraw, ImageFont
import sys
import threading
import time
@ -59,6 +60,7 @@ from send2trash import send2trash
# X Allow opening and exporting without a camera connected
# o Better settings names
# o webcam support (pygame, win and linux only)
# o picam support (picamera2)
# o notify export ending
running_from_folder = os.path.realpath(__file__)
@ -216,14 +218,12 @@ class KISStopmo(tk.Tk):
return options
def generate_splashscreen(self):
from PIL import Image, ImageDraw, ImageFont
from io import BytesIO
splash = Image.new('RGB', (self.screen_w, self.screen_h), (200,200,200))
splash_draw = ImageDraw.Draw(splash)
if self.splash_text is not None:
font = ImageFont.truetype("Tuffy_Bold.ttf", 60)
font_len = font.getlength(self.splash_text)
splash_draw.text((self.screen_w/2 - font_len/2, self.screen_h/2 ), self.splash_text, fill=(255, 255, 255), font=font)
font_len = font.getlength(self.splash_text.split('\n')[0])
splash_draw.multiline_text((self.screen_w/2 - font_len/2, self.screen_h/2 ), self.splash_text, fill=(255, 255, 255), font=font, align='center', spacing=20)
# Use in-memory
splash_bytes = BytesIO()
splash.save(splash_bytes, 'png')