ionic-team / ionic-team/ionic-framework

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

Đang mở
#30,477 6 bình luận 2 reaction 0 người được giao Xem trên GitHub
package: angular type: bug
Ngôn ngữ chính
TypeScript
Star
52.7k
Fork
13.3k
Merge trung bình
1 ngày 15 giờ
Pull request đã merge (30 ngày)
51

Mô tả

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### 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 ``

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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Start with the blank Ionic Angular reproduction, configuring TranslateModule in app.module.ts and home.module.ts and placing the translate directive in home.page.html. Compare behavior between Ionic 8.5.9 and 8.6.0 or later around ion-label; done means the translated label renders once rather than duplicating.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
angular, typescript
Lĩnh vực
frontend, internationalization
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
38/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.