[PATCH] add i18n support to mozilla

Jose M Rodriguez josemi at freebsd.jazztel.es
Thu Nov 11 14:37:28 PST 2004


>Submitter-Id:	current-users
>Originator:	Jose M Rodriguez
>Organization:	Redes JM
>Confidential:	no
>Synopsis:	[PATCH] add i18n support to mozilla
>Severity:	non-critical
>Priority:	low
>Category:	ports
>Class:		change-request
>Release:	FreeBSD 5.3-STABLE i386
>Environment:
System: FreeBSD orion.redesjm.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Thu Nov 11 12:52:44 CET 2004 root at orion.redesjm.local:/usr/obj/usr/src/sys/ORION i386


>Description:
	Add support for LANG, MOZILLA_UILOCALE & MOZILLA_UIREGION to
	${PREFIX}/bin/mozilla
>How-To-Repeat:
>Fix:


--- patch-mozilla begins here ---
--- files/mozilla.sh.orig	Thu Nov 11 23:27:43 2004
+++ files/mozilla.sh	Thu Nov 11 23:32:35 2004
@@ -6,6 +6,22 @@
 
 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
+
 case $1 in
     -browser)
     	REMOTE_COMMAND="xfeDoCommand (openBrowser)"
--- patch-mozilla ends here ---





More information about the freebsd-gnome mailing list