RemafoX
RemafoX copied to clipboard
[Feat] Special UI for localizing Info.plist
Problem Statement
Maybe related to #12, but it would be nice to have a visual and easy way to localise the contents of the apps Info.plist file.
These strings should not be included in the Swift enum.
Suggested Solution
A new page in the app which lists the string literals (such as privacy descriptions) that warrant being localised.
You can select each one and alter the translation for each locale!
Additional Considerations
@Sherlouk Thank you for requesting this feature.
Just to make sure I understand you correctly: What you are suggesting is that I give special treatment to the Info.plist file and its Strings files because they are usually not referenced in code? I think this is actually a brilliant idea and you are totally right that it doesn't make sense to include them in the Swift file. I just have to check if it's possible for projects to rename it to something else than Info.plist
(I think it's possible in the build settings), so I might need to provide an option to specify a custom name for it. But the "idea" of an Info.plist file I think remains the same in all projects and it makes sense to give it some extra UI, which could also simplify adding new entries etc.
Haven't thought of this, great to have such a great supporting user base bringing up new ideas! 👍 Please correct me if I got something wrong or missed an aspect.
No I think you've understood the problem perfectly. The Info.plist is a bit of a special case as it's not linked to the project code itself (but does utilise a strings file).
Should mostly just be the case of ignoring these strings from the Swift file, but it would also be nice if there was a special UI for handling these localisations - especially as most of the keys (at least the ones provided by Apple) are well documented.
You can see an example here: https://stackoverflow.com/questions/25736700/how-to-localise-a-string-inside-the-ios-info-plist-file
Alright, makes sense, thank you for the confirmation! Will probably tackle this in steps, excluding from the Swift file first.
@Sherlouk I just wanted to fix the inclusion of contents of a InfoPlist.strings
file into the generated enum. But I couldn't reproduce it. In fact, I found code that checks for the file name and if it exactly matches InfoPlist.strings
, it will skip that file while generating the enum. When I reverted my project to the state of the time you reported the issue, I couldn't find this check in the codebase, so it seems I introduced a fix for it with some update without recognizing that it fixes half of this ticket.
I'll keep this open for the special UI for the Info.plist translation. Renaming the title accordingly.
Thanks again for the feedback! New version 1.5.0
coming out very soon with a couple of fixes and improvements! 🚀