Changeset 1021
- Timestamp:
- 01/05/03 21:13:07 (8 years ago)
- Files:
-
- trunk/doc/README.i18n (modified) (2 diffs)
- trunk/lang/Makefile.am (modified) (1 diff)
- trunk/lang/build.i18n (deleted)
- trunk/lang/i18n-extract (modified) (2 diffs)
- trunk/lang/i18n-format (modified) (2 diffs)
- trunk/lang/i18n-number (modified) (1 diff)
- trunk/lang/i18n-template (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/doc/README.i18n
r1008 r1021 23 23 24 24 If you want to make a new translation, lets assume for Danish (language 25 code: da), you start by copying the build.i18n file from the latest mICQ26 source package to a new file, da.i18n. Add a hash sign in front of every 27 line of this file. Then translate each line, and for each line done, remove28 the leading hash sign. This way, all untranslated lines are commented out, 29 while all translated lines are not. When you've done a significant part of 30 the file, simply mail it to me (i18n@ruediger-kuhlmann.de, ICQ # 82274703). 31 You may want to contact me when you start working on a translation as well. 32 Fromthis on, follow the directions for translation updates.25 code: da), you start by copying the C.i18n file from the latest mICQ source 26 package to a new file, da.i18n. Add a hash sign in front of every line of 27 this file. Then translate each line, and for each line done, remove the 28 leading hash sign. This way, all untranslated lines are commented out, while 29 all translated lines are not. When you've done a significant part of the 30 file, simply mail it to me (i18n@ruediger-kuhlmann.de, ICQ # 82274703). You 31 may want to contact me when you start working on a translation as well. From 32 this on, follow the directions for translation updates. 33 33 34 34 UPDATING A TRANSLATION WITHOUT CVS … … 74 74 75 75 The scripts i18n-extract and i18n-number extract the current set of strings 76 into build.i18n resp. number new strings without a number. They're usually76 into C.i18n resp. number new strings without a number. They're usually 77 77 called by typing "make lang" in the src/ subdirectory after new strings have 78 78 been added. These script create backups. trunk/lang/Makefile.am
r966 r1021 2 2 3 3 langdir = $(datadir)/micq 4 lang_DATA = \4 lang_DATA = C.i18n \ 5 5 de.i18n de_CH.i18n de_fun.i18n en.i18n en_fun.i18n \ 6 6 es.i18n fr.i18n ru.i18n ja_JP.UTF-8.i18n ro.i18n \ trunk/lang/i18n-extract
r764 r1021 2 2 cd "../lang/"; 3 3 4 echo "Extracting translations to build.i18n."5 touch build.i18n6 mv build.i18n build.i18n~4 echo "Extracting translations to C.i18n." 5 touch C.i18n 6 mv C.i18n C.i18n~ 7 7 8 8 bla="\$I" … … 11 11 | sed "s¹i18n¹¶i18n¹g" | tr ¶ "\n" | grep "^i18n ([0-9#]" \ 12 12 | sed 's¹" "¹¹g;s¹i18n *(\([0-9#]*\), *"\(\([^\"]\|\\.\)*\)").*¹\1:\2¹;s¹^\([0-9]\):¹00\1:¹;s¹^\([0-9][0-9]\):¹0\1:¹' \ 13 | sed 's¹\\a¹¹g;s¹\\t¹ ¹g;s¹\\"¹"¹g' | sort -n | uniq ) > build.i18n13 | sed 's¹\\a¹¹g;s¹\\t¹ ¹g;s¹\\"¹"¹g' | sort -n | uniq ) > C.i18n 14 14 15 15 cat ../src/*.c \ 16 16 | sed "s¹i18n¹¶i18n¹g" | tr ¶ "\n" | grep "^i18n ([0-9#]" \ 17 17 | sed 's¹i18n *(\([0-9#]*\),.*¹\1:¹;s¹^\([0-9]\):¹00\1:¹;s¹^\([0-9][0-9]\):¹0\1:¹' \ 18 | sort -n | uniq > build.i18n.num18 | sort -n | uniq > C.i18n.num 19 19 20 cat build.i18n | grep "^[0-9#]*:" | sed 's¹\([0-9#]*:\).*¹\1¹' | sort -n > build.i18n.exnum20 cat C.i18n | grep "^[0-9#]*:" | sed 's¹\([0-9#]*:\).*¹\1¹' | sort -n > C.i18n.exnum 21 21 22 22 echo -n "Strings used in files:" 23 cat build.i18n.num | wc -l23 cat C.i18n.num | wc -l 24 24 echo -n "Strings extracted ok:" 25 cat build.i18n.exnum | wc -l26 diff -u build.i18n.num build.i18n.exnum | uniq25 cat C.i18n.exnum | wc -l 26 diff -u C.i18n.num C.i18n.exnum | uniq 27 27 28 rm build.i18n.num build.i18n.exnum28 rm C.i18n.num C.i18n.exnum 29 29 30 diff -u build.i18n~ build.i18n | tr '' '[' || true30 diff -u C.i18n~ C.i18n | tr '' '[' || true trunk/lang/i18n-format
r888 r1021 1 1 #!/bin/bash 2 2 3 test -f . build.i18n.fmt || test "x$1" = "xbuild.i18n" || ./i18n-format build.i18n3 test -f .C.i18n.fmt || test "x$1" = "xC.i18n" || ./i18n-format C.i18n 4 4 5 5 cat $1 | grep -a % | grep -a "^[0-9]" \ … … 14 14 # | sed "s/:[^%]*\(%[-0-9l]*.\)/.\1:/g;s/:[^%]*$//" | sed "s/:[^%]*\(%[-0-9l]*.\)/.\1:/g;s/:[^%]*$//" \ 15 15 16 test "x$1" = "x build.i18n" && exit 0;16 test "x$1" = "xC.i18n" && exit 0; 17 17 18 ERR=$(diff -u0 . build.i18n.fmt .$1.fmt | grep -v ^@ | sed "s/^.\(....\).*/\1/" | grep "^[0-9]" \18 ERR=$(diff -u0 .C.i18n.fmt .$1.fmt | grep -v ^@ | sed "s/^.\(....\).*/\1/" | grep "^[0-9]" \ 19 19 | sort | uniq -c | grep -v "^ 1" | sed "s/^........//") 20 20 21 for f in :: $ERR; do grep $f .$1.fmt; grep $f . build.i18n.fmt; done21 for f in :: $ERR; do grep $f .$1.fmt; grep $f .C.i18n.fmt; done trunk/lang/i18n-number
r513 r1021 3 3 my %defstr, $k, $uname, $name, $new, $pref; 4 4 5 open NRS, "<../lang/ build.i18n" || die;5 open NRS, "<../lang/C.i18n" || die; 6 6 7 7 { my $neu = 0; trunk/lang/i18n-template
r1007 r1021 16 16 while (<TMPL>) 17 17 { 18 if (m¹^# \$Id: build.i18n,v ([0-9.]* 20../../.. ..:..:..).*¹)18 if (m¹^# \$Id: C.i18n,v ([0-9.]* 20../../.. ..:..:..).*¹) 19 19 { 20 20 $version = $1; … … 121 121 } 122 122 123 ReadTrans (" build");123 ReadTrans ("C"); 124 124 125 125 print "File Comments Junk Old Changed New\n"; 126 126 while ($uname = shift) 127 127 { 128 next unless $uname cmp " build.i18n";128 next unless $uname cmp "C.i18n"; 129 129 130 130 $ver = `grep -a "# *EN:" $uname | sed "s/.*EN://;s/.*,v //;s/ .*//"`; … … 140 140 print "Old version tag: $ver.\n"; 141 141 142 system "cvs -d $cvs rdiff -u -r $ver micq/lang/ build.i18n"142 system "cvs -d $cvs rdiff -u -r $ver micq/lang/C.i18n" 143 143 . " | grep \"^-[0-9]\" | sed \"s,^-,,\" | sort -n -t : -k 1,1 -u -o .$uname.tainted"; 144 144 ReadTainted ("$uname");
