Date: Wed, 3 Nov 2004 10:29:46 +0100 From: Jose M Rodriguez <josemi@freebsd.jazztel.es> To: gnome@freebsd.org Subject: i18n support for mozilla apps Message-ID: <200411031029.46565.freebsd@redesjm.local>
next in thread | raw e-mail | index | archive | help
Hi, First preliminary works to i18n support for mozilla/firefox/thunderbird - mozilla. a version of ${FILESDIR}/mozilla.sh with i18n support - firefox a brand new ${FILESDIR}/firefox.sh with i18n support for use instead of the actual softlink. - thunderbird a script in the way of firefox.sh may be worked out scripts attached. Not directly usable, but easy to test and make part of actual mozilla ports comments on this welcome ----- mozilla.sh #!/bin/sh MOZILLA_DIR="%%PREFIX%%/lib/%%MOZILLA%%" MOZILLA_EXEC="mozilla" LOCATION='new-tab' cd $MOZILLA_DIR || exit 1 # LANG, MOZILLA_UILOCALE, MOZILLA_REGION if [ -n "$LANG" -a ! -n "${MOZILLA_UILOCALE}" ]; then _locale="${LANG%%.*}" if [ "${_locale}" != "en_US" ]; then _region="${_locale##*_}" _locale="${_locale%_*}" [ -r chrome/${_locale}-${_region}.jar ] && \ MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${_locale}-${_region}" fi elif [ -n "${MOZILLA_UILOCALE}" ]; then MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${MOZILLA_UILOCALE}" if [ -n "${MOZILLA_UIREGION}" ]; then MOZILLA_EXEC="${MOZILLA_EXEC} -UIRegion ${MOZILLA_UIREGION}" fi fi [ -n "${MOZILLA_UILOCALE}" ] && \ MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${MOZILLA_UILOCALE}" case $1 in -browser) REMOTE_COMMAND="xfeDoCommand (openBrowser)" ;; -mail) REMOTE_COMMAND="xfeDoCommand (openInbox)" ;; -compose) REMOTE_COMMAND="xfeDoCommand (composeMessage)" ;; -*) exec ./$MOZILLA_EXEC "$@" ;; *) REMOTE_COMMAND="openURL($@, $LOCATION)" ;; esac # process found ./$MOZILLA_EXEC -remote "ping()" && ./$MOZILLA_EXEC -remote "$REMOTE_COMMAND" && exit 0 # no existing process exec ./$MOZILLA_EXEC "$@" ----- mozilla.sh ----- firefox.sh #!/bin/sh FIREFOX_DIR="%%PREFIX%%/lib/firefox" MOZILLA_EXEC="${FIREFOX_DIR}/bin/firefox" CHROME_DIR="${FIREFOX_DIR}/lib/firefox-%%VERSION%%/chrome" if [ "X$1" = "X" ]; then # LANG, MOZILLA_UILOCALE, MOZILLA_REGION if [ -n "$LANG" -a ! -n "${MOZILLA_UILOCALE}" ]; then _locale="${LANG%%.*}" if [ "${_locale}" != "en_US" ]; then _region="${_locale##*_}" _locale="${_locale%_*}" [ -r ${CHROME_DIR}/${_locale}-${_region}.jar ] && \ MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${_locale}-${_region}" fi elif [ -n "${MOZILLA_UILOCALE}" ]; then MOZILLA_EXEC="${MOZILLA_EXEC} -UILocale ${MOZILLA_UILOCALE}" if [ -n "${MOZILLA_UIREGION}" ]; then MOZILLA_EXEC="${MOZILLA_EXEC} -UIRegion ${MOZILLA_UIREGION}" fi fi fi exec ${MOZILLA_EXEC} *@ ----- firefox.sh -- josemi
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411031029.46565.freebsd>