| 2 | = Message Standardization = |
| 3 | |
| 4 | == How should Errors/Warnings/Messages be formatted == |
| 5 | |
| 6 | * Only user derived variables should be bracketed, not GRASS derived variables. for example: |
| 7 | {{{ |
| 8 | Yes: Creating raster map <%s>. Pass 1 of 7 ... |
| 9 | No: Creating <raster> map <%s>. Pass [1] of [7] ... |
| 10 | }}} |
| 11 | |
| 12 | * strings '''< >''' |
| 13 | ** e.g. Raster map <%s> not found |
| 14 | * numbers '''[ ]''' |
| 15 | ** e.g. Line [%d] deleted |
| 16 | |
| 17 | : ? The [bracketed] parenthetical disrupts the flow of the phrase and doesn't help enhance clarity of meaning. IMHO, this reads better without [] brackets: "''Line %d deleted.''" [] Brackets should be used when value is outside of the phrase: ''"Unknown line [%d]"''. --HB |
| 18 | |
| 19 | '''Discussion:''' |
| 20 | |
| 21 | Statistics [2007-04-11]: |
| 22 | |
| 23 | || symbol || number of code lines (2007-04-11) || 2008-02-14 (6.3svn) |
| 24 | || <%s> || 637 || 1406 |
| 25 | || [%s] || 690 || 427 |
| 26 | ||'%s' || 354 || 370 |
| 27 | || <%d> || 12 || 7 |
| 28 | || [%d] || 207 || 13 |
| 29 | ||'%d' || 3 || 1 |
| 30 | |
| 31 | {{{ |
| 32 | TYPES="<%s> \[%s\] '%s' <%d> \[%d\] '%d'" |
| 33 | |
| 34 | for TYPE in $TYPES ; do |
| 35 | NUM_HITS=`grep -rI "$TYPE" * | grep -v '/.svn/\|^dist.i686-\|locale/po/' | wc -l` |
| 36 | echo "$TYPE $NUM_HITS" |
| 37 | done |
| 38 | }}} |