bdaralan / BDUIKnit

A Swift Package Manager packed with SwiftUI custom reusable UI components and extensions.
MIT License
25 stars 1 forks source link

Button Title to use NSLocalizedString instead of String #6

Closed satan87 closed 4 years ago

satan87 commented 4 years ago

Hello,

When using Button

let favoriteItem = BDButtonTrayItem(title: "Favorite Only", systemImage: "star") { item in

The title is not passed as a localizable string.

I did a quick check and it is Display in a Text component, which supports NSLocalizedString.

Nicolas

bdaralan commented 4 years ago

Hi,

Thanks for the feedback. I am still new to all the localize setup, so I guess Text object only turns string literal to localized string.

I will add Text(LocalizedStringKey(title)) in the future update and will also look for other places where I can localized them.

bdaralan commented 4 years ago

Added in 1.1.15 release