![]() |
sponsored links |
|
|
sponsored links
|
|
1
22nd July 04:01
External User
Posts: 1
|
From: pprocacci at datapipe dot com
Operating system: FreeBSD 6.2 PHP version: 5.2.2 PHP Bug Type: *General Issues Bug description: Gettext not translating strings Description: ------------ Translation of strings are not working. A 'truss' of the process shows a `stat` of the locale directory that I want (i.e. /DOCROOT/locale) when calling bindtextdomain, but no further files/directories in that root are ever opened for reading to further process the calls that I am making, hence this bug report. Truss/strace available upon request. Example Locale Dir: ------------------- $ ls -l /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.{mo,po} -rwxrwxrwx 1 user group 5729 May 9 19:51 /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.mo* -rwxrwxrwx 1 user group 110013 May 9 19:51 /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.po* Operating System: ------------------------------ $ uname -a FreeBSD mysite.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Mon Jan 15 03:47:08 UTC 2007 root@jumpstart.teb.yep.net:/usr/obj/usr/src/sys/SMP i386 Installed Extensions: --------------------------------------- $ pkg_info | fgrep php5 php5-5.2.1_3 php5-bz2-5.2.1_3 php5-ctype-5.2.1_3 php5-dom-5.2.1_3 php5-ftp-5.2.1_3 php5-gd-5.2.1_3 php5-gettext-5.2.1_3 php5-iconv-5.2.1_3 php5-mbstring-5.2.1_3 php5-mcrypt-5.2.1_3 php5-mysql-5.2.1_3 php5-openssl-5.2.1_3 php5-pcre-5.2.1_5 php5-pdo-5.2.1_3 php5-pdo_sqlite-5.2.1_3 php5-posix-5.2.1_3 php5-session-5.2.1_3 php5-simplexml-5.2.1_3 php5-spl-5.2.1_3 php5-sqlite-5.2.1_3 php5-tokenizer-5.2.1_3 php5-xml-5.2.1_3 php5-xmlreader-5.2.1_3 php5-xmlwriter-5.2.1_3 php5-zlib-5.2.1_3 Reproduce code: --------------- <?php setlocale(LC_MESSAGES, 'zh_CN.UTF-8'); textdomain("messages"); bindtextdomain("messages", "/DOCROOT/locale"); echo _("Hello"); ?> Expected result: ---------------- Weird non-English Characters. Actual result: -------------- A string that was passed to the function. -- Edit bug report at http://bugs.php.net/?id=41391&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41391&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41391&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41391&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=41391&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=41391&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=41391&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=41391&r=needscript Try newer version: http://bugs.php.net/fix.php?id=41391&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=41391&r=support Expected behavior: http://bugs.php.net/fix.php?id=41391&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=41391&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=41391&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=41391&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41391&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=41391&r=dst IIS Stability: http://bugs.php.net/fix.php?id=41391&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=41391&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=41391&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=41391&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=41391&r=mysqlcfg |
|
|
|
2
22nd July 06:54
External User
Posts: 1
|
ID: 41391
Updated by: mike@php.net Reported By: pprocacci at datapipe dot com -Status: Open +Status: Bogus Bug Type: *General Issues Operating System: FreeBSD 6.2 PHP Version: 5.2.2 New Comment: Be sure to (un) set LANG and LANGUAGE environment variables. Previous Comments: ------------------------------------------------------------------------ [2007-05-15 00:47:43] pprocacci at datapipe dot com Description: ------------ Translation of strings are not working. A 'truss' of the process shows a `stat` of the locale directory that I want (i.e. /DOCROOT/locale) when calling bindtextdomain, but no further files/directories in that root are ever opened for reading to further process the calls that I am making, hence this bug report. Truss/strace available upon request. Example Locale Dir: ------------------- $ ls -l /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.{mo,po} -rwxrwxrwx 1 user group 5729 May 9 19:51 /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.mo* -rwxrwxrwx 1 user group 110013 May 9 19:51 /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.po* Operating System: ------------------------------ $ uname -a FreeBSD mysite.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Mon Jan 15 03:47:08 UTC 2007 root@jumpstart.teb.yep.net:/usr/obj/usr/src/sys/SMP i386 Installed Extensions: --------------------------------------- $ pkg_info | fgrep php5 php5-5.2.1_3 php5-bz2-5.2.1_3 php5-ctype-5.2.1_3 php5-dom-5.2.1_3 php5-ftp-5.2.1_3 php5-gd-5.2.1_3 php5-gettext-5.2.1_3 php5-iconv-5.2.1_3 php5-mbstring-5.2.1_3 php5-mcrypt-5.2.1_3 php5-mysql-5.2.1_3 php5-openssl-5.2.1_3 php5-pcre-5.2.1_5 php5-pdo-5.2.1_3 php5-pdo_sqlite-5.2.1_3 php5-posix-5.2.1_3 php5-session-5.2.1_3 php5-simplexml-5.2.1_3 php5-spl-5.2.1_3 php5-sqlite-5.2.1_3 php5-tokenizer-5.2.1_3 php5-xml-5.2.1_3 php5-xmlreader-5.2.1_3 php5-xmlwriter-5.2.1_3 php5-zlib-5.2.1_3 Reproduce code: --------------- <?php setlocale(LC_MESSAGES, 'zh_CN.UTF-8'); textdomain("messages"); bindtextdomain("messages", "/DOCROOT/locale"); echo _("Hello"); ?> Expected result: ---------------- Weird non-English Characters. Actual result: -------------- A string that was passed to the function. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41391&edit=1 |
|
|
3
22nd July 06:54
External User
Posts: 1
|
ID: 41391
User updated by: pprocacci at datapipe dot com Reported By: pprocacci at datapipe dot com -Status: Bogus +Status: Open Bug Type: *General Issues Operating System: FreeBSD 6.2 PHP Version: 5.2.2 New Comment: nat# echo $LANG LANG: Undefined variable. nat# echo $LANGUAGE LANGUAGE: Undefined variable. They aren't defined. Previous Comments: ------------------------------------------------------------------------ [2007-05-15 11:18:04] mike@php.net Be sure to (un) set LANG and LANGUAGE environment variables. ------------------------------------------------------------------------ [2007-05-15 00:47:43] pprocacci at datapipe dot com Description: ------------ Translation of strings are not working. A 'truss' of the process shows a `stat` of the locale directory that I want (i.e. /DOCROOT/locale) when calling bindtextdomain, but no further files/directories in that root are ever opened for reading to further process the calls that I am making, hence this bug report. Truss/strace available upon request. Example Locale Dir: ------------------- $ ls -l /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.{mo,po} -rwxrwxrwx 1 user group 5729 May 9 19:51 /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.mo* -rwxrwxrwx 1 user group 110013 May 9 19:51 /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.po* Operating System: ------------------------------ $ uname -a FreeBSD mysite.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Mon Jan 15 03:47:08 UTC 2007 root@jumpstart.teb.yep.net:/usr/obj/usr/src/sys/SMP i386 Installed Extensions: --------------------------------------- $ pkg_info | fgrep php5 php5-5.2.1_3 php5-bz2-5.2.1_3 php5-ctype-5.2.1_3 php5-dom-5.2.1_3 php5-ftp-5.2.1_3 php5-gd-5.2.1_3 php5-gettext-5.2.1_3 php5-iconv-5.2.1_3 php5-mbstring-5.2.1_3 php5-mcrypt-5.2.1_3 php5-mysql-5.2.1_3 php5-openssl-5.2.1_3 php5-pcre-5.2.1_5 php5-pdo-5.2.1_3 php5-pdo_sqlite-5.2.1_3 php5-posix-5.2.1_3 php5-session-5.2.1_3 php5-simplexml-5.2.1_3 php5-spl-5.2.1_3 php5-sqlite-5.2.1_3 php5-tokenizer-5.2.1_3 php5-xml-5.2.1_3 php5-xmlreader-5.2.1_3 php5-xmlwriter-5.2.1_3 php5-zlib-5.2.1_3 Reproduce code: --------------- <?php setlocale(LC_MESSAGES, 'zh_CN.UTF-8'); textdomain("messages"); bindtextdomain("messages", "/DOCROOT/locale"); echo _("Hello"); ?> Expected result: ---------------- Weird non-English Characters. Actual result: -------------- A string that was passed to the function. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41391&edit=1 |
|
|
4
22nd July 06:55
External User
Posts: 1
|
ID: 41391
User updated by: pprocacci at datapipe dot com Reported By: pprocacci at datapipe dot com Status: Open Bug Type: *General Issues Operating System: FreeBSD 6.2 PHP Version: 5.2.2 New Comment: Hi, This has been resolved by making the following changes. putenv("LANG=$language"); $locale = setlocale(LC_ALL, ""); //$locale = setlocale(LC_ALL, $language); Would you consider this to be a do***etation bug of some kind? Anyways, thanks for the help. Previous Comments: ------------------------------------------------------------------------ [2007-05-15 14:44:16] pprocacci at datapipe dot com nat# echo $LANG LANG: Undefined variable. nat# echo $LANGUAGE LANGUAGE: Undefined variable. They aren't defined. ------------------------------------------------------------------------ [2007-05-15 11:18:04] mike@php.net Be sure to (un) set LANG and LANGUAGE environment variables. ------------------------------------------------------------------------ [2007-05-15 00:47:43] pprocacci at datapipe dot com Description: ------------ Translation of strings are not working. A 'truss' of the process shows a `stat` of the locale directory that I want (i.e. /DOCROOT/locale) when calling bindtextdomain, but no further files/directories in that root are ever opened for reading to further process the calls that I am making, hence this bug report. Truss/strace available upon request. Example Locale Dir: ------------------- $ ls -l /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.{mo,po} -rwxrwxrwx 1 user group 5729 May 9 19:51 /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.mo* -rwxrwxrwx 1 user group 110013 May 9 19:51 /DOCROOT/locale/zh_CN/LC_MESSAGES/messages.po* Operating System: ------------------------------ $ uname -a FreeBSD mysite.com 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Mon Jan 15 03:47:08 UTC 2007 root@jumpstart.teb.yep.net:/usr/obj/usr/src/sys/SMP i386 Installed Extensions: --------------------------------------- $ pkg_info | fgrep php5 php5-5.2.1_3 php5-bz2-5.2.1_3 php5-ctype-5.2.1_3 php5-dom-5.2.1_3 php5-ftp-5.2.1_3 php5-gd-5.2.1_3 php5-gettext-5.2.1_3 php5-iconv-5.2.1_3 php5-mbstring-5.2.1_3 php5-mcrypt-5.2.1_3 php5-mysql-5.2.1_3 php5-openssl-5.2.1_3 php5-pcre-5.2.1_5 php5-pdo-5.2.1_3 php5-pdo_sqlite-5.2.1_3 php5-posix-5.2.1_3 php5-session-5.2.1_3 php5-simplexml-5.2.1_3 php5-spl-5.2.1_3 php5-sqlite-5.2.1_3 php5-tokenizer-5.2.1_3 php5-xml-5.2.1_3 php5-xmlreader-5.2.1_3 php5-xmlwriter-5.2.1_3 php5-zlib-5.2.1_3 Reproduce code: --------------- <?php setlocale(LC_MESSAGES, 'zh_CN.UTF-8'); textdomain("messages"); bindtextdomain("messages", "/DOCROOT/locale"); echo _("Hello"); ?> Expected result: ---------------- Weird non-English Characters. Actual result: -------------- A string that was passed to the function. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=41391&edit=1 |
|
|