]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: Fix I18N errors 34823/head
authorVolker Theile <vtheile@suse.com>
Wed, 13 May 2020 06:08:48 +0000 (08:08 +0200)
committerVolker Theile <vtheile@suse.com>
Wed, 13 May 2020 06:08:48 +0000 (08:08 +0200)
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>
(cherry picked from commit 897e6a352d1623a045801fabcd3ddaa34bf0e498)

Conflicts:
src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html
src/pybind/mgr/dashboard/run-frontend-unittests.sh

Removed because that files are not available in Nautilus:
src/pybind/mgr/dashboard/frontend/src/app/shared/services/password-policy.service.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/telemetry/telemetry.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/shared/smart-list/smart-list.component.ts

src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html
src/pybind/mgr/dashboard/run-frontend-unittests.sh

index a61b0581ddee39cb37ef935143a85676a45baa5b..62331bb9112fe105549c8cce1c71282958444b0b 100644 (file)
           <li routerLinkActive="active"
               class="tc_submenuitem tc_submenuitem_monitoring"
               *ngIf="(isAlertmanagerConfigured || isPrometheusConfigured) && permissions.prometheus.read">
-            <a i18n
-               routerLink="/monitoring">
+            <a routerLink="/monitoring">
               <ng-container i18n>Monitoring</ng-container>
               <small *ngIf="prometheusAlertService.alerts.length > 0"
                      class="badge badge-danger">{{ prometheusAlertService.alerts.length }}</small>
index 0186e872d759a46f0b3ff0d3bdce5da1e80aeb54..dd8bac59a60a3b06fb3fc806fb8d1dd09c5c3eff 100755 (executable)
@@ -34,12 +34,17 @@ fi
 
 # I18N
 npm run i18n:extract
-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"
-  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 "The 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
 
 if [ `uname` != "FreeBSD" ]; then