diff --git a/po/POTFILES.in b/po/POTFILES.in index 05462cde..9c5b6845 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -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 diff --git a/src/AbstractCommand.cc b/src/AbstractCommand.cc index 118cebb9..53b73c3d 100644 --- a/src/AbstractCommand.cc +++ b/src/AbstractCommand.cc @@ -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", diff --git a/src/AdaptiveURISelector.cc b/src/AdaptiveURISelector.cc index fe9ba404..3392a1da 100644 --- a/src/AdaptiveURISelector.cc +++ b/src/AdaptiveURISelector.cc @@ -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); diff --git a/src/BtStopDownloadCommand.cc b/src/BtStopDownloadCommand.cc index 446b24d6..15e9fa21 100644 --- a/src/BtStopDownloadCommand.cc +++ b/src/BtStopDownloadCommand.cc @@ -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); diff --git a/src/DHTConnectionImpl.cc b/src/DHTConnectionImpl.cc index 1306a5bf..f026dd24 100644 --- a/src/DHTConnectionImpl.cc +++ b/src/DHTConnectionImpl.cc @@ -86,7 +86,7 @@ bool DHTConnectionImpl::bind(uint16_t& port, const std::string& addr) std::pair 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); diff --git a/src/HttpListenCommand.cc b/src/HttpListenCommand.cc index 2b01c894..be650a1d 100644 --- a/src/HttpListenCommand.cc +++ b/src/HttpListenCommand.cc @@ -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); diff --git a/src/MultiUrlRequestInfo.cc b/src/MultiUrlRequestInfo.cc index c00678d5..d1987f48 100644 --- a/src/MultiUrlRequestInfo.cc +++ b/src/MultiUrlRequestInfo.cc @@ -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())); } } diff --git a/src/PeerListenCommand.cc b/src/PeerListenCommand.cc index f19e4daa..8051029a 100644 --- a/src/PeerListenCommand.cc +++ b/src/PeerListenCommand.cc @@ -80,7 +80,8 @@ bool PeerListenCommand::bindPort(uint16_t& port, SegList& 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", diff --git a/src/RequestGroup.cc b/src/RequestGroup.cc index a89a3840..9f71548f 100644 --- a/src/RequestGroup.cc +++ b/src/RequestGroup.cc @@ -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 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()) { diff --git a/src/RequestGroupMan.cc b/src/RequestGroupMan.cc index 036b6a40..bb0f1232 100644 --- a/src/RequestGroupMan.cc +++ b/src/RequestGroupMan.cc @@ -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(); diff --git a/src/SingleFileAllocationIterator.cc b/src/SingleFileAllocationIterator.cc index a12df5db..fb72da8a 100644 --- a/src/SingleFileAllocationIterator.cc +++ b/src/SingleFileAllocationIterator.cc @@ -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 diff --git a/src/TimedHaltCommand.cc b/src/TimedHaltCommand.cc index 1962b812..da919ef2 100644 --- a/src/TimedHaltCommand.cc +++ b/src/TimedHaltCommand.cc @@ -66,7 +66,6 @@ void TimedHaltCommand::process() A2_LOG_NOTICE(fmt(MSG_TIME_HAS_PASSED, static_cast(getInterval()))); if(forceHalt_) { - A2_LOG_NOTICE("This is emergency shutdown."); getDownloadEngine()->requestForceHalt(); } else { getDownloadEngine()->requestHalt();