#!/bin/bash

# ======================================================================
# Archivo:       abrir-virtualbox
# Ruta:          /usr/local/bin/
# Autor:         Charlie Martínez® <cmartinez@quirinux.org>
# Licencia:      https://www.gnu.org/licenses/gpl-2.0.txt
# Propósito:     Lanzador que añade información para la persona usuaria
# Distribución:  Quirinux 2.x
# ======================================================================

#
# Copyright (c) 2019-2025 Charlie Martínez, derechos reservados.
# Licencia: https://www.gnu.org/licenses/gpl-2.0.txt
# Usos autorizados y no autorizados de la marca Quirinux:
# Ver https://www.quirinux.org/aviso-legal
#

# ----------------------------------------------------------------------
# Traducciones
# ----------------------------------------------------------------------

function _inicio_es {
notify-send -u normal -i "/usr/share/icons/notify.png" "SUGERENCIAS | VirtualBox" "☛ Tu PC debe ser compatible con VT-x.\n☛ VT-x tiene que estar activado en el BIOS.\n☛ Necesitas una ISO del sistema que vas a instalar."
VirtualBox
}

function _inicio_en {
notify-send -u normal -i "/usr/share/icons/notify.png" "SUGGESTIONS | VirtualBox" "☛ Your PC must be VT-x compatible.\n☛ VT-x must be enabled in the BIOS.\n☛ You need an ISO of the system you are going to install."
VirtualBox
}

function _inicio_gl {
notify-send -u normal -i "/usr/share/icons/notify.png" "SUXERENCIAS | VirtualBox" "☛ O teu PC debe ser compatible con VT-x.\n☛ VT-x debe estar activado no BIOS.\n☛ Precisas unha ISO do sistema que vas instalar."
VirtualBox
}

function _inicio_pt {
notify-send -u normal -i "/usr/share/icons/notify.png" "SUGESTÕES | VirtualBox" "☛ Seu PC deve ser compatível com VT-x.\n☛ VT-x deve estar ativado no BIOS.\n☛ Você precisa de uma ISO do sistema que vai instalar."
VirtualBox
}

function _inicio_fr {
notify-send -u normal -i "/usr/share/icons/notify.png" "SUGGESTIONS | VirtualBox" "☛ Votre PC doit être compatible avec VT-x.\n☛ VT-x doit être activé dans le BIOS.\n☛ Vous avez besoin d'une ISO du système que vous allez installer."
VirtualBox
}

function _inicio_it {
notify-send -u normal -i "/usr/share/icons/notify.png" "SUGGERIMENTI | VirtualBox" "☛ Il tuo PC deve essere compatibile con VT-x.\n☛ VT-x deve essere attivato nel BIOS.\n☛ Hai bisogno di un'ISO del sistema che stai per installare."
VirtualBox
}

function _inicio_de {
notify-send -u normal -i "/usr/share/icons/notify.png" "HINWEISE | VirtualBox" "☛ Ihr PC muss VT-x kompatibel sein.\n☛ VT-x muss im BIOS aktiviert sein.\n☛ Sie benötigen ein ISO des Systems, das Sie installieren möchten."
VirtualBox
}

function _inicio_ru {
notify-send -u normal -i "/usr/share/icons/notify.png" "РЕКОМЕНДАЦИИ | VirtualBox" "☛ Ваш ПК должен поддерживать VT-x.\n☛ VT-x должен быть включён в BIOS.\n☛ Вам нужен ISO-образ системы, которую вы собираетесь установить."
VirtualBox
}

function _inicio_hu {
notify-send -u normal -i "/usr/share/icons/notify.png" "JAVASLATOK | VirtualBox" "☛ A számítógépének támogatnia kell a VT-x-et.\n☛ A VT-x-nek engedélyezve kell lennie a BIOS-ban.\n☛ Szüksége van a telepíteni kívánt rendszer ISO-fájljára."
VirtualBox
}

# ----------------------------------------------------------------------
# Selector de idioma
# ----------------------------------------------------------------------

function _idioma {

IDIOMA=$(echo "$LANG" | cut -d_ -f1)

if [[ $IDIOMA = "es" ]]; then
  _inicio_es
elif [[ $IDIOMA = "en" ]]; then
  _inicio_en
elif [[ $IDIOMA = "gl" ]]; then
  _inicio_gl
elif [[ $IDIOMA = "pt" ]]; then
  _inicio_pt
elif [[ $IDIOMA = "fr" ]]; then
  _inicio_fr
elif [[ $IDIOMA = "it" ]]; then
  _inicio_it
elif [[ $IDIOMA = "de" ]]; then
  _inicio_de
elif [[ $IDIOMA = "ru" ]]; then
  _inicio_ru
elif [[ $IDIOMA = "hu" ]]; then
  _inicio_hu
else
  _inicio_en
fi

}

_idioma
