Translation helper scripts
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

43 行
1.3KB

  1. #!/bin/bash
  2. #
  3. # Copyright 2007, Donatas Glodenis <dgvirtual@akl.lt>
  4. #
  5. # #
  6. # # This script is free software; you can redistribute it and/or modify
  7. # # it under the terms of the GNU General Public License 2 as published by
  8. # # the Free Software Foundation.
  9. #
  10. # # This script is distributed in the hope that it will be useful,
  11. # # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # # GNU General Public License for more details.
  14. # #
  15. # # You should have received a copy of the GNU General Public License
  16. # # along with this script; if not, write to the Free Software
  17. # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  18. #
  19. # ths-stripfuzzy.sh - makes all fuzzy strings non-fuzzy in a translation project.
  20. if [ $# -ne 2 ]; then
  21. echo "Usage `basename $0` <pofile directory> <templates directory>"
  22. exit 1
  23. fi
  24. pofiles=$1
  25. templates=$2
  26. echo "Completely removing the fuzzy strings from the pofiles..."
  27. for po in `cd $pofiles ; find . -name "*.po"`
  28. do
  29. echo -n $pofiles/$po
  30. msgattrib -o $pofiles/$po --no-fuzzy $pofiles/$po
  31. done
  32. echo "Restoring the previously fuzzy as untranslated strings..."
  33. for po in `cd $pofiles ; find . -name "*.po"`
  34. do
  35. echo -n $pofiles/$po
  36. msgmerge --no-fuzzy-matching --backup=off --update $pofiles/$po $templates/${po}t
  37. done