From b0e15407a664677201a3b9b8251786652b5e147f Mon Sep 17 00:00:00 2001 From: Filip Komar Date: Sat, 8 Mar 2014 21:21:32 +0000 Subject: further preparation of l10n report family w/o 3 exceptions (nav, license, constitution) to gettext system --- langs/missing.php | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'langs/missing.php') diff --git a/langs/missing.php b/langs/missing.php index 3cca031a9..870835337 100644 --- a/langs/missing.php +++ b/langs/missing.php @@ -12,13 +12,23 @@ if (is_null($s)) { die; } -if($s =='en/about/constitution.en.lang') { +if (strrpos($s, '.pot')) { + $gettext = true; + $resource = _extract_resource($s); + $file = _po_file_switch($s, $l); +} else { + $gettext = false; + $resource = _extract_resource($s, '.en.lang'); + $file = _lang_file_switch($s, $l); +} + +if($resource =='constitution') { $constitution = true; } else { $constitution = false; } -if($s =='en/about/license.en.lang') { +if($resource =='license') { $license = true; } else { $license = false; @@ -28,12 +38,12 @@ if ($s == '../_nav/langs/en.lang') { $file = substr(_lang_file_switch($s, $l), 14); $note = ' NOTE: THIS IS TRANSLATION OF NAVIGATION SO LOCATION FOR COMMIT IS DIFFERENT!'; $commit = 'web/www/trunk/_nav/langs/' . $file . ' and for now to the web/nav/langs/' . $file . ' too'; - $iframe = '//www.mageia.org/_nav/langs/en.lang'; + $iframe = '//' . $_SERVER['SERVER_NAME'] .'/_nav/langs/en.lang'; } else { - $file = _lang_file_switch($s, $l); +// $file = _lang_file_switch($s, $l); $note = ''; $commit = 'web/www/trunk/langs/' . $file; - $iframe = '//www.mageia.org/langs/'.$s; + $iframe = '//' . $_SERVER['SERVER_NAME'] .'/langs/'.$s; } $constitution_or_license = ''; -- cgit v1.2.1