-
Notifications
You must be signed in to change notification settings - Fork 83
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
Fix: Update tab bar titles on language change #522
Fix: Update tab bar titles on language change #522
Conversation
Thank you for the pull request!The Scribe team will do our best to address your contribution as soon as we can. The following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :) If you're not already a member of our public Matrix community, please consider joining! We'd suggest using Element as your Matrix client, and definitely join the General and iOS rooms once you're in. Also consider joining our bi-weekly Saturday dev syncs. It'd be great to have you! Maintainer checklist
|
override func viewWillDisappear(_ animated: Bool) { | ||
super.viewWillDisappear(animated) | ||
removeObserver(object: NotificationCenter.default) | ||
NotificationCenter.default.removeObserver(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to take a look at this warning here, @victorsaccucci? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the removeObserver(...)
was removed in 023d8e2.
Functionality wise this is definitely going in the right direction, @victorsaccucci 😊 Do you have an idea for why we have to switch to the tab in order to get the tab bar label to be localized though? Ideally we'd change the language and everything would be in the given language. |
023d8e2
to
7a073e1
Compare
I created this viewWillDisappear method inside the SettingsViewController class, and if you check the original source code before my push, it’s not there. So, since it doesn’t make any difference to the app’s functionality, it can be removed. Now I pulled from the original repository into my branch and only added the following code:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a saga :) Thanks much for the initial work here, @victorsaccucci! The solution here was as follows:
- I removed all the cases where we were setting the title on tab switch, which your contribution turned me on to
- I set them all on view load for the installation tab
- The above ultimately works as we have the app set up to always load the installation tab first, as this is needed to assure that when new keyboards are installed, that the user cannot just navigate back to the settings tab which then would not load and update the available keyboards to changes settings for
Really great to have your support on the project!
xcodebuild
andswiftlint --strict
commands as directed in the testing section of the contributing guideDescription
Added logic to dynamically update the "Installation" tab bar item title when the language changes. The solution involved adding the following line to the InstallationViewController:
Observation
I forgot to remove the following code from SettingsViewController, which can be safely removed without any issues:
These were added while I was working on solving the tab bar title issue, and they are no longer needed.