From: Patrick Nawracay Date: Tue, 4 Jun 2019 08:30:38 +0000 (+0200) Subject: mgr/dashboard: Improve hints shown when message.xlf is invalid X-Git-Tag: v15.1.0~2440^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=26f180ded1f8d3a279b5c96991810bf0bcc3af4b;p=ceph.git mgr/dashboard: Improve hints shown when message.xlf is invalid Fixes: http://tracker.ceph.com/issues/40064 Signed-off-by: Patrick Nawracay --- diff --git a/src/pybind/mgr/dashboard/run-frontend-unittests.sh b/src/pybind/mgr/dashboard/run-frontend-unittests.sh index fa911776b0ed..5bd90b768cbc 100755 --- a/src/pybind/mgr/dashboard/run-frontend-unittests.sh +++ b/src/pybind/mgr/dashboard/run-frontend-unittests.sh @@ -34,7 +34,7 @@ fi # I18N npm run i18n -i18n_lint=`grep -En " |$| " src/locale/messages.xlf` +i18n_lint=`awk '/ |$| <\/source>/,/<\/context-group>/ {printf "%-4s ", NR; print}' src/locale/messages.xlf` if [[ ! -z $i18n_lint ]]; then echo -e "The following source translations in 'messages.xlf' need to be \ fixed, please check the I18N suggestions in 'HACKING.rst':\n"