iina / iina

The modern video player for macOS.
https://iina.io
GNU General Public License v3.0
37.88k stars 2.56k forks source link

Utilize SwiftGen for localized string #801

Open skyline75489 opened 7 years ago

skyline75489 commented 7 years ago

System and IINA version:

With the help of SwiftGen we can eliminate hard-coded NSLocalizedString call.

See https://github.com/SwiftGen/SwiftGen#localizablestrings

skyline75489 commented 7 years ago

Hard-coded NSImage calls can also be eliminated.

skyline75489 commented 7 years ago

I just found https://github.com/lhc70000/iina/blob/develop/iina/Utility.swift#L53. This kind of hacky thing is why we need SwiftGen 🐼

saagarjha commented 7 years ago

I agree that we have a lot of hard coded things that we should address, but I'm not sure we need something like SwiftGen. #imageLiteral and enums can go a long way…

skyline75489 commented 7 years ago

SwiftGen just automagically generates enums. Nothing else. So there isn't too much dependency. And it saves time, like, a lot.