From d7f85864131a8ff3a502d0025b5f2562be369041 Mon Sep 17 00:00:00 2001 From: "Michael Kaufmann (d00p)" Date: Fri, 30 Jan 2015 17:54:06 +0100 Subject: [PATCH] allow language-check against a specific language file Signed-off-by: Michael Kaufmann (d00p) --- install/scripts/language-check.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install/scripts/language-check.php b/install/scripts/language-check.php index 71b701c5..bce2798e 100644 --- a/install/scripts/language-check.php +++ b/install/scripts/language-check.php @@ -27,13 +27,16 @@ if(@php_sapi_name() != 'cli' } // Check argument count +/* if (sizeof($argv) != 2) { print_help($argv); exit; } +*/ // Load the contents of the given path $path = $argv[1]; +$_f = isset($argv[2]) ? $argv[2] : null; $files = array(); if ($dh = opendir($path)) { @@ -43,7 +46,9 @@ if ($dh = opendir($path)) { && !is_dir($file) && preg_match('/(.+)\.lng\.php/i', $file) ) { - $files[$file] = str_replace('//', '/', $path . '/' . $file); + if (is_null($_f) || (!is_null($_f) && ($file == $_f || $file == $baseLanguage))) { + $files[$file] = str_replace('//', '/', $path . '/' . $file); + } } }