tdepim
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

translate 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #!/bin/sh
  2. # Update this path if necessary
  3. KDEL10N=$PWD/../kde-l10n
  4. export LC_ALL=C
  5. export CDPATH=
  6. # Fix up the script
  7. if ! grep -q Language-Team admin/cvs.sh; then
  8. patch admin/cvs.sh < cvs.sh.diff
  9. fi
  10. test -L po || ( rm -f po ; ln -s ../kde-l10n/templates/messages/tdepim po )
  11. # I tried setting podir to get the output directly into kde-l10n but then
  12. # we run old code in cvs.sh; scripty doesn't use that anymore, but the scripts in l10n.
  13. # However those are harder to reduce to tdepim only, so let's keep the old way
  14. # of doing it: with a po subdir, like a 3rd-party app and not like a real kde module.
  15. #export podir="$KDEL10N/templates/messages/tdepim"
  16. if ! test -d "po"; then
  17. echo "po doesn't exist"
  18. exit 1
  19. fi
  20. if test -z "$XGETTEXT"; then
  21. if test -f /usr/bin/kde-xgettext; then
  22. xgettext=kde-xgettext
  23. export XGETTEXT=kde-xgettext
  24. elif test -f /opt/trinity/bin/kde-xgettext; then
  25. xgettext=/opt/trinity/bin/kde-xgettext
  26. export XGETTEXT=$xgettext
  27. else
  28. xgettext=xgettext
  29. fi
  30. else
  31. xgettext="$XGETTEXT"
  32. fi
  33. gettext_version=`$xgettext --version | grep 0.10.35`
  34. if test -z "$gettext_version"; then
  35. echo "No xgettext installed or wrong xgettext version: "`$xgettext --version | head -n1`
  36. exit 1
  37. fi
  38. tdepim="$PWD"
  39. # I assume tdepim is uptodate, but kde-l10n is probably not
  40. cd "$KDEL10N" || exit 1
  41. svn update
  42. cd "$tdepim"
  43. make -f admin/Makefile.common package-messages || exit 1
  44. # ? make -f admin/Makefile.common package-merge || exit 1
  45. cd "$KDEL10N" || exit 1
  46. scripts/merge_all.sh
  47. svn diff
  48. for i in `find -name tdepim`; do
  49. cd $i || exit 1
  50. for t in `svn status 2>&1 | grep '^M' | gawk '{print $2}'`; do
  51. diff=`diff -u -I'^#' -I'^"POT-Creation-Date:' .svn/text-base/$t.svn-base $t`
  52. if test -n "$diff"; then
  53. echo "$t: changed"
  54. else
  55. #echo "$t: no change"
  56. svn revert $t
  57. fi
  58. done
  59. # New files are not added automatically; do those by hand.
  60. # To see what changed in a .pot file: svn di kmail.pot | grep '^[-+][^#]'
  61. cd "$KDEL10N"
  62. done
  63. scripts/check_po_files
  64. echo "Now go to $KDEL10N and commit templates/ and de/"