Fix message centering, fr l10n
This commit is contained in:
parent
8374c9370f
commit
bac386dd98
Binary file not shown.
|
@ -14,18 +14,27 @@ msgstr ""
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"Generated-By: pygettext.py 1.5\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
|
#: ../main_c.py:87
|
||||||
msgid "Found configuration file in {}"
|
msgid "Found configuration file in {}"
|
||||||
msgstr "Fichier de configuration trouvé dans {}"
|
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
|
#: ../main_c.py:144
|
||||||
msgid "Warning: Some settings are not set to the recommended value!"
|
msgid "Warning: Some settings are not set to the recommended value!"
|
||||||
msgstr "Attention: certains paramètres ne sont pas optimaux!"
|
msgstr "Attention: certains paramètres ne sont pas optimaux!"
|
||||||
|
|
||||||
#: ../main_c.py:146
|
#: ../main_c.py:146
|
||||||
msgid "Camera not found or busy."
|
msgid ""
|
||||||
msgstr "Caméra introuvable ou occupée."
|
"\n"
|
||||||
|
"Camera not found or busy."
|
||||||
|
msgstr "\nCaméra introuvable ou occupée."
|
||||||
|
|
||||||
#: ../main_c.py:256
|
#: ../main_c.py:256
|
||||||
msgid "A previous session was found in {}, resume shooting ?"
|
msgid "A previous session was found in {}, resume shooting ?"
|
||||||
|
|
10
main_c.py
10
main_c.py
|
@ -26,10 +26,11 @@ import collections
|
||||||
import gettext
|
import gettext
|
||||||
# DLSR support
|
# DLSR support
|
||||||
import gphoto2 as gp
|
import gphoto2 as gp
|
||||||
|
from io import BytesIO
|
||||||
from itertools import count
|
from itertools import count
|
||||||
import locale
|
import locale
|
||||||
import os
|
import os
|
||||||
from PIL import Image, ImageTk, ImageFilter
|
from PIL import Image, ImageTk, ImageFilter, ImageDraw, ImageFont
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import time
|
import time
|
||||||
|
@ -59,6 +60,7 @@ from send2trash import send2trash
|
||||||
# X Allow opening and exporting without a camera connected
|
# X Allow opening and exporting without a camera connected
|
||||||
# o Better settings names
|
# o Better settings names
|
||||||
# o webcam support (pygame, win and linux only)
|
# o webcam support (pygame, win and linux only)
|
||||||
|
# o picam support (picamera2)
|
||||||
# o notify export ending
|
# o notify export ending
|
||||||
|
|
||||||
running_from_folder = os.path.realpath(__file__)
|
running_from_folder = os.path.realpath(__file__)
|
||||||
|
@ -216,14 +218,12 @@ class KISStopmo(tk.Tk):
|
||||||
return options
|
return options
|
||||||
|
|
||||||
def generate_splashscreen(self):
|
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 = Image.new('RGB', (self.screen_w, self.screen_h), (200,200,200))
|
||||||
splash_draw = ImageDraw.Draw(splash)
|
splash_draw = ImageDraw.Draw(splash)
|
||||||
if self.splash_text is not None:
|
if self.splash_text is not None:
|
||||||
font = ImageFont.truetype("Tuffy_Bold.ttf", 60)
|
font = ImageFont.truetype("Tuffy_Bold.ttf", 60)
|
||||||
font_len = font.getlength(self.splash_text)
|
font_len = font.getlength(self.splash_text.split('\n')[0])
|
||||||
splash_draw.text((self.screen_w/2 - font_len/2, self.screen_h/2 ), self.splash_text, fill=(255, 255, 255), font=font)
|
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
|
# Use in-memory
|
||||||
splash_bytes = BytesIO()
|
splash_bytes = BytesIO()
|
||||||
splash.save(splash_bytes, 'png')
|
splash.save(splash_bytes, 'png')
|
||||||
|
|
Loading…
Reference in New Issue