I have an intent definition file for a Siri shortcut. When I click on localize Xcode does very well create a localization file, each string beeing used is present with an ID. But how do I refresh this if I added a new intent in the same file or just added a new possible response to the same file? I currently only found two ways:
So, does anybody know a way to refresh the auto-localization of an intents definition file?
I ran into the same problem lately, and I managed to fix it with a simple workaround and two small, quick and dirty scripts:
.strings
files in your git repository.intendefinition
localizations (and delete them).strings
files, but without your old translations (hopefully, they are safe in git).strings
file run my little script this way: {script-path}/update-modified-strings-file.sh {project-path}/xx.lproj/YourIntents.strings
Please be sure to put both scripts in the same directory:
The first script checks out the old version of the strings with your existing translations, the second merges the new file containing new entries with the old existing translations.
Hope this helps.
I wish Apple would fix with this.
In the meantime, the easiest way of dealing with it that I've found is this...
Add support for a new language in your project. For example, add Australian English. Then you'll get a new .strings file with all the new keys in it with the values from your intents definition.
Paste the contents of that into your existing English version and delete support for that new language.
If you want to get the new keys merged into your existing localised .strings files then you can use this https://github.com/Flinesoft/BartyCrouch Once it's installed you can run bartycrouch update
and it'll sync the changes into all your .strings files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With