PHP Translations Not getting Scanned (Resolved)

Game development with Board Game Arena Studio
Post Reply
Cutch25
Posts: 4
Joined: 08 February 2025, 23:15

PHP Translations Not getting Scanned (Resolved)

Post 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
Last edited by Cutch25 on 21 May 2025, 15:53, edited 1 time in total.
User avatar
BROT42
Posts: 42
Joined: 25 March 2020, 20:18

Re: PHP Translations Not getting Scanned

Post by BROT42 »

have you tried renaming the subfolder to something different than `data`? let me know if it helps!
Cutch25
Posts: 4
Joined: 08 February 2025, 23:15

Re: PHP Translations Not getting Scanned

Post by Cutch25 »

Yes looks like that was it, data seems to be a reserved name. Its working now
Post Reply

Return to “Developers”