bug: Ionic 8.6.0 and above issues with ion-label and ngx-translate

オープン
#30,477 コメント 6 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
angular, typescript

調査の方向性

空の Ionic Angular 再現環境から始め、app.module.ts と home.module.ts で TranslateModule を設定し、home.page.html に translate ディレクティブを配置します。ion-label 周辺の Ionic 8.5.9 と 8.6.0 以降の動作を比較します。完了条件は、翻訳されたラベルが重複せずに 1 回だけレンダリングされることです。

索引モデルが issue の本文から書いたものです。

説明

package: angular type: bug
Prerequisites
Ionic Framework Version

v8.x

Current Behavior

Using ngx-translate (any version) and the [translate] directiive only with ion-label causes the label to duplicate many times. Changing to any other tag such as ion-text works fine.

Something changed with ionic 8.6.0 as with 8.5.9 there is no issue.

Expected Behavior

Should show the label once.

Steps to Reproduce
  1. use a blank ionic project (ng-modules)
  2. add ngx-translate
  3. add to app.module.ts TranslateModule.forRoot({ defaultLanguage: 'en' })],
  4. add import of TranslateModule to home.module.ts
  5. Add this line to home.page.html <ion-label [translate]="'all.title'"></ion-label>

This is result:

Image
Code Reproduction URL

n/a only need the few lines of code mentioned above

Ionic Info
Ionic:

   Ionic CLI                     : 7.2.1 (/opt/homebrew/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 8.6.1
   @angular-devkit/build-angular : 19.2.15
   @angular-devkit/schematics    : 19.2.15
   @angular/cli                  : 19.2.15
   @ionic/angular-toolkit        : 12.2.0

Capacitor:

   Capacitor CLI      : 7.3.0
   @capacitor/android : not installed
   @capacitor/core    : 7.3.0
   @capacitor/ios     : not installed

Utility:

   cordova-res : 0.15.4
   native-run  : 2.0.1

System:

   NodeJS : v24.2.0 (/opt/homebrew/Cellar/node/24.2.0/bin/node)
   npm    : 11.3.0
   OS     : macOS Unknown
Additional Information

No response

主要言語
TypeScript
スター
52.8k
フォーク
13.3k
平均マージ
3日 1時間
マージ済み PR(30日)
86

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/ionic-framework のほかの issue

ionic-team/ionic-framework の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。