lbry-desktop/static
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
..
font/v1 updates font files with normalized line height versions 2020-04-23 10:47:06 -04:00
img new og image 2020-04-30 14:33:21 -04:00
webworkers update webworkers 2019-11-25 11:40:19 -05:00
app-strings.json Support for multiple string context + "About" as initial example. 2020-10-14 17:44:44 -04:00
index-electron.html Add direction 2020-07-29 17:54:10 -04:00
index-web.html use dynamic js bundle urls 2020-08-19 17:14:31 -04:00
opensearch.xml Implement OpenSearch support 2020-08-12 13:35:49 -04:00
robots.txt robots.txt defaults to disallow 2020-10-12 23:33:29 -04:00