mirror of
https://github.com/anufrievroman/waypaper.git
synced 2024-08-17 04:00:23 +03:00
Compare commits
3 Commits
86578b885d
...
daf36bdab1
Author | SHA1 | Date | |
---|---|---|---|
|
daf36bdab1 | ||
|
c41b2d926f | ||
|
e75a485eec |
@ -10,7 +10,7 @@ from waypaper.changer import change_wallpaper
|
|||||||
from waypaper.common import get_random_file
|
from waypaper.common import get_random_file
|
||||||
from waypaper.config import Config
|
from waypaper.config import Config
|
||||||
from waypaper.options import BACKEND_OPTIONS, FILL_OPTIONS
|
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.
|
# Get application metadata.
|
||||||
about = AboutData()
|
about = AboutData()
|
||||||
@ -28,6 +28,8 @@ elif cf.lang == "pl":
|
|||||||
txt = Polish()
|
txt = Polish()
|
||||||
elif cf.lang == "zh":
|
elif cf.lang == "zh":
|
||||||
txt = Chinese()
|
txt = Chinese()
|
||||||
|
elif cf.lang == "es":
|
||||||
|
txt = Spanish()
|
||||||
else:
|
else:
|
||||||
txt = English()
|
txt = English()
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@ from waypaper.changer import change_wallpaper
|
|||||||
from waypaper.config import Config
|
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.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.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")
|
gi.require_version("Gtk", "3.0")
|
||||||
from gi.repository import Gtk, GdkPixbuf, Gdk, GLib
|
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):
|
class App(Gtk.Window):
|
||||||
"""Main application class that controls GUI"""
|
"""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")
|
super().__init__(title="Waypaper")
|
||||||
self.cf = Config()
|
self.cf = Config()
|
||||||
self.about = AboutData()
|
self.about = AboutData()
|
||||||
|
@ -11,6 +11,7 @@ class English:
|
|||||||
self.msg_arg_rest = "restore last wallpaper"
|
self.msg_arg_rest = "restore last wallpaper"
|
||||||
self.msg_arg_back = "specify which backend to use to set wallpaper"
|
self.msg_arg_back = "specify which backend to use to set wallpaper"
|
||||||
self.msg_arg_rand = "set a random wallpaper"
|
self.msg_arg_rand = "set a random wallpaper"
|
||||||
|
self.msg_arg_list = "list wallpapers in json to standard out"
|
||||||
|
|
||||||
self.msg_path = "Selected image path:"
|
self.msg_path = "Selected image path:"
|
||||||
self.msg_select = "Select"
|
self.msg_select = "Select"
|
||||||
@ -60,6 +61,7 @@ class German:
|
|||||||
self.msg_arg_rest = "stellt das zuletzt verwendete Hintergrundbild wieder her"
|
self.msg_arg_rest = "stellt das zuletzt verwendete Hintergrundbild wieder her"
|
||||||
self.msg_arg_back = "legt das Backend fest, welches zum Setzen des Hintergrundbildes verwendet werden soll"
|
self.msg_arg_back = "legt das Backend fest, welches zum Setzen des Hintergrundbildes verwendet werden soll"
|
||||||
self.msg_arg_rand = "wählt ein zufälliges Hintergrundbild aus"
|
self.msg_arg_rand = "wählt ein zufälliges Hintergrundbild aus"
|
||||||
|
self.msg_arg_list = "list wallpapers in json to standard out"
|
||||||
|
|
||||||
self.msg_path = "Pfad zum ausgewählten Bild:"
|
self.msg_path = "Pfad zum ausgewählten Bild:"
|
||||||
self.msg_select = "Auswählen"
|
self.msg_select = "Auswählen"
|
||||||
@ -109,6 +111,7 @@ class French:
|
|||||||
self.msg_arg_rest = "restaurer le dernier papier peint"
|
self.msg_arg_rest = "restaurer le dernier papier peint"
|
||||||
self.msg_arg_back = "spécifier quel backend utiliser pour définir le papier peint"
|
self.msg_arg_back = "spécifier quel backend utiliser pour définir le papier peint"
|
||||||
self.msg_arg_rand = "définir un papier peint aléatoire"
|
self.msg_arg_rand = "définir un papier peint aléatoire"
|
||||||
|
self.msg_arg_list = "list wallpapers in json to standard out"
|
||||||
|
|
||||||
self.msg_path = "Chemin de l'image sélectionnée :"
|
self.msg_path = "Chemin de l'image sélectionnée :"
|
||||||
self.msg_select = "Sélectionner"
|
self.msg_select = "Sélectionner"
|
||||||
@ -158,6 +161,7 @@ class Polish:
|
|||||||
self.msg_arg_rest = "przywróć ostatnią tapetę"
|
self.msg_arg_rest = "przywróć ostatnią tapetę"
|
||||||
self.msg_arg_back = "określ, który backend użyć do ustawienia tapety"
|
self.msg_arg_back = "określ, który backend użyć do ustawienia tapety"
|
||||||
self.msg_arg_rand = "ustaw losową tapetę"
|
self.msg_arg_rand = "ustaw losową tapetę"
|
||||||
|
self.msg_arg_list = "list wallpapers in json to standard out"
|
||||||
|
|
||||||
self.msg_path = "Wybrana ścieżka obrazu:"
|
self.msg_path = "Wybrana ścieżka obrazu:"
|
||||||
self.msg_select = "Wybierz"
|
self.msg_select = "Wybierz"
|
||||||
@ -207,6 +211,7 @@ class Russian:
|
|||||||
self.msg_arg_rest = "восстановить последние обои"
|
self.msg_arg_rest = "восстановить последние обои"
|
||||||
self.msg_arg_back = "указать бэкенд для установки обоев"
|
self.msg_arg_back = "указать бэкенд для установки обоев"
|
||||||
self.msg_arg_rand = "установить случайные обои"
|
self.msg_arg_rand = "установить случайные обои"
|
||||||
|
self.msg_arg_list = "list wallpapers in json to standard out"
|
||||||
|
|
||||||
self.msg_path = "Выбранный путь к изображению:"
|
self.msg_path = "Выбранный путь к изображению:"
|
||||||
self.msg_select = "Выбрать"
|
self.msg_select = "Выбрать"
|
||||||
@ -256,6 +261,7 @@ class Chinese:
|
|||||||
self.msg_arg_rest = "恢复上个壁纸"
|
self.msg_arg_rest = "恢复上个壁纸"
|
||||||
self.msg_arg_back = "指定使用哪个后端来设置壁纸"
|
self.msg_arg_back = "指定使用哪个后端来设置壁纸"
|
||||||
self.msg_arg_rand = "设置随机壁纸"
|
self.msg_arg_rand = "设置随机壁纸"
|
||||||
|
self.msg_arg_list = "list wallpapers in json to standard out"
|
||||||
|
|
||||||
self.msg_path = "选择的图像路径:"
|
self.msg_path = "选择的图像路径:"
|
||||||
self.msg_select = "选择"
|
self.msg_select = "选择"
|
||||||
@ -294,3 +300,51 @@ class Chinese:
|
|||||||
self.tip_random = "设置随机壁纸"
|
self.tip_random = "设置随机壁纸"
|
||||||
self.tip_exit = "退出应用程序"
|
self.tip_exit = "退出应用程序"
|
||||||
|
|
||||||
|
class Spanish:
|
||||||
|
def __init__(self):
|
||||||
|
self.msg_desc = 'Cambiador de imagen de fondo gráfico para "Wayland" y "X11". Trabaja como una astricción para "feh", "swaybg", "wallutils", "swww" y "hyprpaper".'
|
||||||
|
self.msg_info = "Para mas información, visita:\nhttps://github.com/anufrievroman/waypaper"
|
||||||
|
|
||||||
|
self.msg_arg_help = "imprime la versión del programa"
|
||||||
|
self.msg_arg_fill = "especifica cual es el relleno de la pantalla con la imagen escogida"
|
||||||
|
self.msg_arg_rest = "restaura la ultima imagen de fondo"
|
||||||
|
self.msg_arg_back = "especifica cual es el programa se va a utilizar para cambiar la imagen de fondo"
|
||||||
|
self.msg_arg_rand = "aplica una imagen de fondo aleatoria"
|
||||||
|
self.msg_arg_list = 'imprime un listado de las imágenes de fondo al terminal en formato "JSON"'
|
||||||
|
|
||||||
|
self.msg_path = "Donde esta ubicado la imagen en disco"
|
||||||
|
self.msg_select = "Selecciona"
|
||||||
|
self.msg_refresh = "Actualizar"
|
||||||
|
self.msg_random = "Aleatorio"
|
||||||
|
self.msg_exit = "Salir"
|
||||||
|
self.msg_subfolders = "Enseñar carpetas enlazadas"
|
||||||
|
self.msg_hidden = "Ver archivos ocultos"
|
||||||
|
self.msg_gifs = 'Ver solamente imágenes tipo "GIF"'
|
||||||
|
self.msg_changefolder = "Cambiar carpeta de imágenes"
|
||||||
|
self.msg_choosefolder = "Por favor, selecciona una carpeta"
|
||||||
|
self.msg_caching = "Almacenando en el caché..."
|
||||||
|
self.msg_setwith = "El comando para actualizar la imagen de fondo fue ejecutado por"
|
||||||
|
|
||||||
|
self.msg_help = 'Controles para el teclado para "Waypaper":\n\nhjkl - Navegación (←↓↑→)\n"Enter" (⏎) - Actualizar imagen de fondo a la imagen seleccionada\nf - Cambiar carpeta de images\n'
|
||||||
|
self.msg_help += "g - Ir a la parte de arriba\nG - Ir a la parte de abajo\nR - Cambiar imagen de fondo a una imagen aleatoria\nr - Recrear caché de images\n"
|
||||||
|
self.msg_help += ". - Ver/Omitir archivos ocultos\ns - Ver/Omitir imágenes en carpetas enlazadas\n? - Ayuda\nq - Cerrar aplicación\n\n"
|
||||||
|
self.msg_help += self.msg_info
|
||||||
|
|
||||||
|
self.err_cache = "Error borrando el caché"
|
||||||
|
self.err_backend = "Parece ser que ningún programa para actualizar la imagen de fondo esta instalado en su sistema.\n"
|
||||||
|
self.err_backend += "Por favor instalar uno de los siguientes programas para poder cambiar la imagen de fondo:\n\n"
|
||||||
|
self.err_backend += '- swaybg (para "Wayland")\n- swww (para "Wayland"")\n- hyprpaper (para "Wayland")\n'
|
||||||
|
self.err_backend += '- feh (para "Xorg")\n- wallutils (para "Xorg" y "Wayland")\n\n'
|
||||||
|
self.err_backend += self.msg_info
|
||||||
|
self.err_wall = "Error cambiando imagen de fondo:"
|
||||||
|
self.err_notsup = "El programa para cambiar imagen de fondo no tiene soporte:"
|
||||||
|
self.err_disp = "Error buscando nombre de monitores"
|
||||||
|
|
||||||
|
self.tip_refresh = "Volver a almacenar la carpeta de imágenes"
|
||||||
|
self.tip_fill = "Escoja el tipo de relleno"
|
||||||
|
self.tip_backend = "Escoja el programa para cambiar imagen de fondo"
|
||||||
|
self.tip_sorting = "Escoja métrica de ordenamiento"
|
||||||
|
self.tip_display = "Escoja nombre de pantalla"
|
||||||
|
self.tip_color = "Escoja color de fondo"
|
||||||
|
self.tip_random = "Actualizar imagen de fondo a una imagen aleatoria"
|
||||||
|
self.tip_exit = "Cerrar la aplicación"
|
||||||
|
Loading…
Reference in New Issue
Block a user