diff options
author | Tiago Melo <tmelo@suse.com> | 2020-05-07 13:44:47 +0200 |
---|---|---|
committer | Tiago Melo <tmelo@suse.com> | 2020-05-07 14:14:56 +0200 |
commit | 897e6a352d1623a045801fabcd3ddaa34bf0e498 (patch) | |
tree | cd821e4dca0be4f7c7e3b8075e03237e8b6abd9d /src/pybind/mgr/dashboard/run-frontend-unittests.sh | |
parent | Merge pull request #34855 from s0nea/wip-dashboard-troubleshooting (diff) | |
download | ceph-897e6a352d1623a045801fabcd3ddaa34bf0e498.tar.xz ceph-897e6a352d1623a045801fabcd3ddaa34bf0e498.zip |
mgr/dashboard: Fix I18N errors
We were just checking if the translation sources were correct and ignore if the
extraction simply failed.
Fixes: https://tracker.ceph.com/issues/45428
Signed-off-by: Tiago Melo <tmelo@suse.com>
Diffstat (limited to 'src/pybind/mgr/dashboard/run-frontend-unittests.sh')
-rwxr-xr-x | src/pybind/mgr/dashboard/run-frontend-unittests.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/pybind/mgr/dashboard/run-frontend-unittests.sh b/src/pybind/mgr/dashboard/run-frontend-unittests.sh index 38c47f8e4d7..c94cd922f54 100755 --- a/src/pybind/mgr/dashboard/run-frontend-unittests.sh +++ b/src/pybind/mgr/dashboard/run-frontend-unittests.sh @@ -37,12 +37,17 @@ fi # I18N npm run i18n:extract -i18n_lint=`awk '/<source> |<source>$| <\/source>/,/<\/context-group>/ {printf "%-4s ", NR; print}' src/locale/messages.xlf` -if [ "$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" - echo "${i18n_lint}" +if [ $? -gt 0 ]; then failed=true + echo -e "\nTranslations extraction has failed." +else + i18n_lint=`awk '/<source> |<source>$| <\/source>/,/<\/context-group>/ {printf "%-4s ", NR; print}' src/locale/messages.xlf` + if [ "$i18n_lint" ]; then + echo -e "\nThe following source translations in 'messages.xlf' need to be \ + fixed, please check the I18N suggestions in 'HACKING.rst':\n" + echo "${i18n_lint}" + failed=true + fi fi # npm resolutions |