OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // This file is parsed by JavaScript and must not use fancy Dart constructs. | 5 // An update to this file must be followed by regenerating the corresponding |
6 // It can contain JSON like constructs and "//" comments (but not "/*" "*/"). | 6 // json file. Use `json_converter.dart` in the bin directory. |
7 // It must have one assignment (`final MESSAGES =`). | 7 // |
8 // All strings must be raw strings. | 8 // Every message in this file must have an id. Use `message_id.dart` in the |
| 9 // bin directory to generate a fresh one. |
9 | 10 |
10 // The messages in this file should meet the following guide lines: | 11 // The messages in this file should meet the following guide lines: |
11 // | 12 // |
12 // 1. The message should be a complete sentence starting with an uppercase | 13 // 1. The message should be a complete sentence starting with an uppercase |
13 // letter, and ending with a period. | 14 // letter, and ending with a period. |
14 // | 15 // |
15 // 2. Reserved words and embedded identifiers should be in single quotes, so | 16 // 2. Reserved words and embedded identifiers should be in single quotes, so |
16 // prefer double quotes for the complete message. For example, "The | 17 // prefer double quotes for the complete message. For example, "The |
17 // class '#{className}' can't use 'super'." Notice that the word 'class' in the | 18 // class '#{className}' can't use 'super'." Notice that the word 'class' in the |
18 // preceding message is not quoted as it refers to the concept 'class', not the | 19 // preceding message is not quoted as it refers to the concept 'class', not the |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 // 10. Prefer to not use imperative tone. That is, the message should not sound | 51 // 10. Prefer to not use imperative tone. That is, the message should not sound |
51 // accusing or like it is ordering the user around. The computer should | 52 // accusing or like it is ordering the user around. The computer should |
52 // describe the problem, not criticize for violating the specification. | 53 // describe the problem, not criticize for violating the specification. |
53 // | 54 // |
54 // Other things to keep in mind: | 55 // Other things to keep in mind: |
55 // | 56 // |
56 // Generally, we want to provide messages that consists of three sentences: | 57 // Generally, we want to provide messages that consists of three sentences: |
57 // 1. what is wrong, 2. why is it wrong, 3. how do I fix it. However, we | 58 // 1. what is wrong, 2. why is it wrong, 3. how do I fix it. However, we |
58 // combine the first two in [template] and the last in [howToFix]. | 59 // combine the first two in [template] and the last in [howToFix]. |
59 | 60 |
60 final MESSAGES = { | 61 final Map<String, Map> MESSAGES = { |
61 }; | 62 }; |
OLD | NEW |