Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: translation-string-format.md

Issue 29422615: Issue 5068 - Define translation string format (Closed)
Patch Set: Added UID vs OID detail Created Sept. 18, 2017, 3:44 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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.
54
55 What about order of numbers?
56 : It should be understood that these numbers are unique IDs; not ordered IDs ( I put them out-of-order in my example on purpose).
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld