Project

General

Profile

Bug #45428

mgr/dashboard: error when extracting translations

Added by Kiefer Chang 9 months ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
dashboard/i18n
Target version:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature:

Description

The frontend test fails when extracting translations:

npm run i18n:extract                                                                                                                                                                 1 ↵

> ceph-dashboard@0.0.0 i18n:extract /ceph/src/pybind/mgr/dashboard/frontend
> ng xi18n --i18n-format xlf --i18n-locale en-US --output-path locale --progress=false && ngx-extractor -i 'src/**/*.ts' -f xlf -o src/locale/messages.xlf -l en-US

ERROR in Error: Could not mark an element as translatable inside a translatable section (" 
          <a i18n
             routerLink="/monitoring">
            [ERROR ->]<ng-container i18n>Monitoring</ng-container>
            <small *ngIf="prometheusAlertService.alerts."): /ceph/src/pybind/mgr/dashboard/frontend/src/app/core/navigation/navigation/navigation.component.html@159:12
    at AotCompiler.emitMessageBundle (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/@angular/compiler/bundles/compiler.umd.js:25394:23)
    at AngularCompilerProgram._emitRender2 (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/@angular/compiler-cli/src/transformers/program.js:295:44)
    at AngularCompilerProgram.emit (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/@angular/compiler-cli/src/transformers/program.js:211:25)
    at AngularCompilerPlugin._emit (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:1040:49)
    at AngularCompilerPlugin._update (/ceph/src/pybind/mgr/dashboard/frontend/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:805:50)

Found in this test: https://jenkins.ceph.com/job/ceph-pull-requests/51024/console
This can also be reproduced locally, tested with commit 3a0cfdcc4d0c4748d10439417524b7cdcf11b5ec

History

#1 Updated by Tiago Melo 9 months ago

  • Status changed from New to In Progress
  • Assignee set to Tiago Melo

#2 Updated by Tiago Melo 9 months ago

  • Pull request ID set to 34949

#3 Updated by Tiago Melo 9 months ago

  • Status changed from In Progress to Fix Under Review

#4 Updated by Tiago Melo 8 months ago

  • Status changed from Fix Under Review to Resolved
  • Target version set to v16.0.0

Also available in: Atom PDF