Skip to content

Commit

Permalink
allow language-check against a specific language file
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Kaufmann (d00p) <[email protected]>
  • Loading branch information
d00p committed Jan 30, 2015
1 parent 83e062c commit d7f8586
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion install/scripts/language-check.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,16 @@
}

// 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)) {
Expand All @@ -43,7 +46,9 @@
&& !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);
}
}
}

Expand Down

0 comments on commit d7f8586

Please sign in to comment.