Skip to content

Commit

Permalink
Update romanian translation
Browse files Browse the repository at this point in the history
  • Loading branch information
zenden2k committed Mar 8, 2024
1 parent 158f288 commit d7150dd
Show file tree
Hide file tree
Showing 8 changed files with 1,051 additions and 977 deletions.
1,973 changes: 1,020 additions & 953 deletions Lang/locale/ro/LC_MESSAGES/imageuploader.po

Large diffs are not rendered by default.

8 changes: 3 additions & 5 deletions Lang/locale/ru/LC_MESSAGES/imageuploader.po
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ msgstr ""
"Project-Id-Version: imageuploader\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-03-04 14:26+0300\n"
"PO-Revision-Date: 2024-03-04 14:26+0300\n"
"PO-Revision-Date: 2024-03-08 15:25+0300\n"
"Last-Translator: \n"
"Language-Team: [email protected]\n"
"Language: ru\n"
Expand Down Expand Up @@ -1736,7 +1736,7 @@ msgstr "Инвертировать выделение"

#: ../Source/Gui/Dialogs/WelcomeDlg.cpp:83
msgid "JPEG, PNG, GIF, BMP or any other file"
msgstr "JPEG, PNG, GIF, BMP и любые другие файлы"
msgstr "JPEG, PNG, GIF, BMP и другие форматы"

#: ../Source/Gui/Dialogs/WelcomeDlg.cpp:61
msgid ""
Expand Down Expand Up @@ -2459,10 +2459,8 @@ msgid "Server name:"
msgstr "Имя сервера:"

#: ../Source/Gui/Controls/MultiServerSelectorControl.cpp:102
#, fuzzy
#| msgid "Server settings"
msgid "Server not chosen"
msgstr "Настройки сервера"
msgstr "Сервер не выбран"

