OLD | NEW |
(Empty) | |
| 1 # Websites translation string format |
| 2 |
| 3 ## Format |
| 4 |
| 5 `{{ $uid[$tag-name $tag-attribute] $contents }}` |
| 6 |
| 7 ## Example |
| 8 |
| 9 ``` |
| 10 <section> |
| 11 <h1>{{ 1[heading text] Example heading }}</h1> |
| 12 <p>{{ 2[paragraph text] Example paragraph }}</p> |
| 13 <ul> |
| 14 <li>{{ 5[list item text] List item }}</li> |
| 15 </ul> |
| 16 <a title="{{ 3[link tooltip text] Example tooltip }}">{{ 4[link text] Example
link }}</a> |
| 17 </section> |
| 18 ``` |
| 19 |
| 20 ## Explination |
| 21 |
| 22 ### $uid |
| 23 |
| 24 A numeric unique identifier. |
| 25 |
| 26 ### $tag-name |
| 27 |
| 28 A human readable tag name. |
| 29 |
| 30 ### $tag-attribute |
| 31 |
| 32 A human readable tag attribute name. |
| 33 |
| 34 ### $contents |
| 35 |
| 36 String contents. |
| 37 |
| 38 ### FAQ |
| 39 |
| 40 Should $uid be human readable? |
| 41 : No, because making it human readable only complicates things. |
| 42 |
| 43 Should $tag-name be human readable? |
| 44 : Yes, use common sense to expand abbreviations e.g. p -> paragraph and exclud
e irrelivant information like heading number. |
| 45 |
| 46 Should $attribute-name be human readable? |
| 47 : Yes, use common sense to expand the meaning of the attribute e.g. title -> t
ooltip. |
| 48 |
| 49 What if there is no attribute? |
| 50 : Use "text". |
| 51 |
| 52 What about naming conflicts? |
| 53 : These should be easy to spot if we test/preview and review changes. These co
uld also be identified by linting. |
OLD | NEW |