-
Notifications
You must be signed in to change notification settings - Fork 443
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
Localization issues #602
Comments
Thanks for reporting this Hatsuhira! Can you tell us how you're including CareKit in your app? Are you using an Xcode subproject or SPM? |
I use SPM with your first option described in your readme. I add a dependency to the main branch. |
Thanks for the explanation. Allow me to ask a few follow up questions.
Is your app localized to any languages other than English? |
Yes, in German. |
The fact that most of your translations are being picked up leads me to believe that your localizations bundles are being discovered as intended. |
Unfortunately, yes. They are all in. These are my contents for the CareKit Part. Additional information: I have a SwiftUI app and use
|
Thanks for providing your translations! That should help a lot. |
Thank you Erik, I really appreciate your help. Just because I'm curious I switched the |
Hi @Hatsushira! I tried to reproduce the issue you're seeing, but haven't had any luck. On the I wonder if there's something I'm missing here that's causing the underlying issue. Are you still seeing an issue on your end? If so, what was the process you went through to add the German strings to the project? |
Hi @gavirawson-apple thank you for you help Yes, I'm still facing this issue. |
Gotcha, thanks for the info. Was the process you went through somewhat like like the instructions here? |
Yes, I'm sorry, that I'm not very helpful. The weird thing is that when I switch back to the master branch here from this repository it does work. The only change is the repository, my code stays the same. Perhaps it has something to do with my directory structure? |
No worries at all! All the information you've been giving has been super helpful. I'm trying to think how our setups might be different, I'm also testing the localization on Xcode 12.5. I think you're on to something with the directory structure. Mine looks a bit different from yours: I'd recommend starting from scratch and seeing if the issue is still there, is that possible on your end? You can add a German strings file by navigating to and tapping the circled "plus" button below: |
So, I created a complete new Xcode project, with only the standard Base and English as development language, added my files and was able to run the project. I enabled the missing localizable strings in the run options. Then I run the projects and I got all the missing phrases warnings as expected. This is my project overview. The only change after switching from master to main branch with a reference to language is this commit. This is my controller where I create the OCKButtonLogTaskViewController
|
Thanks for all of the info! I believe the source of the issue has something to do with SPM. We're investigating and will let you know when we have a fix. In the meantime, if you'd like, you can embed CareKit in your app rather than using SPM. That will allow you to add a German strings file directly to the framework, which works on my end. |
Thank you for your assistance. |
I have additional information: |
That is very strange, I haven't seen that one before! Perhaps it only happens in the simulator. |
Me, neither. Perhaps my project is somehow messed up. I got my localization now working and can move on. Thanks again for your patience. |
Of course! Glad things are working. It may take some time, but we will solve this SPM+Loc issue on our end! |
How do you get the Localizable.strings file ? |
Is there any tutorial on how to add the localization on CareKit? Thanks! |
Dear all,
I had a break on working with CareKit for a while, so it's possible this issue exists for longer than just now. I'm currently on Xcode 12.5 and on the main branch. I linked the CareKit libraries with the github link to source code and the libraries are linked and working. What happens to me now is that the UI elements of CareKit aren't translated anymore. But this works in an older version of CareKit (approx Dec. 2020) on my parent's iPad.
I switched on the missing phrases option in Xcode and this is on of the error messages I'm getting.
2021-06-14 20:39:04.583255+0200 PHR[7363:110426] [strings] ERROR: Log not found in table Localizable of bundle CFBundle 0x7fb887463bc0 </Users/username/Library/Developer/CoreSimulator/Devices/BD1C21E8-9CC2-4E46-93C0-628CDB6435D0/data/Containers/Bundle/Application/4D7CEFDB-13D8-4992-BD59-768E600BCB3A/PHR.app/CareKit_CareKitUI.bundle> (not loaded)
Log
not found means that it is actually processed by the function, because the phrase is "LOG" but it's not translated. So could you help me with any ideas or is it perhaps related to the following commit #566 ?The text was updated successfully, but these errors were encountered: