Index: translation-string-format.md |
=================================================================== |
new file mode 100644 |
--- /dev/null |
+++ b/translation-string-format.md |
@@ -0,0 +1,57 @@ |
+# Websites translation string format |
+ |
+## Format |
+ |
+`{{ $uid[$context] $contents }}` |
+ |
+### $uid (required) |
+ |
+Format |
+: >= 1 alphanumeric asic char |
+ |
+Exceptions |
+: Should be human readable if reused. |
+ |
+### $context (optional - unnesisary for reuse) |
+ |
+Format |
+: Parent HTML tag and attribute name (if applicable) |
+ |
+Exceptions |
+: - Expand tag names e.g. "p" -> "paragraph" |
+ - Exclude irrelivant information like heading number e.g. "h1" -> "heading" |
+ - Provide functional context if applicable e.g. "title" -> "tooltip" |
+ |
+### $content (optional - unnessisary for reuse) |
+ |
+Format: |
+: >= 1 UTF-8 char |
+ |
+Exceptions: |
+: Should not contain "}}" |
+ |
+## Example |
+ |
+``` |
+<nav> |
+ <h1>{{ brand-name[heading] Adblock Plus }}</h1> |
+ ... |
+</nav> |
+<header> |
+ <h1>{{ brand-name }}</h1> |
+ <p>{{ 1[subtitle] Blocks annoying ads }}</p> |
+</header> |
+... |
+``` |
+ |
+- Notice how "brand-name" is reused |
+- Notice how "1" has functional context |
+- 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. |
+ |
+## FAQ |
+ |
+Why not make all string IDs human readable? |
+: Because picky humans cannot generate or review them efficiently |
+ |
+Why not add location information to string contexts? |
+: Because [picky humans cannot generate or review them efficiently, we often begin translation before implementation, we don't have a staging system to show visual context information]. |