| Left: | ||
| Right: |
| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Translation string format | |
|
saroyanm
2017/06/01 12:07:25
I think it makes sense to define if this document
juliandoucette
2017/06/07 16:07:39
Acknowledged.
I don't know how translations are d
ire
2017/06/08 11:18:34
It would be really helpful to include some example
juliandoucette
2017/06/08 21:07:51
Acknowledged.
Lisa
2017/06/09 14:14:47
Totally agree with Ire.
saroyanm
2017/06/13 09:48:27
Yes, I also agree with you.
Suggestion: I think e
saroyanm
2017/06/13 09:48:27
I think strings are very similar to what we have,
| |
| 2 | |
| 3 `{{identifier[context] content }}` | |
| 4 | |
| 5 ## Brackets | |
|
saroyanm
2017/06/01 12:07:25
Suggestion: I think "required" can go right next t
juliandoucette
2017/06/07 16:07:39
Acknowledged.
Good point.
| |
| 6 | |
| 7 Two curly braces must (required) go at the beginning and end of a translated str ing in Markdown and HTML format. | |
|
saroyanm
2017/06/01 12:07:26
Suggestion: I think from "must" it's obvious that
juliandoucette
2017/06/07 16:07:39
Acknowledged.
I guess I thought this made it more
ire
2017/06/08 11:18:34
I think, as Manvel suggested later in this doc, th
juliandoucette
2017/06/08 21:07:51
Acknowledged.
| |
| 8 | |
| 9 ## Identifier | |
| 10 | |
| 11 An identifier must (required) immediately follow two opening brackets. | |
| 12 | |
| 13 - An identifier may identify only one string on one page | |
|
saroyanm
2017/06/01 12:07:26
Word "may" sound "balanced" for me, let me know if
juliandoucette
2017/06/07 16:07:39
"may" means *can*. "should" means *preferably*. "s
saroyanm
2017/06/13 09:48:27
In this context I understand wording this way:
* M
| |
| 14 - If one string occurs more than once on one page in the same context, the same identifier may be used and the string context and content may be omitted | |
| 15 - An identifier may contain only lowercase latin letters and dashes | |
|
saroyanm
2017/06/01 12:07:26
Suggestion: We can make this more strong. "should"
juliandoucette
2017/06/07 16:07:38
See comment above.
saroyanm
2017/06/13 09:48:28
same as the comment above.
| |
| 16 | |
| 17 ### Identifier format | |
| 18 | |
| 19 `summary-context-number` | |
| 20 | |
| 21 **Summary** | |
| 22 : An identifier summary should describe the contents of the string or it’s par ent heading in as few words as possible. | |
|
saroyanm
2017/06/01 12:07:26
Note: and example here I think could make things b
juliandoucette
2017/06/07 16:07:39
Acknowledged.
Lisa
2017/06/09 14:14:47
We should include an example. Personally, I'd like
juliandoucette
2017/06/09 15:13:54
You just taught me something :)
| |
| 23 | |
| 24 **Context** | |
| 25 : An identifier context should describe context in which the string appears in HTML. e.g. {h: heading, p: paragraph, li: list item} | |
|
juliandoucette
2017/05/18 08:54:37
Note: We have had a policy about spelling things o
saroyanm
2017/06/01 12:07:25
I think if we agree with this approach this can be
juliandoucette
2017/06/07 16:07:39
Good point. I think there is a middle ground here.
juliandoucette
2017/06/07 16:16:18
I'm afraid this was unclear. What I mean is that t
saroyanm
2017/06/13 09:48:28
I agree with you. Would be great to come up with t
| |
| 26 | |
| 27 **Number** | |
| 28 : A number should uniquely identify an identifier among other similar identifi ers. e.g. among multiple consecutive list items or paragraphs with the same iden tifier summary and context. | |
|
juliandoucette
2017/05/18 08:54:37
Note: A number is not necessary if there are not m
saroyanm
2017/06/01 12:07:25
Having number "required" will minimize the effort
juliandoucette
2017/06/07 16:07:38
I agree.
I found it awkward to use and/or not use
| |
| 29 | |
| 30 ## Context | |
|
saroyanm
2017/06/01 12:07:25
Suggestion: Let's mark optional here rather than i
juliandoucette
2017/06/07 16:07:39
Acknowledged.
| |
| 31 | |
| 32 A Context should (optional) immediately follow an identifier. | |
| 33 | |
| 34 - Context must be enclosed within square brackets | |
| 35 - Context may contain upper and lower case latin letters, dashes, commas, apostr ophes, and spaces | |
| 36 | |
| 37 ### Context format | |
| 38 | |
| 39 A Context should (optional) describe the HTML context (e.g. heading / paragraph / list item) and meaning (e.g. “Order” as in “place an order” or “Order” as in “ Order of events”) of the string contents. | |
| 40 | |
| 41 ## Content | |
| 42 | |
| 43 - A string’s content must (required) be separated from its identifier and contex t by one space | |
| 44 - A string’s content should (optionally) be separated from it’s closing braces b y one space | |
|
saroyanm
2017/06/01 12:07:26
Doesn't it mean that space should also being appli
juliandoucette
2017/06/07 16:07:39
I didn't know that we could put a space before the
ire
2017/06/08 11:18:34
I also prefer the first option. But I think we sho
juliandoucette
2017/06/08 21:07:51
Acknowledged.
| |
| 45 - A string must not (required) contain two closing brackets | |
| 46 - An English string should (optional) not contain non-ascii characters | |
| 47 | |
| 48 ## Jinja2 format translation strings | |
|
ire
2017/06/08 11:18:34
NIT: It's a bit confusing here to start talking ab
juliandoucette
2017/06/08 21:07:51
Acknowledged.
| |
| 49 | |
| 50 `{{ ”content” | translate(“identifier”, “context”) }}` | |
| 51 | |
| 52 Jinja2 (.tmpl) format strings are made up of the same parts (identifier, context , content) in a different format (Jinja2 filter format). The same rules apply to each part, except that the identifier and context must be surrounded by double quotes. | |
| 53 | |
| 54 ## Fixed tags | |
| 55 | |
| 56 `<fix>text</fix>` | |
| 57 | |
| 58 Fixed tags may (optional) appear within string contents. They are meant to ident ify parts of a string that may not be translated in some languages. | |
| 59 | |
| 60 - Fix tags must be closed | |
| 61 - A fix tag may be manually overriden by translations | |
| 62 | |
| 63 ### Common uses | |
|
ire
2017/06/08 11:18:34
Can we have a rule on whether the company name and
juliandoucette
2017/06/08 21:07:51
Acknowledged.
I guess "optional" and "common uses
ire
2017/06/09 06:50:11
Yes, you're right. I was referring to the latter t
| |
| 64 | |
| 65 - numbers | |
| 66 - dates | |
| 67 - names (people, brands, products) | |
|
ire
2017/06/09 06:50:11
Also, is there a rule on whether "eyeo", "Adblock
| |
| OLD | NEW |