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

Commit 14d7317

Browse files
committed
French translation of the error messages (Fixes #27)
1 parent 76222cd commit 14d7317

1 file changed

Lines changed: 25 additions & 4 deletions

File tree

src/universalJavaApplicationStub

Lines changed: 25 additions & 4 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
#
@@ -321,7 +342,7 @@ elif [ ! -z ${JVMVersion} ] ; then
321342

322343
else
323344
# display error message with applescript
324-
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 ${JVMVersion}\nMake sure you install the required Java version.\" with title \"${CFBundleName}\" buttons {\" OK \"} default button 1 with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)"
345+
osascript -e "tell application \"System Events\" to display dialog \"${MSG_ERROR_LAUNCHING}\n\n${MSG_NO_SUITABLE_JAVA}\" with title \"${CFBundleName}\" buttons {\" OK \"} default button 1 with icon path to resource \"${CFBundleIconFile}\" in bundle (path to me)"
325346
# exit with error
326347
exit 3
327348
fi
@@ -352,7 +373,7 @@ fi
352373
# display error message if MainClassName is empty
353374
if [ -z ${JVMMainClass} ]; then
354375
# display error message with applescript
355-
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)"
376+
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)"
356377
# exit with error
357378
exit 2
358379

@@ -388,9 +409,9 @@ elif [ -f "$JAVACMD" ] && [ -x "$JAVACMD" ] ; then
388409
else
389410

390411
# display error message with applescript
391-
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)" \
412+
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)" \
392413
-e "set response to button returned of the result" \
393-
-e "if response is \"Visit java.com\" then open location \"http://java.com\""
414+
-e "if response is \"${MSG_VISIT_JAVA_DOT_COM}\" then open location \"http://java.com\""
394415

395416
# exit with error
396417
exit 1

0 commit comments

Comments
 (0)