From owner-freebsd-gnome@FreeBSD.ORG Wed Nov 3 09:29:49 2004 Return-Path: Delivered-To: freebsd-gnome@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1186C16A4CE for ; Wed, 3 Nov 2004 09:29:49 +0000 (GMT) Received: from smtp1.jazztel.es (smtp1.jazztel.es [62.14.3.161]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9511B43D70 for ; Wed, 3 Nov 2004 09:29:48 +0000 (GMT) (envelope-from josemi@freebsd.jazztel.es) Received: from antivirus by smtp1.jazztel.es with antivirus id 1CPHSu-0002d2-00 for gnome@freebsd.org Wed, 03 Nov 2004 10:30:04 +0100 Received: from [212.106.238.191] (helo=rguez.homeunix.net) by smtp1.jazztel.es with esmtp id 1CPHSu-0002cr-00 for gnome@freebsd.org Wed, 03 Nov 2004 10:30:04 +0100 Received: from redesjm.local (orion.redesjm.local [192.168.254.16]) by rguez.homeunix.net (8.13.1/8.13.1) with ESMTP id iA39Tkgx020275 for ; Wed, 3 Nov 2004 10:29:46 +0100 (CET) (envelope-from freebsd@redesjm.local) Received: from localhost (localhost [[UNIX: localhost]]) by redesjm.local (8.13.1/8.13.1/Submit) id iA39Tkec040386 for gnome@freebsd.org; Wed, 3 Nov 2004 10:29:46 +0100 (CET) (envelope-from freebsd@redesjm.local) From: Jose M Rodriguez Date: Wed, 3 Nov 2004 10:29:46 +0100 User-Agent: KMail/1.7 To: gnome@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200411031029.46565.freebsd@redesjm.local> X-AntiVirus: checked by AntiVir Milter (version: 1.1; AVE: 6.28.0.12; VDF: 6.28.0.50; host: antares.redesjm.local) X-Virus-Scanned: by antivirus Subject: i18n support for mozilla apps X-BeenThere: freebsd-gnome@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GNOME for FreeBSD -- porting and maintaining List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 09:29:49 -0000 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