]> git.mxchange.org Git - friendica.git/commitdiff
Fix Transifex
authorPhilipp <admin@philipp.info>
Wed, 28 Apr 2021 20:45:11 +0000 (22:45 +0200)
committerPhilipp <admin@philipp.info>
Wed, 28 Apr 2021 21:34:48 +0000 (23:34 +0200)
- More verbose output
- add "stable" parameter to sort
- add LC_ALL=C parameter

.github/workflows/transifex.yml
bin/run_xgettext.sh

index b56ae395f2f72a281f0f7c1bb754f3b5009cb576..b775b08441a2381a89b87a17c4b3ee2b45e73e3a 100644 (file)
@@ -20,8 +20,9 @@ jobs:
           echo "::group::Check messages.po"
           # Skip first 4 lines in possible diff, because they're header
           # Skip all lines of the git diff starting with "@@" or comments or starting "POT-Creation-Date"
-          if [[ $(git diff -U0 ./view/lang/C/messages.po | awk '!/@@|-"POT-Creation-Date|+"POT-Creation-Date|-#|+#/{print }' | wc -l) > 4 ]]; then
+          if [[ $(git diff -U0 ./view/lang/C/messages.po | awk '!/@@|-"POT-Creation-Date|+"POT-Creation-Date|-#|+#/{print }' | wc -l) -gt 4 ]]; then
             echo "::error file=messages.po::messages.po is out of date"
+            echo "$(git diff ./view/lang/C/messages.po)"
             exit 1
           else
             echo "Nothing to update"
index a2a7408dd1064338f07b736190caf394d0951b97..5392e0e15395758bcbd123f678dd5221060bde9e 100755 (executable)
@@ -61,7 +61,7 @@ KEYWORDS="-k -kt -ktt:1,2"
 echo "Extract strings to $OUTFILE.."
 rm "$OUTFILE"; touch "$OUTFILE"
 
-find_result=$(find "$FINDSTARTDIR" $FINDOPTS -name "*.php" -type f | sort)
+find_result=$(find "$FINDSTARTDIR" $FINDOPTS -name "*.php" -type f | LC_ALL=C sort --stable)
 
 total_files=$(wc -l <<< "${find_result}")