adi1090x / polybar-themes

A huge collection of polybar themes with different styles, colors and variants.
GNU General Public License v3.0
5.59k stars 407 forks source link

[Question] Is it safe to translate these values into several translate in the `powermenu` file? #176

Open gusbemacbe opened 1 year ago

gusbemacbe commented 1 year ago

Hello!

Observe these highlighted lines:

https://github.com/adi1090x/polybar-themes/blob/5f4ea817a6e3778d4c243481a996cd1df07d7206/simple/hack/scripts/powermenu.sh#L14-L18.

I would replace with:

# 🇬🇧 Translations
# 🇵🇹 Traduções
# 🇪🇸 Traducciones
curlang="${LANG:0:2}"

case "$curlang" in
es) # 🇪🇸 Spanish
    lock="Bloquear la pantalla"
    logout="Cerrar la sesión"
    reboot="Reiniciar"
    shutdown="Cerrar"
    suspend="Dormir"
    ;;
pt) # 🇵🇹 Portuguese
    lock="Bloquear o ecrã"
    logout="Encerrar a sessão"
    reboot="Reinicializar"
    shutdown="Encerrar"
    suspend="Dormir"
    ;;
pt_BR) # 🇧🇷 Brazilian Portuguese
    lock="Bloquear a tela"
    logout="Sair da sessão"
    reboot="Reiniciar"
    shutdown="Desligar"
    suspend="Dormir"
    ;;
*)  # 🇬🇧 Assuming default English
    # 🇵🇹 Supondo o inglês como padrão
    # 🇪🇸 Suponiendo el inglés como predeterminado
    lock="Lock the screen"
    logout="Log out"
    reboot="Reboot"
    shutdown="Shut down"
    suspend="Sleep"
    ;;
esac

shutdown=" ${shutdown}" 
reboot=" ${reboot}" 
lock=" ${lock}" 
suspend=" ${suspend}" 
logout=" ${logout}" 

Is it safe?