-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmessage-prefixes.txt
43 lines (28 loc) · 1.11 KB
/
message-prefixes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Message prefixes
Looking through the messages, I see 86 containing the word "error" and 29 containing "warning".
I'd like to suggest a standard prefix for these messages.
They would be translated separately and added by the logging code.
Prefixes:
"Error: "
"Warning: "
The prefixes would be optional (defaulting to on).
The message colours (which default to off) would be independent of the prefixes.
Users could then enable colours and disable the prefixes.
Does this sound useful?
Would this cause problems with translation?
---
Offer the translators a formatting string:
snprintf(_("[%s]%s: %s"), ERROR_CODE, ERROR_STRING, MESSAGE);
ERROR_CODE = "E123"
ERROR_STRING = "Error"
MESSAGE = "Cannot read file 'x'
the error string and message are independently translated
---
unify all the errors, warnings, messages
translatable prefix: "Error", etc
if color error|warning|message is defined
don't use prefix
if $message_chars is defined, use *it* as a prefix
"❗"/"🚨", "⚠️ ", "ℹ️ " -- or nerdfonts, in colour
Icons could be used elsewhere
Add: Good ✔️ ✅, Bad ❌❎ plus colours