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

Unified Diff: translation-string-format.md

Issue 29422615: Issue 5068 - Define translation string format (Closed)
Patch Set: Proposed changes Created Sept. 18, 2017, 3:26 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: translation-string-format.md
===================================================================
new file mode 100644
--- /dev/null
+++ b/translation-string-format.md
@@ -0,0 +1,53 @@
+# Websites translation string format
+
+## Format
+
+`{{ $uid[$tag-name $tag-attribute] $contents }}`
+
+## Example
+
+```
+<section>
+ <h1>{{ 1[heading text] Example heading }}</h1>
+ <p>{{ 2[paragraph text] Example paragraph }}</p>
+ <ul>
+ <li>{{ 5[list item text] List item }}</li>
+ </ul>
+ <a title="{{ 3[link tooltip text] Example tooltip }}">{{ 4[link text] Example link }}</a>
+</section>
+```
+
+## Explination
+
+### $uid
+
+A numeric unique identifier.
+
+### $tag-name
+
+A human readable tag name.
+
+### $tag-attribute
+
+A human readable tag attribute name.
+
+### $contents
+
+String contents.
+
+### FAQ
+
+Should $uid be human readable?
+: No, because making it human readable only complicates things.
+
+Should $tag-name be human readable?
+: Yes, use common sense to expand abbreviations e.g. p -> paragraph and exclude irrelivant information like heading number.
+
+Should $attribute-name be human readable?
+: Yes, use common sense to expand the meaning of the attribute e.g. title -> tooltip.
+
+What if there is no attribute?
+: Use "text".
+
+What about naming conflicts?
+: These should be easy to spot if we test/preview and review changes. These could also be identified by linting.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld