]> git.lyx.org Git - features.git/commitdiff
change the way i18n status is built for the web site. The data is now in a i18n.inc...
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 6 Sep 2007 10:59:45 +0000 (10:59 +0000)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 6 Sep 2007 10:59:45 +0000 (10:59 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20098 a592a061-630c-0410-9148-cb99ea01b6c8

po/Makefile.in.in
po/postats.sh

index 5792f52ea3ec783a736b89cbe269872bbbeda286..ff14ee3faae6982a8733e87d86bcb9eeb3b5de4a 100644 (file)
@@ -413,7 +413,7 @@ ui_l10n.pot: $(top_srcdir)/lib/ui/*.ui $(top_srcdir)/lib/ui/*.inc
        LC_ALL=C ; export LC_ALL ; \
        python $(srcdir)/lyx_pot.py -b $(top_srcdir) -o $@ -t ui ${top_srcdir}/lib/ui/*.ui ${top_srcdir}/lib/ui/*.inc
 
-i18n.php: $(POFILES) postats.sh
+i18n.inc: $(POFILES) postats.sh
        (cd $(srcdir) ; ./postats.sh $(POFILES)) >$@
 
 external_l10n.pot: $(top_srcdir)/lib/external_templates
index d37817c736d0006461ae4a924189e49d793dd0cf..0fb5d3f2a81ccf5c74d452a7d976006fe39056c8 100755 (executable)
 # and generates a PHP web page.
 #
 # Invocation:
-#    postats.sh po_files > "pathToWebPages"/i18n.php
+#    postats.sh po_files > "pathToWebPages"/i18n.inc
 
-# modifiy this when you change version
-# Note that an empty lyx_branch variable (ie cvs HEAD)
+# modify this when you change version
+# Note that an empty lyx_branch variable (ie svn trunk)
 # will "do the right thing".
-lyx_version=1.5.0svn
+lyx_version=1.6.0svn
 lyx_branch=
 
 
@@ -154,32 +154,6 @@ run_msgfmt () {
 
 # The head of the generated php file.
 dump_head () {
-cat <<EOF
-<?
-       // What's the title of the page?
-       \$title = "LyX i18n";
-       // What's the short name of the page in the navigation bar?
-       \$item="i18n";
-       // Who is the author?
-       \$author="Michael Gerz";
-       // Full name of the file (relative path from LyX home page -- i.e., it should
-       // be "foo.php" or "bar/foo.php")
-       \$file_full="devel/i18n.php";
-
-       include("start.php");
-
-       error_reporting(E_ALL);
-?>
-
-<?
-\$podata = array (
-EOF
-}
-
-
-# The foot of the generated php file.
-dump_tail () {
-
 test "$lyx_branch" = "" && {
        branch_tag="trunk"
 } || {
@@ -187,132 +161,22 @@ test "$lyx_branch" = "" && {
 }
 
 cat <<EOF
-<?
-\$lang = array(
-       'bg' => 'Bulgarian',
-       'ca' => 'Catalan',
-       'cs' => 'Czech',
-       'da' => 'Danish',
-       'de' => 'German',
-       'es' => 'Spanish',
-       'eu' => 'Basque',
-       'fi' => 'Finnish',
-       'fr' => 'French',
-       'gl' => 'Galician',
-       'he' => 'Hebrew',
-       'hu' => 'Hungarian',
-       'it' => 'Italian',
-       'ja' => 'Japanese',
-       'ko' => 'Korean',
-       'nl' => 'Dutch',
-       'nn' => 'Nynorsk',
-       'nb' => 'Norwegian',
-       'pl' => 'Polish',
-       'pt' => 'Portuguese',
-       'ro' => 'Romanian',
-       'ru' => 'Russian',
-       'sk' => 'Slovak',
-       'sl' => 'Slovenian',
-       'sv' => 'Swedish',
-       'tr' => 'Turkish',
-       'wa' => 'Walloon',
-       'zh_CN' => 'Simplified Chinese',
-       'zh_TW' => 'Traditional Chinese'
-);
-
-\$noOfMsg = \$podata[0]['msg_tr'] + \$podata[0]['msg_fu'] + \$podata[0]['msg_nt'];
-
-function cmp (\$a, \$b) {
-       if (\$a['msg_tr'] == \$b['msg_tr']) {
-               return 0;
-       }
-       return (\$a['msg_tr'] > \$b['msg_tr']) ? -1 : 1;
-}
-
-usort (\$podata, "cmp");
-?>
+<?php
+// The current version
+\$lyx_version = "$lyx_version";
+// The branch tag
+\$branch_tag = "$branch_tag";
 
-<p>
-       The following table details the current state of the translations of the
-       LyX GUI for the LyX development branch (currently $lyx_version).
-       Unfortunately, only a few languages are well-supported. The LyX team may,
-       therefore, decide to exclude some of the translations from a formal
-       release in order not to confuse the user with a strongly mixed-language
-       interface.
-</p>
-<p>
-       Explanation:
-</p>
-<ul>
-       <li><i>Translated:</i> The number of translated messages</li>
-       <li><i>Fuzzy:</i> The number of fuzzy messages; these are not considered
-           for LyX output but solely serve as a hint for the translators</li>
-       <li><i>Untranslated:</i> The number of untranslated messages; the
-           default language (i.e., English) will be used in the LyX outputs</li>
-</ul>
-<table class="center" frame="box" rules="all" border="2" cellpadding="5">
-<thead>
-       <tr>
-               <td>Language</td>
-               <td>Translated</td>
-               <td>Fuzzy</td>
-               <td>Untranslated</td>
-               <td>Revision Date</td>
-               <td>Translator</td>
-       </tr>
-</thead>
-<tbody>
-<?
-while (list(\$foo,\$info) = each(\$podata)) {
-       print "<tr>";
-
-       if ( \$info['msg_tr'] > \$noOfMsg * 2 / 3 ) {
-               \$style="style='background:#009900'";
-       } else if ( \$info['msg_tr'] > \$noOfMsg / 2 ) {
-               \$style="style='background:#AAAA00'";
-       } else {
-               \$style="style='background:#AA3333'";
-       }
-       print "<td \$style>" ;
-
-       print "<a href=\"http://www.lyx.org/trac/browser/lyx-devel/$branch_tag/po/" . \$info['langcode'] . ".po?format=raw\">" . \$lang[\$info['langcode']] . "</a></td>";
-
-       print "<td \$style align=\"right\">" . \$info['msg_tr'] . "</td>";
-
-       print "<td \$style align=\"right\">";
-       if (isset(\$info['msg_fu'])) {
-               print \$info['msg_fu'];
-       } else {
-               print "0";
-       }
-       print "</td>";
-
-       print "<td \$style align=\"right\">";
-       if (isset(\$info['msg_nt'])) {
-               print \$info['msg_nt'];
-       } else {
-               print "0";
-       }
-       print "</td>";
+// The data itself
+\$podata = array (
+EOF
+}
 
-       print "<td \$style align=\"center\">" . \$info['date'] . "</td>";
 
-       print "<td \$style>";
-       if (\$info['email'] == "") {
-               print \$info['translator'];
-       } else {
-               print "<a href=\"mailto:" . \$info['email'] . "\">" .
-                       \$info['translator'] . "</a>";
-       }
-       print "</td>";
+# The foot of the generated php file.
+dump_tail () {
 
-       print "</tr>\n";
-}
-?>
-</tbody>
-</table>
-<?
-include("end.php");
+cat <<EOF
 ?>
 EOF
 }
@@ -330,7 +194,6 @@ do
        shift
        if [ $# -eq 0 ]; then
                echo "${output});"
-               echo '?>'
        else
                echo "${output},"
                echo