lbry-desktop/ui
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
..
component Make notification titles translatable 2022-04-07 12:30:07 -04:00
constants Add dynamic player aspect ratio resizing 2022-04-07 11:44:25 -04:00
effects Fix iPad landscape 2022-04-07 11:44:25 -04:00
modal Better non-clickable implementation 2022-04-05 19:44:09 -07:00
page Mobile file page, comments and player improvements for rotated landscape view 2022-04-07 11:44:25 -04:00
redux Add dynamic player aspect ratio resizing 2022-04-07 11:44:25 -04:00
scss Make notification titles translatable 2022-04-07 12:30:07 -04:00
util Add dynamic player aspect ratio resizing 2022-04-07 11:44:25 -04:00
analytics.js Thumbnail improvements 2022-03-21 13:13:25 -04:00
app.js
comments.js Remove custom comments server 2022-02-03 10:24:58 -05:00
i18n.js Add env to auto report new strings in console 2022-01-05 00:26:31 -08:00
index.jsx Consolidate legal/requirements fetch 2022-03-17 10:25:59 -04:00
lbry.js Revert "Log which method caused Failed to fetch" 2022-03-19 07:31:14 +08:00
logWarningConsoleMessage.js
native.js working 2020-12-16 10:52:22 -05:00
reducers.js Support resume-able upload via tus (#186) 2021-11-10 13:16:16 -05:00
rewards.js Change logic for daily reward claiming to weekly 2021-12-23 02:40:58 -05:00
store.js Patch to restore position upon returning to video until more fully fleshed out fix can be introduced (#817) 2022-02-07 12:51:26 -05:00