Hi,
I've been using string files to localize incoming remote notifications like this:
"training_new_title" = "New training added";
"training_new_body" = "A new training on %@ has been added";
Following the migration to the new string dicts it looks like this:
"training_new_body" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "A new training on %@ has been added"
}
},
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Een nieuwe training op %@ is toegevoegd"
}
}
}
},
"training_new_title" : {
"extractionState" : "manual",
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "translated",
"value" : "New training added"
}
},
"nl" : {
"stringUnit" : {
"state" : "translated",
"value" : "Nieuwe training toegevoegd"
}
}
}
},
Unfortunately as said before notifications are no longer localized and come in as their normal state: "training_new_title" & "training_new_body" .
I am using Firebase messaging service, they send a APNS, that looks like this:
notification: {
titleLocKey: "training_new_title",
bodyLocKey: "training_new_body",
bodyLocArgs: bodyPayload,
}
Do string dicts require any extra steps apart from the standard that I have implemented?
func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable: Any], fetchCompletionHandler completionHandler: @escaping (UIBackgroundFetchResult) -> Void) {
completionHandler(.newData)
}
Thanks in advance for any insights