#: ../Source/Gui/Dialogs/UploadSettings.cpp:1039
msgid "Server settings"
Expand Down
10 changes: 7 additions & 3 deletions Source/CLI/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ std::string password;
std::string folderId;
std::string proxy;
int proxyPort;
int proxyType; /* CURLPROXY_HTTP, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A,
int proxyType; /* CURLPROXY_HTTP, CURLPROXY_HTTPS, CURLPROXY_SOCKS4, CURLPROXY_SOCKS4A,
CURLPROXY_SOCKS5, CURLPROXY_SOCKS5_HOSTNAME */
std::string proxyUser;
std::string proxyPassword;
Expand Down Expand Up @@ -165,7 +165,7 @@ void PrintHelp() {
<< " and copy value of the '_FolderID' attribute"<<
std::endl;
std::cerr<<" -pr <x.x.x.x:xxxx> Proxy address "<<std::endl;
std::cerr<<" -pt <http|socks4|socks4a|socks5|socks5dns> Proxy type (default http)"<<std::endl;
std::cerr<<" -pt <http|https|socks4|socks4a|socks5|socks5dns> Proxy type (default http)"<<std::endl;
std::cerr<<" -pu <username> Proxy username"<<std::endl;
std::cerr<<" -pp <password> Proxy password"<<std::endl;
#ifdef _WIN32
Expand Down Expand Up @@ -198,7 +198,11 @@ bool parseCommandLine(int argc, char *argv[])
while(i < argc)
{
char *opt = argv[i];
if(!IuStringUtils::stricmp(opt, "--help"))
if(!IuStringUtils::stricmp(opt, "--help")
#ifdef _WIN32
|| !IuStringUtils::stricmp(opt, "/?")
#endif
)
{
PrintUsage(true);
PrintHelp();
Expand Down
13 changes: 1 addition & 12 deletions Source/Core/Scripting/API/Functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,6 @@ void parseJSONObj(const Json::Value& root, Sqrat::Table& obj) {
}

Sqrat::Object parseJSONObj(const Json::Value& root) {
//SquirrelObject obj;


if (root.isArray()) {
Sqrat::Array obj(GetCurrentThreadVM(), root.size());
for(auto it = root.begin(); it != root.end(); ++it) {
Expand Down Expand Up @@ -422,15 +419,7 @@ std::string GetAppLanguage() {
}

std::string GetAppLocale() {
#ifndef IU_CLI
ITranslator* translator = ServiceLocator::instance()->translator();
if (!translator) {
LOG(ERROR) << "No translator set";
} else {
return ServiceLocator::instance()->translator()->getCurrentLocale();
}
#endif
return "en_US";
return Impl::GetAppLocaleImpl();
}

std::string GetCurrentThreadId()
Expand Down
7 changes: 7 additions & 0 deletions Source/Core/Utils/StringUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,4 +208,11 @@ std::string Join(const std::vector<std::string>& strings, const std::string& del
return result.str();
}

boost::format FormatNoExcept(const std::string& str) {
using namespace boost::io;
boost::format fmter(str);
fmter.exceptions(all_error_bits ^ (too_many_args_bit | too_few_args_bit));
return fmter;
}

}
2 changes: 2 additions & 0 deletions Source/Core/Utils/StringUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <string>
#include <string_view>
#include <vector>
#include <boost/format.hpp>
#include "CoreTypes.h"

namespace IuStringUtils
Expand All @@ -47,6 +48,7 @@ namespace IuStringUtils
int stricmp(const char *s1, const char *s2);
std::string ConvertUnixLineEndingsToWindows(const std::string& text);
size_t LengthOfUtf8String(const std::string &utf8_string);
boost::format FormatNoExcept(const std::string& str);
};

#endif
8 changes: 7 additions & 1 deletion Source/Gui/Controls/HistoryTreeControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <boost/format.hpp>

#include "Core/Utils/CoreUtils.h"
#include "Core/Utils/StringUtils.h"
#include "Core/ServiceLocator.h"
#include "Gui/GuiTools.h"
#include "Func/IuCommonFunctions.h"
Expand Down Expand Up @@ -202,7 +203,12 @@ void CHistoryTreeControl::_DrawItem(TreeItem* item, HDC hdc, DWORD itemState, RE
if (serverName.empty()) {
serverName = tr("unknown server");
}
std::string filesText = str(boost::format(boost::locale::ngettext("%d file", "%d files", ses->entriesCount())) % ses->entriesCount());
std::string filesText;
try {
filesText = str(IuStringUtils::FormatNoExcept(boost::locale::ngettext("%d file", "%d files", ses->entriesCount())) % ses->entriesCount());
} catch (const std::exception& e) {
LOG(ERROR) << e.what();
}
std::string lowText = serverName + " (" + filesText + ")";
CString text = Utf8ToWCstring(label);

Expand Down
7 changes: 4 additions & 3 deletions Source/Gui/Dialogs/MainDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <boost/format.hpp>
#include <shlobj.h>

#include "Core/Utils/StringUtils.h"
#include "Core/Settings/WtlGuiSettings.h"
#include "Func/CmdLine.h"
#include "Func/SystemUtils.h"
Expand Down Expand Up @@ -786,13 +787,13 @@ void CMainDlg::UpdateStatusLabel() {

try {
if (selectedItemsCount) {
std::string first = str(boost::format(boost::locale::ngettext("%d file selected", "%d files selected", selectedItemsCount)) % selectedItemsCount);
std::string second = str(boost::format(boost::locale::ngettext("%d file total", "%d files total", totalCount)) % totalCount);
std::string first = str(IuStringUtils::FormatNoExcept(boost::locale::ngettext("%d file selected", "%d files selected", selectedItemsCount)) % selectedItemsCount);
std::string second = str(IuStringUtils::FormatNoExcept(boost::locale::ngettext("%d file total", "%d files total", totalCount)) % totalCount);

statusText = U2W(str(boost::format("%1%/%2%") % first % second));
}
else {
statusText = U2W(str(boost::format(boost::locale::ngettext("%d file", "%d files", totalCount)) % totalCount));
statusText = U2W(str(IuStringUtils::FormatNoExcept(boost::locale::ngettext("%d file", "%d files", totalCount)) % totalCount));
}
} catch (const std::exception& ex) {
LOG(ERROR) << ex.what();
Expand Down

0 comments on commit d7150dd

Please sign in to comment.