Internal: Fix script to transform translation variables in the template folder - refs BT#21777

pull/5628/head
NicoDucou 1 year ago
parent 08feea0ff1
commit 46aaff5ac0
  1. 5
      tests/scripts/switch_files_to_gettext.php

@ -42,8 +42,9 @@ echo count($defined_terms) . " terms were found in language files" . PHP_EOL;
// Now get all terms found in all PHP, TPL, and Twig files of Chamilo (this takes some time and memory)
$usedTerms = [];
$l = strlen(api_get_path(SYS_PATH));
$pathfile = api_get_path(SYS_PATH) . "main/template/default/gamification/my_progress.html.twig";
$files = [$pathfile]; // Process only the specific file for now
$pathfile = api_get_path(SYS_PATH) . "main/template/"; //Path for the missing files, should be adapted for other use
$files = getAllPhpFiles($pathfile);
//$files = [$pathfile]; // Process only the specific file for now
$rootLength = strlen(api_get_path(SYS_PATH));
$countFiles = 0;
$countReplaces = 0;

Loading…
Cancel
Save