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'; } else { $file = _lang_file_switch($source_file, $target_lang); $note = ''; $commit = 'web/www/trunk/langs/' . $file . ''; } $source_file = realpath($source_file); $target_file = realpath($target_file); if (false === strstr($source_file, '/langs/') || false == strstr($target_file, '/langs/')) { die('no sorry'); } $diff = _lang_diff($source_file, $target_file); $s = '« back to langs report'; $s .= sprintf('

Differences between %s source and %s target

', substr($source_file, strpos($source_file, '/langs/')+7), $target_lang); if($constitution) { $s .= '

Please translate constitution first

'; $s .= '

You can find it in svn. '; } $num_of_untranslated_strings = 0; $diff['untranslated_sentences_in_license'] = array(); if($license) { require_once('../en/about/license/license.php'); $license_numbers = array_pop(read_license_from_vcs($target_lang)); $num_of_untranslated_strings = $license_numbers["untran"]; // number of all license sentences $diff['untranslated_sentences_in_license'] = $license_numbers['untranslated_sentences']; // add untranslated license sentences $s .= '

Please translate license into ' . $langs[$target_lang] . ' first

'; $s .= sprintf('

You can find it in git. ', $target_lang); // git doesn't work yet on https } if($constitution || $license) { $s .= 'Please read page on wiki for more information about that.

'; } $s .= '

After translation:

'; foreach (array('missing' => 'missing strings', 'notrans' => 'untranslated strings', 'extra' => 'unused (old) strings', 'dup_str' => 'duplicate strings', 'untranslated_sentences_in_license' => 'untranslated msgid strings in ' . $num_of_untranslated_strings . ' sentences in separate license file (in git)') as $type => $name) { if (count($diff[$type]) > 0) { $s .= sprintf('

%d %s:

', count($diff[$type]), $name); $s .= '
';
        $prefix = (($type == 'untranslated_sentences_in_license') ? 'msgid: ' : ';');
        foreach ($diff[$type] as $l)
            $s .= sprintf("%s%s\n\n", $prefix, htmlspecialchars($l));
        $s .= '
'; } } header('Content-Type: text/html;charset=utf-8'); ?> Differences between %s source and %s target', substr($source_file, strpos($source_file, '/langs/')+7), $target_lang); ?>