builtins: work on error messages

- Introduce BUILTIN_ERR_COMBO2_EXCLUSIVE
- Distill generally more terse, unambiguous error descriptions.
  Remember English is not everyone's language.
- Do not capitalize sentence fragments
- Use the modality where problem input is in a %s: prefix, then
  is explained.
- Do not address the user (the "You cannot do ..." kraderism)
- Spell out 'arguments' rather than 'args' for consistency
- Mention 'function' as a scope
This commit is contained in:
Aaron Gyes
2021-11-02 03:09:38 -07:00
parent 6858abac04
commit 710639f5d6
11 changed files with 49 additions and 61 deletions

View File

@@ -392,7 +392,7 @@ static const base_directory_t &get_config_directory() {
void path_emit_config_directory_messages(env_stack_t &vars) {
const auto &data = get_data_directory();
if (!data.success()) {
maybe_issue_path_warning(L"data", _(L"Your history will not be saved."), data.used_xdg,
maybe_issue_path_warning(L"data", _(L"can not save history"), data.used_xdg,
L"XDG_DATA_HOME", data.path, data.err, vars);
}
if (data.is_remote > 0) {
@@ -401,7 +401,7 @@ void path_emit_config_directory_messages(env_stack_t &vars) {
const auto &config = get_config_directory();
if (!config.success()) {
maybe_issue_path_warning(L"config", _(L"Your personal settings will not be saved."),
maybe_issue_path_warning(L"config", _(L"can not save universal variables or functions"),
config.used_xdg, L"XDG_CONFIG_HOME", config.path, config.err,
vars);
}