lbry-desktop/ui/page
infiinte-persistence 567316cfbe Support for multiple string context + "About" as initial example.
## Issue
4796 - i18n: Allow support for string overloading (multiple contexts)

## Approach
- Minimal code and process change.
- Handle on a case-by-case basis when reported by translators.
- Split the affected key in the string json by appending the context.
- Translators need to be aware of the new format and not translate context itself. Code is added to detect bad translations and will revert to English.

Sample in json:
  "About --[About section in Help Page]--": "About",
  "About --[tab title in Channel Page]--":  "About",

Sample in client code:
  title={__('About --[About section in Help Page]--')}

- "--[ ]--" was chosen as it's unique enough (unlikely for real strings to use it) and hopefully not that distracting in the client code.
- In the key itself, spaces are allowed after the string (i.e. before '--[') for neatness. It will be trimmed by the system.

## First example
"About" is used in 3 places:
   - Channel Page
   - Help Page
   - Footer (in Odysee branch)

For Russian, the word "About" is "O" and is usually not used standalone, but requires something behind it. A translator said so, and seems to be the case in other sites as well.
   "O xxx"
   "O yyy"

## Other languages
For other languages that are not impacted, they can just clone the same translation for each of the split keys, just like in English.

## Possible enhancement in Transifex
I see that Transifex's API includes a `context` entry. It might be possible to move the context-metadata there during the upload, so translators will never see the "--[]--" messiness (it will be shown as "Context: xxx" in the Transifex GUI).

I'm not sure how to test the Transifex side, so I did not investigate further.
2020-10-14 17:44:44 -04:00
..
backup add wallet sync message on wallet page 2020-02-21 13:42:17 -05:00
buy copy changes 2020-09-29 17:12:32 -04:00
channel Support for multiple string context + "About" as initial example. 2020-10-14 17:44:44 -04:00
channelNew create YrblWalletEmpty for generic yrbl with empty wallet message 2020-09-29 17:12:32 -04:00
channels add help link 2020-10-12 23:21:23 -04:00
channelsFollowing new layout 🕺 2020-09-29 17:12:32 -04:00
channelsFollowingDiscover large claim-grid header text + optional icon 2020-09-29 17:12:32 -04:00
checkoutPage new layout 🕺 2020-09-29 17:12:32 -04:00
creatorDashboard add reward rate + analytics link on channels page 2020-10-12 23:21:23 -04:00
discover keep header on regular discover page 2020-09-29 17:12:32 -04:00
embedWrapper add option for light background on embeds 2020-09-21 11:38:56 -04:00
file align FileActions with odysee style 2020-09-30 17:00:18 -04:00
fileListDownloaded new lbc icon 2020-09-29 17:12:32 -04:00
fileListPublished add spinner to web upload message and fix double card issue 2020-09-29 17:12:32 -04:00
fourOhFour refactor lbrytv web server 2019-11-11 13:27:29 -05:00
help Support for multiple string context + "About" as initial example. 2020-10-14 17:44:44 -04:00
home pass to 2020-10-13 15:31:07 -04:00
invite add youtube sync to first run 2020-09-29 17:12:32 -04:00
invited new layout 🕺 2020-09-29 17:12:32 -04:00
library new lbc icon 2020-09-29 17:12:32 -04:00
listBlocked Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
navigationHistory refactor lbrytv web server 2019-11-11 13:27:29 -05:00
notifications new lbc icon 2020-09-29 17:12:32 -04:00
passwordReset new layout 🕺 2020-09-29 17:12:32 -04:00
passwordSet new layout 🕺 2020-09-29 17:12:32 -04:00
publish use backout mode on publish page 2020-09-29 17:12:32 -04:00
report Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
rewards new lbc icon 2020-09-29 17:12:32 -04:00
rewardsVerify rewards redirect fix for manually approved users 2020-07-03 13:18:28 -04:00
search Correctly navigate to channel URL 2020-10-05 16:43:29 -04:00
settings Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
settingsAdvanced Comment v69 strings and misc. 2020-10-08 10:37:17 -04:00
settingsNotifications new lbc icon 2020-09-29 17:12:32 -04:00
show new lbc icon 2020-09-29 17:12:32 -04:00
signIn new layout 🕺 2020-09-29 17:12:32 -04:00
signInVerify copy changes 2020-09-29 17:12:32 -04:00
signInWalletPassword get sync password out of signing flow 2020-09-21 14:11:25 -04:00
signUp new layout 🕺 2020-09-29 17:12:32 -04:00
tagsFollowing new layout 🕺 2020-09-29 17:12:32 -04:00
tagsFollowingManage Use sentence case for all card titles 2020-09-29 17:12:32 -04:00
top add options card to claim search 2020-02-28 13:30:29 -05:00
wallet create YrblWalletEmpty for generic yrbl with empty wallet message 2020-09-29 17:12:32 -04:00
welcome new layout 🕺 2020-09-29 17:12:32 -04:00
youtubeSync make channel/tag follow intro optional 2020-09-29 17:12:32 -04:00