mirror of
https://github.com/NixOS/nix
synced 2025-06-26 11:41:15 +02:00
Use proper quotes everywhere
This commit is contained in:
parent
373fad75e1
commit
11849a320e
54 changed files with 548 additions and 543 deletions
|
@ -396,7 +396,7 @@ inline Value * EvalState::lookupVar(Env * env, const ExprVar & var, bool noEval)
|
|||
return j->value;
|
||||
}
|
||||
if (!env->prevWith)
|
||||
throwUndefinedVarError("undefined variable `%1%' at %2%", var.name, var.pos);
|
||||
throwUndefinedVarError("undefined variable ‘%1%’ at %2%", var.name, var.pos);
|
||||
for (unsigned int l = env->prevWith; l; --l, env = env->up) ;
|
||||
}
|
||||
}
|
||||
|
@ -537,12 +537,12 @@ void EvalState::evalFile(const Path & path, Value & v)
|
|||
return;
|
||||
}
|
||||
|
||||
startNest(nest, lvlTalkative, format("evaluating file `%1%'") % path2);
|
||||
startNest(nest, lvlTalkative, format("evaluating file ‘%1%’") % path2);
|
||||
Expr * e = parseExprFromFile(path2);
|
||||
try {
|
||||
eval(e, v);
|
||||
} catch (Error & e) {
|
||||
addErrorPrefix(e, "while evaluating the file `%1%':\n", path2);
|
||||
addErrorPrefix(e, "while evaluating the file ‘%1%’:\n", path2);
|
||||
throw;
|
||||
}
|
||||
|
||||
|
@ -686,7 +686,7 @@ void ExprAttrs::eval(EvalState & state, Env & env, Value & v)
|
|||
Symbol nameSym = state.symbols.create(nameVal.string.s);
|
||||
Bindings::iterator j = v.attrs->find(nameSym);
|
||||
if (j != v.attrs->end())
|
||||
throwEvalError("dynamic attribute `%1%' at %2% already defined at %3%", nameSym, i->pos, *j->pos);
|
||||
throwEvalError("dynamic attribute ‘%1%’ at %2% already defined at %3%", nameSym, i->pos, *j->pos);
|
||||
|
||||
i->valueExpr->setName(nameSym);
|
||||
/* Keep sorted order so find can catch duplicates */
|
||||
|
@ -764,7 +764,7 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v)
|
|||
staticPath.push_back(AttrName(getName(*j, state, env)));
|
||||
for (j = j + 1; j != attrPath.end(); ++j)
|
||||
staticPath.push_back(*j);
|
||||
throwEvalError("attribute `%1%' missing, at %2%", showAttrPath(staticPath), pos);
|
||||
throwEvalError("attribute ‘%1%’ missing, at %2%", showAttrPath(staticPath), pos);
|
||||
}
|
||||
}
|
||||
vAttrs = j->value;
|
||||
|
@ -776,7 +776,7 @@ void ExprSelect::eval(EvalState & state, Env & env, Value & v)
|
|||
|
||||
} catch (Error & e) {
|
||||
if (pos2 && pos2->file != state.sDerivationNix)
|
||||
addErrorPrefix(e, "while evaluating the attribute `%1%' at %2%:\n",
|
||||
addErrorPrefix(e, "while evaluating the attribute ‘%1%’ at %2%:\n",
|
||||
showAttrPath(attrPath), *pos2);
|
||||
throw;
|
||||
}
|
||||
|
@ -900,7 +900,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v, const Pos & po
|
|||
foreach (Formals::Formals_::iterator, i, lambda.formals->formals) {
|
||||
Bindings::iterator j = arg.attrs->find(i->name);
|
||||
if (j == arg.attrs->end()) {
|
||||
if (!i->def) throwTypeError("%1% called without required argument `%2%', at %3%",
|
||||
if (!i->def) throwTypeError("%1% called without required argument ‘%2%’, at %3%",
|
||||
lambda, i->name, pos);
|
||||
env2.values[displ++] = i->def->maybeThunk(*this, env2);
|
||||
} else {
|
||||
|
@ -916,7 +916,7 @@ void EvalState::callFunction(Value & fun, Value & arg, Value & v, const Pos & po
|
|||
user. */
|
||||
foreach (Bindings::iterator, i, *arg.attrs)
|
||||
if (lambda.formals->argNames.find(i->name) == lambda.formals->argNames.end())
|
||||
throwTypeError("%1% called with unexpected argument `%2%', at %3%", lambda, i->name, pos);
|
||||
throwTypeError("%1% called with unexpected argument ‘%2%’, at %3%", lambda, i->name, pos);
|
||||
abort(); // can't happen
|
||||
}
|
||||
}
|
||||
|
@ -963,7 +963,7 @@ void EvalState::autoCallFunction(Bindings & args, Value & fun, Value & res)
|
|||
if (j != args.end())
|
||||
actualArgs->attrs->push_back(*j);
|
||||
else if (!i->def)
|
||||
throwTypeError("cannot auto-call a function that has an argument without a default value (`%1%')", i->name);
|
||||
throwTypeError("cannot auto-call a function that has an argument without a default value (‘%1%’)", i->name);
|
||||
}
|
||||
|
||||
actualArgs->attrs->sort();
|
||||
|
@ -1233,10 +1233,10 @@ string EvalState::forceStringNoCtx(Value & v, const Pos & pos)
|
|||
string s = forceString(v, pos);
|
||||
if (v.string.context) {
|
||||
if (pos)
|
||||
throwEvalError("the string `%1%' is not allowed to refer to a store path (such as `%2%'), at %3%",
|
||||
throwEvalError("the string ‘%1%’ is not allowed to refer to a store path (such as ‘%2%’), at %3%",
|
||||
v.string.s, v.string.context[0], pos);
|
||||
else
|
||||
throwEvalError("the string `%1%' is not allowed to refer to a store path (such as `%2%')",
|
||||
throwEvalError("the string ‘%1%’ is not allowed to refer to a store path (such as ‘%2%’)",
|
||||
v.string.s, v.string.context[0]);
|
||||
}
|
||||
return s;
|
||||
|
@ -1307,7 +1307,7 @@ string EvalState::coerceToString(const Pos & pos, Value & v, PathSet & context,
|
|||
string EvalState::copyPathToStore(PathSet & context, const Path & path)
|
||||
{
|
||||
if (nix::isDerivation(path))
|
||||
throwEvalError("file names are not allowed to end in `%1%'", drvExtension);
|
||||
throwEvalError("file names are not allowed to end in ‘%1%’", drvExtension);
|
||||
|
||||
Path dstPath;
|
||||
if (srcToStore[path] != "")
|
||||
|
@ -1317,7 +1317,7 @@ string EvalState::copyPathToStore(PathSet & context, const Path & path)
|
|||
? computeStorePathForPath(path).first
|
||||
: store->addToStore(path, true, htSHA256, defaultPathFilter, repair);
|
||||
srcToStore[path] = dstPath;
|
||||
printMsg(lvlChatty, format("copied source `%1%' -> `%2%'")
|
||||
printMsg(lvlChatty, format("copied source ‘%1%’ -> ‘%2%’")
|
||||
% path % dstPath);
|
||||
}
|
||||
|
||||
|
@ -1330,7 +1330,7 @@ Path EvalState::coerceToPath(const Pos & pos, Value & v, PathSet & context)
|
|||
{
|
||||
string path = coerceToString(pos, v, context, false, false);
|
||||
if (path == "" || path[0] != '/')
|
||||
throwEvalError("string `%1%' doesn't represent an absolute path, at %1%", path, pos);
|
||||
throwEvalError("string ‘%1%’ doesn't represent an absolute path, at %1%", path, pos);
|
||||
return path;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue