WackoWiki: Relang

https://wackowiki.org/doc     Version: 11 (06/01/2022 09:33)

Relang


In *nix systems, use the WHICH command to show the location of the php binary executable. This is the path to use as the first line in your php shell script file.

# which php
/usr/local/bin/php		


cd /yourpathto/repo/community/devel		


php ./relang.php /yourpathto/repo/wacko.en.php wacko.bg.php wacko.da.php wacko.de.php wacko.el.php wacko.es.php wacko.et.php wacko.fr.php wacko.hu.php wacko.it.php wacko.nl.php wacko.pl.php wacko.pt.php wacko.ru.php		

Issues

no var

no var in /home/user/workspace/dev/src/lang/wacko.en.php		

FIXED diff --git a/community/devel/relang.php b/community/devel/relang.php
--- a/community/devel/relang.php
+++ b/community/devel/relang.php
@@ -57,7 +57,7 @@
 	$contents = trim($contents);

 	$parent = 0;
-	if (!preg_match('/\$([\w_]+)\s*=\s*array\s*\(/', $contents, $match))
+	if (!preg_match('/\$([\w_]+)\s*=\s*\[/', $contents, $match))
 	{
 		if (!$defvar) die("no var in $fname\n");
 		$var = $defvar;		

dupe messages
php ./relang.php /home/user/workspace/dev/src/admin/lang/ap.en.php /home/user/workspace/dev/src/admin/lang/ap.bg.php		

dupe messages in /home/user/workspace/dev/src/admin/lang/ap.en.php		

Complains about a dupe set but in another sub array

TODO: