When refactoring Kate's CMake scripts, I was looking into why a target got an interface dependency on I18n when linking against KTextEditor and I tracked it down to KTextWidgets. Since there's only one small usage in a single widget that can be forward-declared it seems excessive to add I18n as an interface dependency. This revision forward-declares the usage of KLocalizedString and makes I18n a private dependency. This avoids I18n leaking into dependent libraries.
This will break code implicitly depending on KTextWidget's I18n dependency, as well as code that implicitly depens on KPluralHandlingSpinBox KlocalizedString include. The fix is to explicitly link against I18n and explicitly include KLocalizedString respectively. I'm not sure how breaking changes are handled in KDE Frameworks. If breaking changes are not an option this revision can be closed.