Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Language Refresh Issue
09-12-2017, 03:12 AM,
#1
Language Refresh Issue
The "function_exists" command on line 29 in "Z_poEditLangModule" always returns false and exits so language changes are never updated.

Issuing the command "msgfmt messages.po" from a shell works just fine.

This is in PHP 5.3.3 so the environment is a bit old.
https://www.linkedin.com/in/eclipsepaulbecker
Reply
09-12-2017, 06:00 AM,
#2
RE: Language Refresh Issue
There is a module for PHP to enable the gettext functions for PHP - need to configure PHP to enable it. You can see iff the gettext module is enabled by making a script by pasting the code below into a new file under your web-root and saving as say phpinfo.php

<?php
phpinfo();
?>

then point your browser to it.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
09-12-2017, 06:12 AM,
#3
RE: Language Refresh Issue
(09-12-2017, 03:12 AM)VortecCPI Wrote: The "function_exists" command on line 29 in "Z_poEditLangModule" always returns false and exits so language changes are never updated.

Issuing the command "msgfmt messages.po" from a shell works just fine.

This is in PHP 5.3.3 so the environment is a bit old.

Those scripts to update the translations are old, and haven't been maintained in a very long time. I tried to get them working for someone about 10 years ago but they never worked properly and more than once people lost their work using them.

I would stick to using either poedit (https://poedit.net/) or a simple text editor and the command line functions.

Tim
Reply
09-12-2017, 09:28 PM,
#4
RE: Language Refresh Issue
I do have gettext installed at the CENTOS level as well as at the PHP level and gettext is enabled via PHPINFO.

All works as expected from a shell command line. I started to work on the code but I wanted to wait for some feedback. Now that you agree there is an issue I will get back to work on it as this will be important n our context.

Thank you, Tim and Phil, for adding your thoughts on this. As I have mentioned before I am only a novice PHP guy but I have been developing in BASIC since 1983 and VB6, VBA, VB.net for many decades. I also have done some development with JAVA and JAVAScript and I am very capable with RDBMS and data schemas.

I will give this a go and perhaps you can review and refine my work to be sure it meets your expectations...
https://www.linkedin.com/in/eclipsepaulbecker
Reply
09-13-2017, 12:40 AM,
#5
RE: Language Refresh Issue
UPDATE...

This seems to be some sort of permissions issue specific to CENTOS...
https://www.linkedin.com/in/eclipsepaulbecker
Reply
09-13-2017, 06:46 AM, (This post was last modified: 09-13-2017, 06:47 AM by phil.)
#6
RE: Language Refresh Issue
Could it be that running programs from PHP using exec is disabled - I seem to recall some traps with PHP configuration to add the commands that are allowed somewhere. These script I think use exec to run gettext executables msgfmt and msgmerge to do the work.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
09-13-2017, 07:41 AM,
#7
RE: Language Refresh Issue
I tried all sorts of work-arounds with no luck. For now we will be forced to update the language changes via PUTTY manually.

No big deal as this will not be an ongoing requirement...
https://www.linkedin.com/in/eclipsepaulbecker
Reply
09-13-2017, 08:01 AM,
#8
RE: Language Refresh Issue
I think using poedit is really the most efficient answer for translations anyway. These scripts have had a chequered history actually but handy for the odd change.
Hopefully Irma has lost some of its sting as it moves north your way.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz
Reply
09-14-2017, 06:31 AM,
#9
RE: Language Refresh Issue
Thank you Phil. I greatly appreciate your suggestion but I am okay with using the shell. If we had a bunch of languages POEDIT sounds like a very ice tool.
https://www.linkedin.com/in/eclipsepaulbecker
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)