Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

find-outdated-translations 735B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. # Find outdated translations for the given file.
  3. # File must have extension ".??.xhtml". All files with the same
  4. # basename and the same extension pattern that are newer than the
  5. # given one, according to git commit date, are returned.
  6. filename=$1
  7. bn=${filename%.??.xhtml}
  8. siblings=`ls ${bn}.??.xhtml`
  9. translations=${siblings/${filename}}
  10. if [ ! -z "$translations" ]; then
  11. outdated="${translations}"
  12. ct=`git log -1 --format="%ct" "$filename"`
  13. updatedfiles=`git log --since=$ct --format="%ct" --name-only "${bn}.??.xhtml" | grep xhtml | sort -u`
  14. if [ ! -z "$updatedfiles" ]; then
  15. for u in ${updatedfiles}; do
  16. outdated=${outdated/*$u}
  17. done
  18. fi
  19. echo $outdated
  20. fi