php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30597 GETTEXT strings occasionally don't get translated
Submitted: 2004-10-28 13:40 UTC Modified: 2005-01-15 01:00 UTC
Votes:26
Avg. Score:4.8 ± 0.5
Reproduced:26 of 26 (100.0%)
Same Version:1 (3.8%)
Same OS:1 (3.8%)
From: schnaaf at home dot nl Assigned:
Status: No Feedback Package: Gettext related
PHP Version: 4.3.8 OS: FreeBSD 4.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: schnaaf at home dot nl
New email:
PHP Version: OS:

 

 [2004-10-28 13:40 UTC] schnaaf at home dot nl
Description:
------------
'./configure' '--with-apxs=/usr/local/apache/bin/apxs' '--with-mysql=/usr/local' '--with-ttf' '--enable-safe-mode' '--enable-memory-limit' '--enable-track-vars' '--with-gd' '--with-jpeg-dir=/usr/local' '--with-tiff-dir=/usr/local' '--with-png-dir=/usr/local' '--enable-bcmath' '--enable-versioning' '--enable-trans-sid' '--with-zlib' '--with-xml' '--enable-gd-imgstrttf' '--with-mcrypt' '--with-expat=/usr/local' '--enable-calendar' '--enable-ftp' '--enable-calendar' '--with-mhash' '--with-curl=/usr/local/include/curl' '--with-openssl' '--with-xml' '--with-dom=/usr/local' '--enable-wddx' '--with-sablot=/usr/local' '--with-expat=/usr/local' '--enable-xslt' '--with-xslt-sablot' '--with-dom-xslt=/usr/local' '--disable-cgi' '--with-gettext' 

Reproduce code:
---------------
I have an application written in PHP with gettext support in a particular script. Every now and
then the messages in this particular script don't get translated. A refresh of the page will sometimes
help. But after reloading the page about five times the untranslated strings
show up again. There seems to be no clear reason why this happens. Anybody?

Expected result:
----------------
translated strings

Actual result:
--------------
sometimes the string gets translated sometimes it doesn't in the same script

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-11-16 17:26 UTC] tony2001@php.net
Try to upgrade your gettext installation first.
 [2004-11-24 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2005-01-07 14:38 UTC] alain at parkautomat dot net
I updated to the newest gettext and I still have the problem. It only shows on texts with german 'Umlaut's as sources.

All other text fragments are translated, just those with the Umlauts are not translated - most of the time. It looks like it only translates one entry and leaves the others untranslated.
 [2005-01-07 15:03 UTC] tony2001@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try avoid embedding huge scripts into the report.


 [2005-01-07 15:56 UTC] alain at parkautomat dot net
http://parkautomat.net/php4gettextbug.tar.gz

It includes a sample php file and some translated messages. This shows the exact problem here.

Distribution: Debian GNU/Linux
Versions:
gettext        0.14.1
php4           4.3.9
apache         1.3.26.1
 [2005-01-15 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2005-02-23 22:32 UTC] wolfgang dot pichler at ivv dot tuwien dot ac dot at
same phenomenon observed in project www.emilda.org from different people with different versions of apache,php,gettext,linux ....

VERY SPURIOUS

i would think it is some major php design bug :-)
 [2005-11-07 10:31 UTC] c dot affolter at stepping-stone dot ch
Same problem encountered with PHP 5.1.0RC1/Apache 2, gettext 0.13.

As mentioned in the previous comment, it seems to be a PHP issue, since the translation is working correctly via the native gettext command.
 [2011-09-06 12:35 UTC] teemu at 1up dot fi
Just for a notice, you have to restart Apache (or whatever) every single time 
when you do any kind of modifications into the translations file. If you don't, 
gettext will sometimes return your new string but instead it will return more 
often that string, what's passed to it as an argument. So the translation with 
gettext don't work properly if you don't restart your www-daemon.
 
PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Tue Dec 18 18:01:27 2018 UTC