summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorAndre Miranda <andreldm@xfce.org>2020-07-07 00:13:27 -0300
committerAndre Miranda <andreldm@xfce.org>2020-07-07 00:13:27 -0300
commit2b9dbea980d4df3b44a4176cc5d3fb58beafca97 (patch)
treee3965f7813af1f07f0ada6b40fb475ed48477ee3 /helpers
parentf57b4a8017874733589f4cb9607c249a03a1fb5b (diff)
downloadxfce4-dev-tools-2b9dbea980d4df3b44a4176cc5d3fb58beafca97.tar.gz
get-translations: Remove last comma
Diffstat (limited to 'helpers')
-rw-r--r--helpers/xfce-get-translations6
1 files changed, 4 insertions, 2 deletions
diff --git a/helpers/xfce-get-translations b/helpers/xfce-get-translations
index 0f2764b..4ea6dfb 100644
--- a/helpers/xfce-get-translations
+++ b/helpers/xfce-get-translations
@@ -28,13 +28,15 @@ printf '%s\n' '- Translation Updates:'
LANGUAGES=$(
for l in $UPDATES; do
- echo "$(grep '^"Language-Team:' po/$l.po | grep -Po '(?<=: ).*' | grep -Po '^(.*)(?= \(http)')"
+ echo -n "$(grep '^"Language-Team:' po/$l.po | grep -Po '(?<=: ).*' | grep -Po '^(.*)(?= \(http)')"
+ echo ","
done
)
SORTED=$(echo "$LANGUAGES" | sort)
+SORTED=${SORTED::-1} # remove last comma
while read line; do
- echo -n "$line, "
+ echo -n "$line "
done <<< "$SORTED" | fold -s -w $LINE_LENGTH - | sed -e "s/^[^ ]/${INDENT}&/g" | sed -e 's/[[:space:]]*$//'
echo ""