Open
Description
Initially created the issue in the flutterfire repo.
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
When sending a notification with both title
and titleLocKey
, the app would prioritise title
over titleLocKey
when displaying the notification. I would expect that if a translation is found, then it should be used. Otherwise (maybe the user hasn't updated the app), then it should default to the title
.
Relevant Code:
I think the relevant code is here. We should be swapping getString and getLocalizedString like so:
public String getPossiblyLocalizedString(Resources resources, String packageName, String key) {
String localized = getLocalizedString(resources, packageName, key);
if (!TextUtils.isEmpty(localized)) {
return localized;
}
return getString(key);
}
Or is it the expected behaviour?