31 str <<
form(
_(
"Failed to mount %s on %s"), _source.c_str(), _target.c_str());
33 str <<
": " << _error <<
" (" << _cmdout <<
")" << endl;
35 str <<
": " << _error << endl;
41 return str <<
form(
_(
"Failed to unmount %s"), _path.c_str())
42 <<
" : " << _error << endl;
47 return str <<
form(
_(
"Bad file name: %s"), _filename.c_str()) << endl;
53 _(
"Medium not opened when trying to perform action '%s'."), _action.c_str())
60 _(
"File '%s' not found on medium '%s'"),
61 _filename.c_str(), _url.c_str())
67 return str <<
form(
_(
"Cannot write file '%s'."), _filename.c_str()) << endl;
72 return str <<
_(
"Medium not attached") <<
": " << _url << endl;
77 return str <<
_(
"Bad media attach point") <<
": " << _url << endl;
84 _(
"Download (curl) initialization failed for '%s'"), _url.c_str())
91 _(
"System exception '%s' on medium '%s'."),
92 _message.c_str(), _url.c_str()) << endl;
98 _(
"Path '%s' on medium '%s' is not a file."),
99 _path.c_str(), _url.c_str())
106 _(
"Path '%s' on medium '%s' is not a directory."),
107 _path.c_str(), _url.c_str())
115 return str <<
_(
"Malformed URI") <<
": " << _url << endl;
119 return str << _msg <<
": " << _url << endl;
125 return str <<
_(
"Empty host name in URI") <<
": " << _url << endl;
130 return str <<
_(
"Empty filesystem in URI") <<
": " << _url << endl;
135 return str <<
_(
"Empty destination in URI") <<
": " << _url << endl;
140 return str <<
form(
_(
"Unsupported URI scheme in '%s'."), _url.c_str()) << endl;
145 return str <<
_(
"Operation not supported by medium") <<
": " << _url << endl;
151 return str <<
form(
_(
152 "Download (curl) error for '%s':\n"
154 "Error message: %s\n"), _url.c_str(), _err.c_str(), _msg.c_str());
161 _(
"Error occurred while setting download (curl) options for '%s':"),
163 << endl << _msg << endl;
169 _(
"Media source '%s' does not contain the desired medium"), _url.c_str())
175 return str <<
form(
_(
"Medium '%s' is in use by another instance"), _name.c_str())
182 return str <<
_(
"Cannot eject any media") << endl;
184 return str <<
form(
_(
"Cannot eject media '%s'"), _name.c_str()) << endl;
190 if( !_url.asString().empty())
191 str <<
" (" << _url <<
")";
199 str <<
form(
_(
"Permission to access '%s' denied."), _url.c_str()) << endl;
201 str << endl << _msg << endl;
207 str <<
form(
_(
"Timeout exceeded when accessing '%s'."), _url.c_str()) << endl;
209 str << endl << _msg << endl;
215 str <<
form(
_(
"Location '%s' is temporarily unaccessible."), _url.c_str()) << endl;
217 str << endl << _msg << endl;
223 str <<
form(
_(
" SSL certificate problem, verify that the CA cert is OK for '%s'."), _url.c_str()) << endl;
225 str << endl << _msg << endl;
231 str <<
form(
_(
"Cannot find available loop device to mount the image file from '%s'"), _url.c_str()) << endl;
233 str << endl << _msg << endl;
std::ostream & dumpOn(std::ostream &str, const Capability &obj)
#define _(MSG)
Return translated text.
std::string form(const char *format,...)
Printf style construction of std::string.