Skip to content
This repository was archived by the owner on Feb 4, 2023. It is now read-only.

Commit 3633aa8

Browse files
committed
Merge branch 'master' of https://github.com/ebourg/universalJavaApplicationStub into ebourg-master
# Conflicts solved by tofi86: # src/universalJavaApplicationStub
2 parents 8ac883e + 14d7317 commit 3633aa8

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

src/universalJavaApplicationStub

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,27 @@ else
235235
fi
236236

237237

238+
#
239+
# internationalized messages
240+
#
241+
############################################
242+
243+
LANG=`defaults read -g AppleLocale`
244+
if [[ $LANG == fr* ]] ; then
245+
MSG_ERROR_LAUNCHING="Erreur au lancement de '${CFBundleName}'."
246+
MSG_MISSING_MAINCLASS="'MainClass' n'est pas spécifié.\nL'application Java ne peut pas être lancée."
247+
MSG_NO_SUITABLE_JAVA="La version de Java installée sur votre système ne convient pas.\nCe programme nécessite Java ${JVMVersion}.\nMerci de bien vouloir installer la version de Java requise."
248+
MSG_INSTALL_JAVA="Java doit être installé sur votre système.\nRendez-vous sur java.com et suivez les instructions d'installation..."
249+
MSG_LATER="Plus tard"
250+
MSG_VISIT_JAVA_DOT_COM="Visiter java.com"
251+
else
252+
MSG_ERROR_LAUNCHING="ERROR launching '${CFBundleName}'."
253+
MSG_MISSING_MAINCLASS="'MainClass' isn't specified!\nJava application cannot be started!"
254+
MSG_NO_SUITABLE_JAVA="No suitable Java version found on your system!\nThis program requires Java ${JVMVersion}\nMake sure you install the required Java version."
255+
MSG_INSTALL_JAVA="You need to have JAVA installed on your Mac!\nVisit java.com for installation instructions..."
256+
MSG_LATER="Later"
257+
MSG_VISIT_JAVA_DOT_COM="Visit java.com"
258+
fi
238259

239260

240261
#
@@ -323,9 +344,9 @@ elif [ ! -z ${JVMVersion} ] ; then
323344
# display human readable java version (#28)
324345
java_version_hr=`echo ${JVMVersion} | sed -E 's/[0-9]\.([0-9+*]+)/\1/g' | sed 's/+/ or later/' | sed 's/*/ (latest update)/'`
325346
# display error message with applescript
326-
osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'\n\nNo suitable Java version found on your system!\nThis program requires Java ${java_version_hr}\nMake sure you install the required Java version.\" with title \"${CFBundleName}\" buttons {\" OK \", \"Visit java.com\"} default button \"Visit java.com\" with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)" \
347+
osascript -e "tell application \"System Events\" to display dialog \"${MSG_ERROR_LAUNCHING}\n\n${MSG_NO_SUITABLE_JAVA}\" with title \"${CFBundleName}\" buttons {\" OK \", \"${MSG_VISIT_JAVA_DOT_COM}\"} default button \"${MSG_VISIT_JAVA_DOT_COM}\" with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)" \
327348
-e "set response to button returned of the result" \
328-
-e "if response is \"Visit java.com\" then open location \"http://java.com\""
349+
-e "if response is \"${MSG_VISIT_JAVA_DOT_COM}\" then open location \"http://java.com\""
329350
# exit with error
330351
exit 3
331352
fi
@@ -356,7 +377,7 @@ fi
356377
# display error message if MainClassName is empty
357378
if [ -z ${JVMMainClass} ]; then
358379
# display error message with applescript
359-
osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'!\n\n'MainClass' isn't specified!\nJava application cannot be started!\" with title \"${CFBundleName}\" buttons {\" OK \"} default button 1 with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)"
380+
osascript -e "tell application \"System Events\" to display dialog \"${MSG_ERROR_LAUNCHING}\n\n${MSG_MISSING_MAINCLASS}\" with title \"${CFBundleName}\" buttons {\" OK \"} default button 1 with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)"
360381
# exit with error
361382
exit 2
362383

@@ -392,9 +413,9 @@ elif [ -f "$JAVACMD" ] && [ -x "$JAVACMD" ] ; then
392413
else
393414

394415
# display error message with applescript
395-
osascript -e "tell application \"System Events\" to display dialog \"ERROR launching '${CFBundleName}'!\n\nYou need to have JAVA installed on your Mac!\nVisit java.com for installation instructions...\" with title \"${CFBundleName}\" buttons {\"Later\", \"Visit java.com\"} default button \"Visit java.com\" with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)" \
416+
osascript -e "tell application \"System Events\" to display dialog \"${MSG_ERROR_LAUNCHING}\n\n${MSG_INSTALL_JAVA}\" with title \"${CFBundleName}\" buttons {\"${MSG_LATER}\", \"${MSG_VISIT_JAVA_DOT_COM}\"} default button \"${MSG_VISIT_JAVA_DOT_COM}\" with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)" \
396417
-e "set response to button returned of the result" \
397-
-e "if response is \"Visit java.com\" then open location \"http://java.com\""
418+
-e "if response is \"${MSG_VISIT_JAVA_DOT_COM}\" then open location \"http://java.com\""
398419

399420
# exit with error
400421
exit 1

0 commit comments

Comments
 (0)