mirror of
https://github.com/aria2/aria2.git
synced 2025-01-04 09:03:46 +00:00
Made notice level log messages translatable
This commit is contained in:
parent
dd3f688743
commit
26d4ca8a6a
@ -5,5 +5,14 @@ src/OptionHandler.cc
|
||||
src/OptionHandlerImpl.h
|
||||
src/usage_text.h
|
||||
src/version_usage.cc
|
||||
src/message.h
|
||||
src/BtSetup.cc
|
||||
src/AbstractCommand.cc
|
||||
src/AdaptiveURISelector.cc
|
||||
src/BtStopDownloadCommand.cc
|
||||
src/DHTConnectionImpl.cc
|
||||
src/HttpListenCommand.cc
|
||||
src/PeerListenCommand.cc
|
||||
src/RequestGroup.cc
|
||||
src/SingleFileAllocationIterator.cc
|
||||
src/TimedHaltCommand.cc
|
||||
src/message.h
|
||||
|
@ -440,8 +440,8 @@ void AbstractCommand::onAbort() {
|
||||
// Local file exists, but given servers(or at least contacted
|
||||
// ones) doesn't support resume. Let's restart download from
|
||||
// scratch.
|
||||
A2_LOG_NOTICE(fmt("CUID#%lld - Failed to resume download."
|
||||
" Download from scratch.",
|
||||
A2_LOG_NOTICE(fmt(_("CUID#%lld - Failed to resume download."
|
||||
" Download from scratch."),
|
||||
getCuid()));
|
||||
A2_LOG_DEBUG(fmt("CUID#%lld - Gathering URIs that has CANNOT_RESUME"
|
||||
" error",
|
||||
|
@ -224,15 +224,15 @@ void AdaptiveURISelector::adjustLowestSpeedLimit
|
||||
unsigned int low_lowest = 4 * 1024;
|
||||
unsigned int max = getMaxDownloadSpeed(uris);
|
||||
if (max > 0 && lowest > max / 4) {
|
||||
A2_LOG_NOTICE(fmt("Lowering lowest-speed-limit since known max speed is"
|
||||
" too near (new:%d was:%d max:%d)",
|
||||
A2_LOG_NOTICE(fmt(_("Lowering lowest-speed-limit since known max speed is"
|
||||
" too near (new:%d was:%d max:%d)"),
|
||||
max / 4,
|
||||
lowest,
|
||||
max));
|
||||
command->setLowestDownloadSpeedLimit(max / 4);
|
||||
} else if (max == 0 && lowest > low_lowest) {
|
||||
A2_LOG_NOTICE(fmt("Lowering lowest-speed-limit since we have no clue"
|
||||
" about available speed (now:%d was:%d)",
|
||||
A2_LOG_NOTICE(fmt(_("Lowering lowest-speed-limit since we have no clue"
|
||||
" about available speed (now:%d was:%d)"),
|
||||
low_lowest,
|
||||
lowest));
|
||||
command->setLowestDownloadSpeedLimit(low_lowest);
|
||||
|
@ -61,8 +61,8 @@ void BtStopDownloadCommand::preProcess()
|
||||
enableExit();
|
||||
}
|
||||
if(checkPoint_.difference(global::wallclock()) >= timeout_) {
|
||||
A2_LOG_NOTICE(fmt("GID#%lld Stop downloading torrent due to"
|
||||
" --bt-stop-timeout option.",
|
||||
A2_LOG_NOTICE(fmt(_("GID#%lld Stop downloading torrent due to"
|
||||
" --bt-stop-timeout option."),
|
||||
requestGroup_->getGID()));
|
||||
requestGroup_->setForceHaltRequested(true);
|
||||
getDownloadEngine()->setRefreshInterval(0);
|
||||
|
@ -86,7 +86,7 @@ bool DHTConnectionImpl::bind(uint16_t& port, const std::string& addr)
|
||||
std::pair<std::string, uint16_t> svaddr;
|
||||
socket_->getAddrInfo(svaddr);
|
||||
port = svaddr.second;
|
||||
A2_LOG_NOTICE(fmt("IPv%d DHT: listening to port %u", ipv, port));
|
||||
A2_LOG_NOTICE(fmt(_("IPv%d DHT: listening to port %u"), ipv, port));
|
||||
return true;
|
||||
} catch(RecoverableException& e) {
|
||||
A2_LOG_ERROR_EX(fmt("IPv%d DHT: failed to bind port %u", ipv, port), e);
|
||||
|
@ -109,7 +109,7 @@ bool HttpListenCommand::bindPort(uint16_t port)
|
||||
A2_LOG_INFO(fmt(MSG_LISTENING_PORT,
|
||||
getCuid(), port));
|
||||
e_->addSocketForReadCheck(serverSocket_, this);
|
||||
A2_LOG_NOTICE(fmt("IPv%d RPC: listening to port %u", ipv, port));
|
||||
A2_LOG_NOTICE(fmt(_("IPv%d RPC: listening to port %u"), ipv, port));
|
||||
return true;
|
||||
} catch(RecoverableException& e) {
|
||||
A2_LOG_ERROR_EX(fmt("IPv%d RPC: failed to bind port %u", ipv, port), e);
|
||||
|
@ -271,10 +271,10 @@ error_code::Value MultiUrlRequestInfo::execute()
|
||||
if(!option_->blank(PREF_SAVE_SESSION)) {
|
||||
const std::string& filename = option_->get(PREF_SAVE_SESSION);
|
||||
if(sessionSerializer.save(filename)) {
|
||||
A2_LOG_NOTICE(fmt("Serialized session to '%s' successfully.",
|
||||
A2_LOG_NOTICE(fmt(_("Serialized session to '%s' successfully."),
|
||||
filename.c_str()));
|
||||
} else {
|
||||
A2_LOG_NOTICE(fmt("Failed to serialize session to '%s'.",
|
||||
A2_LOG_NOTICE(fmt(_("Failed to serialize session to '%s'."),
|
||||
filename.c_str()));
|
||||
}
|
||||
}
|
||||
|
@ -80,7 +80,8 @@ bool PeerListenCommand::bindPort(uint16_t& port, SegList<int>& sgl)
|
||||
socket_->bind(A2STR::NIL, port, family_);
|
||||
socket_->beginListen();
|
||||
socket_->setNonBlockingMode();
|
||||
A2_LOG_NOTICE(fmt("IPv%d BitTorrent: listening to port %u", ipv, port));
|
||||
A2_LOG_NOTICE(fmt(_("IPv%d BitTorrent: listening to port %u"),
|
||||
ipv, port));
|
||||
return true;
|
||||
} catch(RecoverableException& ex) {
|
||||
A2_LOG_ERROR_EX(fmt("IPv%d BitTorrent: failed to bind port %u",
|
||||
|
@ -378,8 +378,8 @@ void RequestGroup::createInitialCommand
|
||||
e->addCommand(dhtCommands);
|
||||
}
|
||||
} else {
|
||||
A2_LOG_NOTICE("For BitTorrent Magnet URI, enabling DHT is strongly"
|
||||
" recommended. See --enable-dht option.");
|
||||
A2_LOG_NOTICE(_("For BitTorrent Magnet URI, enabling DHT is strongly"
|
||||
" recommended. See --enable-dht option."));
|
||||
}
|
||||
|
||||
SharedHandle<CheckIntegrityEntry> entry
|
||||
@ -683,8 +683,8 @@ void RequestGroup::adjustFilename
|
||||
option_->getAsBool(PREF_REMOVE_CONTROL_FILE) &&
|
||||
infoFile->exists()) {
|
||||
infoFile->removeFile();
|
||||
A2_LOG_NOTICE(fmt("Removed control file for %s because it is requested by"
|
||||
" user.",
|
||||
A2_LOG_NOTICE(fmt(_("Removed control file for %s because it is requested by"
|
||||
" user."),
|
||||
infoFile->getFilename().c_str()));
|
||||
}
|
||||
if(infoFile->exists()) {
|
||||
|
@ -339,7 +339,7 @@ public:
|
||||
}
|
||||
} else {
|
||||
A2_LOG_NOTICE
|
||||
(fmt("Download GID#%lld not complete: %s",
|
||||
(fmt(_("Download GID#%lld not complete: %s"),
|
||||
group->getGID(),
|
||||
group->getDownloadContext()->getBasePath().c_str()));
|
||||
group->saveControlFile();
|
||||
|
@ -72,9 +72,9 @@ void SingleFileAllocationIterator::init()
|
||||
static bool noticeDone = false;
|
||||
if(!noticeDone) {
|
||||
noticeDone = true;
|
||||
A2_LOG_NOTICE("Allocating disk space. Use --file-allocation=none to"
|
||||
" disable it. See --file-allocation option in man page for"
|
||||
" more details.");
|
||||
A2_LOG_NOTICE(_("Allocating disk space. Use --file-allocation=none to"
|
||||
" disable it. See --file-allocation option in man page for"
|
||||
" more details."));
|
||||
}
|
||||
#ifdef HAVE_POSIX_MEMALIGN
|
||||
buffer_ = reinterpret_cast<unsigned char*>
|
||||
|
@ -66,7 +66,6 @@ void TimedHaltCommand::process()
|
||||
A2_LOG_NOTICE(fmt(MSG_TIME_HAS_PASSED,
|
||||
static_cast<long int>(getInterval())));
|
||||
if(forceHalt_) {
|
||||
A2_LOG_NOTICE("This is emergency shutdown.");
|
||||
getDownloadEngine()->requestForceHalt();
|
||||
} else {
|
||||
getDownloadEngine()->requestHalt();
|
||||
|
Loading…
Reference in New Issue
Block a user