[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: l10n-support/ca/scripts
From: Antoni Bella PĂ©rez <antonibella5 () yahoo ! com>
Date: 2014-06-19 20:50:39
Message-ID: E1WxjI7-0001JY-9F () scm ! kde ! org
[Download RAW message or body]
SVN commit 1390902 by bellaperez:
Catalan works (set_kde_copyright.sh)
-- Many changes for set common behavior to all Translation Teams.
'copyright' option: now, keep copyrights in PO files, and keep the credits.
Fix or add this lines (#1 and #2):
# Translation of kate.po to Catalan
# Copyright (C) 1999-2014 This_file_is_part_of_KDE
Fix this line:
"Project-Id-Version: kate\n"
CCMAIL: kde-i18n-doc@kde.org
M +24 -15 set_kde_copyright.sh
--- trunk/l10n-support/ca/scripts/set_kde_copyright.sh #1390901:1390902
@@ -1,6 +1,6 @@
#!/bin/sh
-# change this for your Translation Team
+# change this for your Translation Team (IMPORTANT: Read line #51)
LANGUAGE="Catalan"
TEAM_CODE="ca"
TEAM_EMAIL="kde-i18n-ca@kde.org"
@@ -33,9 +33,8 @@
test $year -gt $NEW_YEAR && export NEW_YEAR="$year"
done
new_copyright
- test $OLD_YEAR -eq $NEW_YEAR && export YEARDEF="$OLD_YEAR"
+ test $OLD_YEAR -ge $NEW_YEAR && export YEARDEF="$OLD_YEAR"
test $OLD_YEAR -lt $NEW_YEAR && export YEARDEF="$OLD_YEAR-$NEW_YEAR"
- test $OLD_YEAR -gt $NEW_YEAR && export YEARDEF="$OLD_YEAR"
echo "$dir/$file_edit: $YEARDEF"
}
@@ -47,16 +46,17 @@
export_new_cyear_2014() {
export OLD_YEAR="$NEW_CYEAR"
export PCA="1"
+ echo $PCA
}
- # new translations (2014 and later)
- test $OLD_YEAR -eq $NEW_CYEAR && export export_new_cyear_2014
- test $OLD_YEAR -gt $NEW_CYEAR && export export_new_cyear_2014
+ # apply new Copyright to new translations (2014 and later)
+ # WARNING: comment out this five lines, ONLY if this is the preference of your \
Translation Team +# test $OLD_YEAR -ge $NEW_CYEAR && export PCA="1"
# new files (processed by name)
- echo $file_edit | grep "^desktop_frameworks_*" 1> /dev/null && \
export_new_cyear_2014
- echo $file_edit | grep "^kde5\-*" 1> /dev/null && export_new_cyear_2014
- echo $file_edit | grep "\.appdata\.po$" 1> /dev/null && export_new_cyear_2014
- echo $file_edit | grep "5\.po$" 1> /dev/null && export_new_cyear_2014
- echo $file_edit | grep "5_qt\.po$" 1> /dev/null && export_new_cyear_2014
+# echo $file_edit | grep "^desktop_frameworks_*" 1> /dev/null && \
export_new_cyear_2014 +# echo $file_edit | grep "^kde5\-*" 1> /dev/null && \
export_new_cyear_2014 +# echo $file_edit | grep "\.appdata\.po$" 1> /dev/null && \
export_new_cyear_2014 +# echo $file_edit | grep "5\.po$" 1> /dev/null && \
export_new_cyear_2014 +# echo $file_edit | grep "5_qt\.po$" 1> /dev/null && \
export_new_cyear_2014 }
mod_file() {
@@ -105,10 +105,17 @@
FILE=$file_edit
CMMD_PERSO=$1
upd_copyright $FILE
- test $PCA -eq 1 && export CMMD_PERSO=2
+ test $PCA -eq 1 && export CMMD_PERSO="2"
if [ $CMMD_PERSO -eq '3' ]; then
- comm_mod "1 s/# Translation of .*.po to.*/# Translation of $FILE_1.po to \
$LANGUAGE/g"
- comm_mod "2 s/# Copyright (C.*/# Copyright (C) $YEARDEF \
This_file_is_part_of_KDE/g" + head -n 1 $file_edit | grep "^#$" 1> /dev/null && \
comm_mod "1d" # erase frist line -- only if it is an comment empty + head -n 2 \
$file_edit | tail -n 1 | grep "^# .ranslatio.*" 1> /dev/null && comm_mod "2d" # erase \
duplication of frist line + head -n 2 $file_edit | tail -n 1 | grep "^# \
.ranslatio.*" 1> /dev/null && comm_mod "2d" # erase triplication of frist line + \
head -n 1 $file_edit | grep "^# .ranslatio.*" 1> /dev/null || comm_mod "1 s/^/# \
Translation of AA to AA&\n/g" # add frist line if it does not exist + comm_mod "1 \
s/# .ranslation of .* to.*/# Translation of $FILE_1.po to $LANGUAGE/g" + head -n \
2 $file_edit | tail -n 1 | grep "^#$" 1> /dev/null && comm_mod "2 s/#$/# \
Copyright&\n#/g" # add copyright year if the second line is a comment empty + \
head -n 2 $file_edit | tail -n 1 | grep "^# .opyrig.*" 1> /dev/null || comm_mod "2 \
s/^/# Copyright&\n/g" # add second line if it does not exist + comm_mod "2 s/# \
.opyrig.*/# Copyright (C) $YEARDEF This_file_is_part_of_KDE/g" + head -n 3 \
$file_edit | tail -n 1 | grep "# .* <.*@.*>, .*\." 1> /dev/null && comm_mod "3 \
s/^/#&\n/g" # add a comment empty if the third line is for a translator head_3
echo "# Translation of $FILE_1.po to $LANGUAGE\n# Copyright (C) $YEARDEF \
This_file_is_part_of_KDE\nProject-Id-Version: $FILE_1\\\n" elif [ $CMMD_PERSO -eq \
'2' ]; then @@ -133,7 +140,7 @@
\n
\t\t<http://techbase.kde.org/Policies/Licensing_Policy/Draft>\n
\n
-\t\t* Since 2014, applied the new copyright and preserve credits.\n
+\t\t* Since 2014, applied the new copyright and preserve credits. (DISABLED: read \
line #51)\n \n
\tcheader : (Caution!) erase all old copyright but preserve credits.\n\n
\t\tUsage: From the File Manager, delete files you do not want to modify,\n
@@ -145,6 +152,8 @@
\n
\tcheck_line_1-2 : help find the headers to fix -- lines #1 and #2. (It is assumed\n
\t\tthat you have already applied 'cheader' and 'copyright', in that order.)\n
+\t\tFrist time only. Now, 'copyright' option solve all checks.\n
+\t\tIf missing, add it for you. :-)\n
\n
Third parameter:\n
\n
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic