Propagate spanish translation to main and app.

This commit is contained in:
nikolaizombie1 2024-06-08 07:56:29 -04:00
parent e75a485eec
commit c41b2d926f
2 changed files with 5 additions and 3 deletions

View File

@ -10,7 +10,7 @@ from waypaper.changer import change_wallpaper
from waypaper.common import get_random_file
from waypaper.config import Config
from waypaper.options import BACKEND_OPTIONS, FILL_OPTIONS
from waypaper.translations import Chinese, English, French, German, Polish, Russian
from waypaper.translations import Chinese, English, French, German, Polish, Russian, Spanish
# Get application metadata.
about = AboutData()
@ -28,6 +28,8 @@ elif cf.lang == "pl":
txt = Polish()
elif cf.lang == "zh":
txt = Chinese()
elif cf.lang == "es":
txt = Spanish()
else:
txt = English()

View File

@ -12,7 +12,7 @@ from waypaper.changer import change_wallpaper
from waypaper.config import Config
from waypaper.common import get_image_paths, get_random_file, get_monitor_names_hyprctl, get_monitor_names_swww
from waypaper.options import FILL_OPTIONS, SORT_OPTIONS, SORT_DISPLAYS
from waypaper.translations import Chinese, English, French, German, Polish, Russian
from waypaper.translations import Chinese, English, French, German, Polish, Russian, Spanish
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GdkPixbuf, Gdk, GLib
@ -52,7 +52,7 @@ def cache_image(image_path: str, cache_dir: Path) -> None:
class App(Gtk.Window):
"""Main application class that controls GUI"""
def __init__(self, txt: Chinese|English|French|German|Polish|Russian) -> None:
def __init__(self, txt: Chinese|English|French|German|Polish|Russian|Spanish) -> None:
super().__init__(title="Waypaper")
self.cf = Config()
self.about = AboutData()