|
1 | 1 | #!/bin/sh |
2 | 2 |
|
3 | 3 | set -e |
| 4 | + |
| 5 | +# Detect system language |
| 6 | +LANGUAGE=$(defaults read -g AppleLocale | cut -d"_" -f1) |
| 7 | + |
| 8 | +# Messages in English |
| 9 | +MSG_INSTALL_EN="Photoshop extension TypeR v1.0.0 will be installed." |
| 10 | +MSG_CLOSE_PHOTOSHOP_EN="Close Photoshop (if it is open)." |
| 11 | +MSG_PRESS_KEY_EN="Press any key to continue" |
| 12 | +MSG_INSTALL_COMPLETE_EN="Installation completed." |
| 13 | +MSG_OPEN_PHOTOSHOP_EN="Open Photoshop and in the menu click the following: [Window] > [Extensions] > [TypeR]" |
| 14 | +MSG_PRESS_ENTER_EN="Press Enter to continue" |
| 15 | +MSG_CREDITS_EN="Thanks a lot to Swirt for TyperTools and SeanR for this fork." |
| 16 | +MSG_DISCORD_EN="ScanR's Discord if you need help: https://discord.com/invite/Pdmfmqk" |
| 17 | + |
| 18 | +# Messages in French |
| 19 | +MSG_INSTALL_FR="L'extension Photoshop TypeR v1.0.0 sera installée." |
| 20 | +MSG_CLOSE_PHOTOSHOP_FR="Fermez Photoshop (s'il est ouvert)." |
| 21 | +MSG_PRESS_KEY_FR="Appuyez sur une touche pour continuer" |
| 22 | +MSG_INSTALL_COMPLETE_FR="Installation terminée." |
| 23 | +MSG_OPEN_PHOTOSHOP_FR="Ouvrez Photoshop et dans le menu cliquez sur : [Fenêtre] > [Extensions] > [TypeR]" |
| 24 | +MSG_PRESS_ENTER_FR="Appuyez sur Entrée pour continuer" |
| 25 | +MSG_CREDITS_FR="Merci beaucoup à Swirt pour TyperTools et SeanR pour ce fork." |
| 26 | +MSG_DISCORD_FR="Discord de ScanR si besoin d'aide : https://discord.com/invite/Pdmfmqk" |
| 27 | + |
| 28 | +# Messages in Spanish |
| 29 | +MSG_INSTALL_ES="La extensión de Photoshop TypeR v1.0.0 será instalada." |
| 30 | +MSG_CLOSE_PHOTOSHOP_ES="Cierra Photoshop (si está abierto)." |
| 31 | +MSG_PRESS_KEY_ES="Presiona cualquier tecla para continuar" |
| 32 | +MSG_INSTALL_COMPLETE_ES="Instalación completada." |
| 33 | +MSG_OPEN_PHOTOSHOP_ES="Abre Photoshop y en el menú haz clic en: [Ventana] > [Extensiones] > [TypeR]" |
| 34 | +MSG_PRESS_ENTER_ES="Presiona Enter para continuar" |
| 35 | +MSG_CREDITS_ES="Muchas gracias a Swirt por TyperTools y a SeanR por este fork." |
| 36 | +MSG_DISCORD_ES="Discord de ScanR si necesitas ayuda: https://discord.com/invite/Pdmfmqk" |
| 37 | + |
| 38 | +# Messages in Portuguese |
| 39 | +MSG_INSTALL_PT="A extensão Photoshop TypeR v1.0.0 será instalada." |
| 40 | +MSG_CLOSE_PHOTOSHOP_PT="Feche o Photoshop (se estiver aberto)." |
| 41 | +MSG_PRESS_KEY_PT="Pressione qualquer tecla para continuar" |
| 42 | +MSG_INSTALL_COMPLETE_PT="Instalação concluída." |
| 43 | +MSG_OPEN_PHOTOSHOP_PT="Abra o Photoshop e no menu clique em: [Janela] > [Extensões] > [TypeR]" |
| 44 | +MSG_PRESS_ENTER_PT="Pressione Enter para continuar" |
| 45 | +MSG_CREDITS_PT="Muito obrigado ao Swirt pelo TyperTools e ao SeanR por este fork." |
| 46 | +MSG_DISCORD_PT="Discord do ScanR se precisar de ajuda: https://discord.com/invite/Pdmfmqk" |
| 47 | + |
| 48 | +# Set messages based on system language |
| 49 | +if [ "$LANGUAGE" = "fr" ]; then |
| 50 | + MSG_INSTALL=$MSG_INSTALL_FR |
| 51 | + MSG_CLOSE_PHOTOSHOP=$MSG_CLOSE_PHOTOSHOP_FR |
| 52 | + MSG_PRESS_KEY=$MSG_PRESS_KEY_FR |
| 53 | + MSG_INSTALL_COMPLETE=$MSG_INSTALL_COMPLETE_FR |
| 54 | + MSG_OPEN_PHOTOSHOP=$MSG_OPEN_PHOTOSHOP_FR |
| 55 | + MSG_PRESS_ENTER=$MSG_PRESS_ENTER_FR |
| 56 | + MSG_CREDITS=$MSG_CREDITS_FR |
| 57 | + MSG_DISCORD=$MSG_DISCORD_FR |
| 58 | +elif [ "$LANGUAGE" = "es" ]; then |
| 59 | + MSG_INSTALL=$MSG_INSTALL_ES |
| 60 | + MSG_CLOSE_PHOTOSHOP=$MSG_CLOSE_PHOTOSHOP_ES |
| 61 | + MSG_PRESS_KEY=$MSG_PRESS_KEY_ES |
| 62 | + MSG_INSTALL_COMPLETE=$MSG_INSTALL_COMPLETE_ES |
| 63 | + MSG_OPEN_PHOTOSHOP=$MSG_OPEN_PHOTOSHOP_ES |
| 64 | + MSG_PRESS_ENTER=$MSG_PRESS_ENTER_ES |
| 65 | + MSG_CREDITS=$MSG_CREDITS_ES |
| 66 | + MSG_DISCORD=$MSG_DISCORD_ES |
| 67 | +elif [ "$LANGUAGE" = "pt" ]; then |
| 68 | + MSG_INSTALL=$MSG_INSTALL_PT |
| 69 | + MSG_CLOSE_PHOTOSHOP=$MSG_CLOSE_PHOTOSHOP_PT |
| 70 | + MSG_PRESS_KEY=$MSG_PRESS_KEY_PT |
| 71 | + MSG_INSTALL_COMPLETE=$MSG_INSTALL_COMPLETE_PT |
| 72 | + MSG_OPEN_PHOTOSHOP=$MSG_OPEN_PHOTOSHOP_PT |
| 73 | + MSG_PRESS_ENTER=$MSG_PRESS_ENTER_PT |
| 74 | + MSG_CREDITS=$MSG_CREDITS_PT |
| 75 | + MSG_DISCORD=$MSG_DISCORD_PT |
| 76 | +else |
| 77 | + MSG_INSTALL=$MSG_INSTALL_EN |
| 78 | + MSG_CLOSE_PHOTOSHOP=$MSG_CLOSE_PHOTOSHOP_EN |
| 79 | + MSG_PRESS_KEY=$MSG_PRESS_KEY_EN |
| 80 | + MSG_INSTALL_COMPLETE=$MSG_INSTALL_COMPLETE_EN |
| 81 | + MSG_OPEN_PHOTOSHOP=$MSG_OPEN_PHOTOSHOP_EN |
| 82 | + MSG_PRESS_ENTER=$MSG_PRESS_ENTER_EN |
| 83 | + MSG_CREDITS=$MSG_CREDITS_EN |
| 84 | + MSG_DISCORD=$MSG_DISCORD_EN |
| 85 | +fi |
| 86 | + |
4 | 87 | cat << EOF |
5 | | -Photoshop extension Typer Tools v1.4.9 will be installed. |
| 88 | +$MSG_INSTALL |
6 | 89 |
|
7 | | -Close Photoshop (if it is open). |
| 90 | +$MSG_CLOSE_PHOTOSHOP |
8 | 91 |
|
9 | 92 | EOF |
10 | | -read -n 1 -p "Press any key to continue" |
| 93 | +read -n 1 -p "$MSG_PRESS_KEY" |
11 | 94 | echo |
12 | 95 |
|
13 | 96 | SRCDIR=$(cd "$(dirname "$0")" && pwd) |
|
47 | 130 |
|
48 | 131 | cat << EOF |
49 | 132 |
|
50 | | -Installation completed. |
51 | | -Open Photoshop and in the menu click the following: [Window] > [Extensions] > [Typer Tools] |
| 133 | +$MSG_INSTALL_COMPLETE |
| 134 | +$MSG_OPEN_PHOTOSHOP |
| 135 | +
|
| 136 | +$MSG_CREDITS |
| 137 | +$MSG_DISCORD |
52 | 138 |
|
53 | 139 | EOF |
54 | | -read -n 1 -p "Press Enter to continue" |
| 140 | +read -n 1 -p "$MSG_PRESS_ENTER" |
55 | 141 | echo |
0 commit comments