Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Special UI for localizing Info.plist #35

Open
Sherlouk opened this issue Oct 15, 2022 · 4 comments
Open

[Feat] Special UI for localizing Info.plist #35

Sherlouk opened this issue Oct 15, 2022 · 4 comments
Assignees
Labels
Feature Request New functionality the app doesn't provide yet Size: Medium Probably less than 1 month of work

Comments

@Sherlouk
Copy link

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

@Jeehut
Copy link
Member

Jeehut commented Oct 15, 2022

@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.

@Jeehut Jeehut added Feature Request New functionality the app doesn't provide yet Size: Medium Probably less than 1 month of work labels Oct 15, 2022
@Jeehut Jeehut changed the title [Feat] Localise Info.plist [Feat] Special UI for localizing Info.plist + exclude from Swift file Oct 15, 2022
@Sherlouk
Copy link
Author

Sherlouk commented Oct 15, 2022

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

@Jeehut
Copy link
Member

Jeehut commented Oct 15, 2022

Alright, makes sense, thank you for the confirmation! Will probably tackle this in steps, excluding from the Swift file first.

@Jeehut Jeehut self-assigned this Oct 15, 2022
@Jeehut
Copy link
Member

Jeehut commented Apr 15, 2023

@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! 🚀

@Jeehut Jeehut changed the title [Feat] Special UI for localizing Info.plist + exclude from Swift file [Feat] Special UI for localizing Info.plist Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request New functionality the app doesn't provide yet Size: Medium Probably less than 1 month of work
Projects
None yet
Development

No branches or pull requests

2 participants