]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Improve hints shown when message.xlf is invalid 28377/head
authorPatrick Nawracay <pnawracay@suse.com>
Tue, 4 Jun 2019 08:30:38 +0000 (10:30 +0200)
committerPatrick Nawracay <pnawracay@suse.com>
Tue, 4 Jun 2019 08:40:35 +0000 (10:40 +0200)
Fixes: http://tracker.ceph.com/issues/40064
Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
src/pybind/mgr/dashboard/run-frontend-unittests.sh

index fa911776b0eda297401a009eb977ad276c05f016..5bd90b768cbc7a80bba1ce3c99efb2a059644968 100755 (executable)
@@ -34,7 +34,7 @@ fi
 
 # I18N
 npm run i18n
-i18n_lint=`grep -En "<source> |<source>$| </source>" src/locale/messages.xlf`
+i18n_lint=`awk '/<source> |<source>$| <\/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"