OLD | NEW |
(Empty) | |
| 1 # Websites translation string format |
| 2 |
| 3 ## Format |
| 4 |
| 5 `{{ $uid[$context] $contents }}` |
| 6 |
| 7 ### $uid (required) |
| 8 |
| 9 Format |
| 10 : >= 1 alphanumeric asic char |
| 11 |
| 12 Exceptions |
| 13 : Should be human readable if reused. |
| 14 |
| 15 ### $context (optional - unnesisary for reuse) |
| 16 |
| 17 Format |
| 18 : Parent HTML tag and attribute name (if applicable) |
| 19 |
| 20 Exceptions |
| 21 : - Expand tag names e.g. "p" -> "paragraph" |
| 22 - Exclude irrelivant information like heading number e.g. "h1" -> "heading" |
| 23 - Provide functional context if applicable e.g. "title" -> "tooltip" |
| 24 |
| 25 ### $content (optional - unnessisary for reuse) |
| 26 |
| 27 Format: |
| 28 : >= 1 UTF-8 char |
| 29 |
| 30 Exceptions: |
| 31 : Should not contain "}}" |
| 32 |
| 33 ## Example |
| 34 |
| 35 ``` |
| 36 <nav> |
| 37 <h1>{{ brand-name[heading] Adblock Plus }}</h1> |
| 38 ... |
| 39 </nav> |
| 40 <header> |
| 41 <h1>{{ brand-name }}</h1> |
| 42 <p>{{ 1[subtitle] Blocks annoying ads }}</p> |
| 43 </header> |
| 44 ... |
| 45 ``` |
| 46 |
| 47 - Notice how "brand-name" is reused |
| 48 - Notice how "1" has functional context |
| 49 - Notice that "1" is a UID not an NID. It could just as easily be "a" or "9" as
long as it's not used more than once on the page. |
| 50 |
| 51 ## FAQ |
| 52 |
| 53 Why not make all string IDs human readable? |
| 54 : Because picky humans cannot generate or review them efficiently |
| 55 |
| 56 Why not add location information to string contexts? |
| 57 : Because [picky humans cannot generate or review them efficiently, we often be
gin translation before implementation, we don't have a staging system to show vi
sual context information]. |
OLD | NEW |