Page 1 of 1

PHP Translations Not getting Scanned (Resolved)

Posted: 20 May 2025, 22:06
by Cutch25
Whenever I'm running "display dummy translations" I have an entire folder of php files that are not being scanned.
They are all using clienttranslate which should be static analyzed and listed out when im running the dummy translations. clienttranslate works for files in the php folder, just not the data folder.
I've tried moving them out of the constructors, moving the location around, require vs include is there any thing im missing that would cause this?
ex.

Code: Select all

Base path = /var/tournoi/release/games/../../games/dontletitdie
File	Strings found	Notice
16 PHP files to scan:
/gameinfos.inc.php	0	
/states.inc.php	51	
/modules/php/ActInterrupt.php	0	
/modules/php/Actions.php	1	
/modules/php/Character.php	3	
/modules/php/CharacterSelection.php	4	Warning (line 164): potentially invalid translatable string: clienttranslate($message), array_merge(['gameData' => $results], $selectedCharactersArgs));...
/modules/php/Data.php	0	
/modules/php/Decks.php	1	
/modules/php/Encounter.php	7	
/modules/php/GameData.php	1	
/modules/php/Game.php	34	Warning (line 141): potentially invalid translatable string: ->\s*_($str);...
Warning (line 141): potentially invalid translatable string: _($str);...
/modules/php/Hooks.php	0	
/modules/php/ItemTrade.php	2	
/modules/php/SelectionStates.php	0	
/modules/php/Undo.php	0

Code: Select all

The folder structure looks like this
./modules
   ./php
       ./Game.php and other files here
       ./data (nothing in here is scanned, required in the Game.php file, just like the other files from ./php)
         - data php files here
Feel free to take a look at git for the code https://github.com/Cutch/dont-let-it-die

Re: PHP Translations Not getting Scanned

Posted: 21 May 2025, 15:05
by BROT42
have you tried renaming the subfolder to something different than `data`? let me know if it helps!

Re: PHP Translations Not getting Scanned

Posted: 21 May 2025, 15:52
by Cutch25
Yes looks like that was it, data seems to be a reserved name. Its working now