[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
trans-coord/gnun/server/gnun ChangeLog NEWS gnu...
From: |
Pavel Kharitonov |
Subject: |
trans-coord/gnun/server/gnun ChangeLog NEWS gnu... |
Date: |
Sat, 15 Feb 2014 09:56:58 +0000 |
CVSROOT: /sources/trans-coord
Module name: trans-coord
Changes by: Pavel Kharitonov <ineiev> 14/02/15 09:56:58
Modified files:
gnun/server/gnun: ChangeLog NEWS gnun-diff-po.in gnun-report.in
Log message:
Use valid identifiers as function names.
* gnun-diff-po.in (check-po-file):
* gnun-report.in (get-var, report-file, skip-complete):
(pass-untranslated, pass-complete, report-list):
(report-filtered): Replace `-' with `_' in function names.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/ChangeLog?cvsroot=trans-coord&r1=1.400&r2=1.401
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/NEWS?cvsroot=trans-coord&r1=1.100&r2=1.101
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/gnun-diff-po.in?cvsroot=trans-coord&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/trans-coord/gnun/server/gnun/gnun-report.in?cvsroot=trans-coord&r1=1.4&r2=1.5
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/ChangeLog,v
retrieving revision 1.400
retrieving revision 1.401
diff -u -b -r1.400 -r1.401
--- ChangeLog 24 Jan 2014 05:44:10 -0000 1.400
+++ ChangeLog 15 Feb 2014 09:56:58 -0000 1.401
@@ -1,10 +1,20 @@
-2013-01-24 Pavel Kharitonov <address@hidden>
+2014-02-15 Pavel Kharitonov <address@hidden>
+
+ Use valid identifiers as function names.
+
+ * gnun-diff-po.in (check-po-file):
+ * gnun-report.in (get-var, report-file, skip-complete):
+ (pass-untranslated, pass-complete, report-list):
+ (report-filtered): Replace `-' with `_' in function names.
+ * NEWS: Update.
+
+2014-01-24 Pavel Kharitonov <address@hidden>
* GNUmakefile (merge-empty-lines): Eliminate the `gnun' tags
correctly when the line includes it more than once.
* NEWS: Update.
-2013-01-10 Pavel Kharitonov <address@hidden>
+2014-01-10 Pavel Kharitonov <address@hidden>
Make `split-gnun' work in templates.
@@ -16,7 +26,7 @@
`output-article-html'.
* NEWS: Update.
-2013-01-10 Pavel Kharitonov <address@hidden>
+2014-01-10 Pavel Kharitonov <address@hidden>
* doc/gnun.texi (Concepts): Fix reference to
`Files and Directories'; reword a sentence more precisely.
Index: NEWS
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/NEWS,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -b -r1.100 -r1.101
--- NEWS 24 Jan 2014 05:44:10 -0000 1.100
+++ NEWS 15 Feb 2014 09:56:58 -0000 1.101
@@ -10,6 +10,10 @@
it appeared in a line more than once; this limited
usage of the <span class="gnun-split"></span> feature.
+*** `gnun-diff-po' and `gnun-report' didn't use valid identifiers
+ as function names (worked with bash-4.1, didn't work
+ with bash-3.2).
+
* Changes in GNUnited Nations 0.8 (2013-12-31)
*** `msgattrib --previous' is used when available.
Index: gnun-diff-po.in
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/gnun-diff-po.in,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- gnun-diff-po.in 8 Oct 2013 04:38:25 -0000 1.10
+++ gnun-diff-po.in 15 Feb 2014 09:56:58 -0000 1.11
@@ -1,6 +1,6 @@
#! @BASH@
-# Copyright (C) 2013 Free Software Foundation, Inc.
+# Copyright (C) 2013, 2014 Free Software Foundation, Inc.
# This file is part of GNUnited Nations.
@@ -49,7 +49,7 @@
EOF
}
-function check-po-file () {
+function check_po_file () {
if ! @MSGFMT@ -o /dev/null -c $1; then
echo 1>&2 "Error: File \`$1' contains errors."
exit 1
@@ -102,8 +102,8 @@
;;
esac
-check-po-file $1
-check-po-file $2
+check_po_file $1
+check_po_file $2
title=${title:-$1 vs. $2}
from_file="$1"
Index: gnun-report.in
===================================================================
RCS file: /sources/trans-coord/trans-coord/gnun/server/gnun/gnun-report.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -b -r1.4 -r1.5
--- gnun-report.in 8 Oct 2013 04:38:25 -0000 1.4
+++ gnun-report.in 15 Feb 2014 09:56:58 -0000 1.5
@@ -1,6 +1,6 @@
#! @BASH@
-# Copyright (C) 2013 Free Software Foundation, Inc.
+# Copyright (C) 2013, 2014 Free Software Foundation, Inc.
# This file is part of GNUnited Nations.
@@ -46,14 +46,14 @@
}
# Get a variable from the list of priorities.
-function get-var () {
+function get_var () {
@SED@ \
"$1{ :egin; /[\]$/{s/[\]$//;N;s/\n//;begin;}; s/^[^=]*=[[:space:]]*//;p };
d" server/gnun/priorities.mk
}
# Output HTML table raw with a report about single file.
-function report-file () {
+function report_file () {
html=$1.html
url='<a href="'"$root_url$html"'">'"$html"'</a>'
pot=$(echo $1 | @SED@ 's|\(.*\)/|\1/po/|; \|/po/|!s|^|po/|').pot
@@ -113,19 +113,19 @@
}
# The filter to skip table raws containing complete or absent translations.
-function skip-complete () {
+function skip_complete () {
@SED@ 's|<tr |\n&|g; s|</tr>|&\n|g' \
| @SED@ '/^<tr
class="trans-\(complete\|none\)">/{:egin;N;/<\/tr>/!begin;d}'
}
# The filter for table raws about absent translations.
-function pass-untranslated () {
+function pass_untranslated () {
@SED@ 's|<tr |\n&|g; s|</tr>|&\n|g' \
| @SED@ '/^<tr class="trans-none">/{:egin;N;/<\/tr>/!begin;p};d'
}
# The filter for table raws about complete translations.
-function pass-complete () {
+function pass_complete () {
@SED@ 's|<tr |\n&|g; s|</tr>|&\n|g' \
| @SED@ '/^<tr class="trans-complete">/{:egin;N;/<\/tr>/!begin;p};d'
}
@@ -135,7 +135,7 @@
# $3 is the filter command.
#
# When the resulting table is empty, nothing is output.
-function report-list () {
+function report_list () {
table=$(echo $1 | $3)
if test "x$table" != x; then
echo $2
@@ -151,14 +151,14 @@
}
# Output a set of tables using filter $2 and prefix for header ids $1.
-function report-filtered () {
- report-list "$priority_table" \
+function report_filtered () {
+ report_list "$priority_table" \
'<h4 id="'$1'-priority">Priority Articles</h4>' $2
- report-list "$important_table" \
+ report_list "$important_table" \
'<h4 id="'$1'-important">Important Articles</h4>' $2
- report-list "$to_translate_table" \
+ report_list "$to_translate_table" \
'<h4 id="'$1'-to-translate">Files from Important Directories</h4>' $2
- report-list "$other_table" \
+ report_list "$other_table" \
'<h4 id="'$1'-other">Less Important Files</h4>' $2
}
@@ -289,9 +289,9 @@
# Build lists of files to report against.
-priority_files=`get-var /priority-articles/`
-important_files=`get-var /important-articles/`
-important_directories=`get-var /important-directories/`
+priority_files=`get_var /priority-articles/`
+important_files=`get_var /important-articles/`
+important_directories=`get_var /important-directories/`
other_to_translate=$(
for dir in $important_directories; do
@@ -313,10 +313,10 @@
# Compile a table against every list.
-priority_table=$(for i in $priority_files; do report-file $i; done)
-important_table=$(for i in $important_files; do report-file $i; done)
-to_translate_table=$(for i in $other_to_translate; do report-file $i; done)
-other_table=$(for i in $other_files; do report-file $i; done)
+priority_table=$(for i in $priority_files; do report_file $i; done)
+important_table=$(for i in $important_files; do report_file $i; done)
+to_translate_table=$(for i in $other_to_translate; do report_file $i; done)
+other_table=$(for i in $other_files; do report_file $i; done)
# Output the HTML
@@ -349,15 +349,15 @@
echo '<h3 id="to-work">Existing Translations to Work on</h3>'
-report-filtered to-work skip-complete
+report_filtered to-work skip_complete
echo '<h3 id="untranslated">Untranslated Files</h3>'
-report-filtered untranslated pass-untranslated
+report_filtered untranslated pass_untranslated
echo '<h3 id="complete">Complete Translations</h3>'
-report-filtered 'complete' pass-complete
+report_filtered 'complete' pass_complete
cat <<EOF
</body>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- trans-coord/gnun/server/gnun ChangeLog NEWS gnu...,
Pavel Kharitonov <=