lbry-desktop/ui/component/notification
infinite-persistence fc50095b36 Make notification titles translatable
## Issue
Desktop 7022: i18n: Notification title localization lost

## Approach
The current code breaks up the string into an array of strings, so i18n is somewhat impossible.

Since 99%¹ of dynamic notifications come with a `dynamic` property for all the replaceable values, we can actually reconstruct the string however we want.

¹ <sub>_as far as I can find, only `fiat_tip` does not provide the value via `dynamic`, i.e. hardcoded in the string. Boo._</sub>

### Benefits of this approach:
- able to localize the string again
- able to customize the string (e.g. making claim titles italic, fix typos, use more concise strings, etc.)

### Problems with this approach:
- if the api overloads a particular notification type with several strings, then the approach is broken.
    - Ex. For the case of `comment` type, the overload is whether the comment is a normal comment or hyperchat. But I was able to replicate the logic to differentiate them, so all is good.
    - For the case of "livestream reminder in 30 minutes", we would have to inspect the string to differentiate against "is live streaming". I think this reminder is not being used, so I didn't do it yet.
- some work is needed to maintain the code when the server side updates something.  But we are already manually maintaining the i18n strings anyway, so it shouldn't be too much of a burden.
- With the exception of the overload problem, any new notification type will simply pass through as un-localized, so things should continue to work, i.e. no need to update the front-end immediately 🤞
2022-04-07 12:30:07 -04:00
..
helpers Make notification titles translatable 2022-04-07 12:30:07 -04:00
index.js Stickers/emojis fall out / improvements (#220) 2021-11-05 15:31:51 -04:00
view.jsx Make notification titles translatable 2022-04-07 12:30:07 -04:00