Loading...
 
Skip to main content

Please separate PHP and Javascript

Status
Open
Subject
Please separate PHP and Javascript
Version
18.x
Category
  • Consistency
  • Feature request
Feature
i18n (Multilingual, l10n, Babelfish)
Resolution status
New
Submitted by
hman
Lastmod by
hman
Rating
(0)
Related-to
Description

While searching for a string that I did not find in Tiki's source code, I came across /lib/wiki-plugins/wikiplugin_registermemberpayment.php. It does contain Javascript! And quite a lot. Almost half of the file is after the statement

Copy to clipboard
$headerlib->add_jq_onready(<<<JS


My request for the devs would be: If you have full-fledged Javascript programs, please separate them off into their own .js files. The reason is that PHP's tokenizer will not parse Javascript behind a <<< statement, which is token T_START_HEREDOC (which is eventually ended in a T_END_HEREDOC), and a call to tr() will be inside a huge block of T_ENCAPSED_AND_WHITESPACE, and not in one T_STRING (with the string to be translated in a T_CONSTANT_ENCAPSED_STRING)...

Thanks from your fellow translator
hman

Files
  1. Tra Extract Raw.js
  2. Tra Dedup.js
  3. Heredoc Extract
  4. Tra Extract Raw.js
  5. Tra Extract Raw.js
  6. Heredoc Extract Deletescript
Importance
5
Easy to solve?
5
Priority
25
Demonstrate Bug on Tiki 19+
Demonstrate Bug (older Tiki versions)
Ticket ID
7731
Created
Wednesday 21 April, 2021 21:08:40 UTC
by hman
LastModif
Saturday 06 July, 2024 10:21:44 UTC


Show PHP error messages