rem Translation
copy Build\%PLATFORM%\MergeUnicodeRelease\Languages\*.po "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\Languages\"
-copy Build\%PLATFORM%\MergeUnicodeRelease\MergeLang.dll "%DISTDIR%\%PLATFORMH%zip-version\WinMerge\"
rem Filters
for %%i in (Filters\*.flt Filters\*.tmpl Filters\*.txt) do (
if exist "%SIGNBAT_PATH%" (
call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\WinMergeU.exe
- call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\MergeLang.dll
)
mkdir Build\%PLATFORM%\MergeUnicodeRelease\%APPVER% 2> NUL
if exist "%SIGNBAT_PATH%" (
call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\WinMergeU.exe
- call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\MergeLang.dll
)
mkdir Build\%PLATFORM%\MergeUnicodeRelease\%APPVER% 2> NUL
if exist "%SIGNBAT_PATH%" (
call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\WinMergeU.exe
- call "%SIGNBAT_PATH%" Build\%PLATFORM%\MergeUnicodeRelease\MergeLang.dll
)
mkdir Build\%PLATFORM%\MergeUnicodeRelease\%APPVER% 2> NUL
Source: ..\..\Build\Merge7z\*.txt; DestDir: {app}\Merge7z; Flags: promptifolder; MinVersion: 0, 4; Components: ArchiveSupport\r
Source: ..\..\Build\Merge7z\Lang\*.txt; DestDir: {app}\Merge7z\Lang; Flags: promptifolder; MinVersion: 0, 4; Components: ArchiveSupport\r
\r
-; MergeLang.dll - translation helper dll\r
-Source: ..\..\Build\MergeUnicodeRelease\MergeLang.dll; DestDir: {app}; Flags: promptifolder ignoreversion; Components: Core\r
-\r
; Language files\r
Source: ..\..\Translations\WinMerge\Basque.po; DestDir: {app}\Languages; Components: Languages\Basque; Flags: ignoreversion comparetimestamp\r
Source: ..\..\Translations\Docs\Readme\ReadMe-Basque.txt; DestDir: {app}\Docs; Components: Languages\Basque\r
Source: ..\..\Build\X64\Merge7z\*.txt; DestDir: {app}\Merge7z; Flags: promptifolder; MinVersion: 0, 4; Components: ArchiveSupport\r
Source: ..\..\Build\X64\Merge7z\Lang\*.txt; DestDir: {app}\Merge7z\Lang; Flags: promptifolder; MinVersion: 0, 4; Components: ArchiveSupport\r
\r
-; MergeLang.dll - translation helper dll\r
-Source: ..\..\Build\X64\MergeUnicodeRelease\MergeLang.dll; DestDir: {app}; Flags: promptifolder ignoreversion; Components: Core\r
-\r
; Language files\r
Source: ..\..\Translations\WinMerge\Basque.po; DestDir: {app}\Languages; Components: Languages\Basque; Flags: ignoreversion comparetimestamp\r
Source: ..\..\Translations\Docs\Readme\ReadMe-Basque.txt; DestDir: {app}\Docs; Components: Languages\Basque\r
/** @brief Relative path to WinMerge executable for lang files. */
static const TCHAR szRelativePath[] = _T("Languages");
-static char *EatPrefix(char *text, const char *prefix);
-static void unslash(unsigned codepage, std::string &s);
+template<size_t len>
+static wchar_t *EatPrefix(wchar_t *text, const wchar_t (&prefix)[len]);
+static wchar_t *EatPrefix(wchar_t *text, const wchar_t *prefix);
+static void unslash(std::wstring &s);
static HANDLE NTAPI FindFile(HANDLE h, LPCTSTR path, WIN32_FIND_DATA *fd);
/**
: id(0)
{
FILE *f;
- if (_tfopen_s(&f, path, _T("r")) == 0 && f)
+ if (_tfopen_s(&f, path, _T("r,ccs=utf-8")) == 0 && f)
{
- char buf[1024 + 1];
- while (fgets(buf, sizeof buf - 1, f) != nullptr)
+ wchar_t buf[1024 + 1];
+ while (fgetws(buf, countof(buf) - 1, f) != nullptr)
{
int i = 0;
- strcat_s(buf, "1");
- sscanf_s(buf, "msgid \" LANG_ENGLISH , SUBLANG_ENGLISH_US \" %d", &i);
+ wcscat_s(buf, L"1");
+ swscanf_s(buf, L"msgid \" LANG_ENGLISH , SUBLANG_ENGLISH_US \" %d", &i);
if (i)
{
- if (fgets(buf, sizeof buf, f) != nullptr)
+ if (fgetws(buf, countof(buf), f) != nullptr)
{
- char *lang = strstr(buf, "LANG_");
- char *sublang = strstr(buf, "SUBLANG_");
- char *langNext = nullptr;
- char *sublangNext = nullptr;
+ wchar_t *lang = wcsstr(buf, L"LANG_");
+ wchar_t *sublang = wcsstr(buf, L"SUBLANG_");
+ wchar_t *langNext = nullptr;
+ wchar_t *sublangNext = nullptr;
if (lang && sublang)
{
- strtok_s(lang, ",\" \t\r\n", &langNext);
- strtok_s(sublang, ",\" \t\r\n", &sublangNext);
- lang += sizeof "LANG";
- sublang += sizeof "SUBLANG";
- if (0 != strcmp(sublang, "DEFAULT"))
+ wcstok_s(lang, L",\" \t\r\n", &langNext);
+ wcstok_s(sublang, L",\" \t\r\n", &sublangNext);
+ lang += countof("LANG");
+ sublang += countof("SUBLANG");
+ if (0 != wcscmp(sublang, L"DEFAULT"))
{
sublang = EatPrefix(sublang, lang);
if (sublang && *sublang)
- sublang = EatPrefix(sublang, "_");
+ sublang = EatPrefix(sublang, L"_");
}
if (sublang)
- id = LangId(lang, sublang);
+ id = LangId(std::string(lang, lang + wcslen(lang)).c_str(), std::string(sublang, sublang + wcslen(sublang)).c_str());
}
}
break;
const WORD wSourceLangId = MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US);
CLanguageSelect::CLanguageSelect()
-: m_hCurrentDll(nullptr)
-, m_wCurLanguage(wSourceLangId)
-, m_codepage(0)
+: m_wCurLanguage(wSourceLangId)
{
SetThreadLocale(MAKELCID(m_wCurLanguage, SORT_DEFAULT));
}
* @note Function returns pointer to original string,
* it does not allocate a new string.
*/
-static char *EatPrefix(char *text, const char *prefix)
+static wchar_t *EatPrefix(wchar_t *text, const wchar_t *prefix)
{
- if (size_t len = strlen(prefix))
- if (_memicmp(text, prefix, len) == 0)
+ if (size_t len = wcslen(prefix))
+ if (_memicmp(text, prefix, len * sizeof(wchar_t)) == 0)
return text + len;
return 0;
}
+template<size_t len>
+static wchar_t *EatPrefix(wchar_t *text, const wchar_t (&prefix)[len])
+{
+ if (_memicmp(text, prefix, len * sizeof(wchar_t)) == 0)
+ return text + len;
+ return 0;
+}
+
/**
* @brief Convert C style \\nnn, \\r, \\n, \\t etc into their indicated characters.
* @param [in] codepage Codepage to use in conversion.
* @param [in,out] s String to convert.
*/
-static void unslash(unsigned codepage, std::string &s)
+static void unslash(std::wstring &s)
{
- char *p = &*s.begin();
- char *q = p;
- char c;
+ wchar_t *p = &*s.begin();
+ wchar_t *q = p;
+ wchar_t c;
do
{
- char *r = q + 1;
+ wchar_t *r = q + 1;
switch (c = *q)
{
case '\\':
c = '\v';
break;
case 'x':
- *p = (char)strtol(r, &q, 16);
+ *p = (wchar_t)wcstol(r, &q, 16);
break;
default:
- *p = (char)strtol(r - 1, &q, 8);
+ *p = (wchar_t)wcstol(r - 1, &q, 8);
break;
}
if (q >= r)
// fall through
default:
*p = c;
- if ((*p & 0x80) && IsDBCSLeadByteEx(codepage, *p))
- *++p = *r++;
q = r;
}
++p;
if (strPath.empty())
return false;
- m_hCurrentDll = LoadLibrary(_T("MergeLang.dll"));
- // There is no point in translating error messages about inoperational
- // translation system, so go without string resources here.
- if (m_hCurrentDll == nullptr)
- {
- if (bShowError)
- AfxMessageBox(_T("Failed to load MergeLang.dll"), MB_ICONSTOP);
- return false;
- }
- CVersionInfo viInstance(AfxGetInstanceHandle());
- unsigned instanceVerMS = 0;
- unsigned instanceVerLS = 0;
- viInstance.GetFixedFileVersion(instanceVerMS, instanceVerLS);
- CVersionInfo viResource(m_hCurrentDll);
- unsigned resourceVerMS = 0;
- unsigned resourceVerLS = 0;
- viResource.GetFixedFileVersion(resourceVerMS, resourceVerLS);
- if (instanceVerMS != resourceVerMS || instanceVerLS != resourceVerLS)
- {
- FreeLibrary(m_hCurrentDll);
- m_hCurrentDll = nullptr;
- if (bShowError)
- AfxMessageBox(_T("MergeLang.dll version mismatch"), MB_ICONSTOP);
- return false;
- }
- HRSRC mergepot = FindResource(m_hCurrentDll, _T("MERGEPOT"), RT_RCDATA);
- if (mergepot == nullptr)
- {
- if (bShowError)
- AfxMessageBox(_T("MergeLang.dll is invalid"), MB_ICONSTOP);
- return false;
- }
- size_t size = SizeofResource(m_hCurrentDll, mergepot);
- const char *data = (const char *)LoadResource(m_hCurrentDll, mergepot);
- char buf[1024];
- std::string *ps = nullptr;
- std::string msgid;
+ wchar_t buf[1024];
+ std::wstring *ps = nullptr;
+ std::wstring msgid;
unsigned uid = 0;
bool found_uid = false;
- int unresolved = 0;
- int mismatched = 0;
- while (const char *eol = (const char *)memchr(data, '\n', size))
- {
- size_t len = eol - data;
- if (len >= sizeof buf)
- {
- ASSERT(false);
- break;
- }
- memcpy(buf, data, len);
- buf[len++] = '\0';
- data += len;
- size -= len;
- if (char *p = EatPrefix(buf, "#:"))
- {
- if (char *q = strchr(p, ':'))
- {
- uid = strtoul(q + 1, &q, 16);
- found_uid = true;
- ++unresolved;
- }
- }
- else if (EatPrefix(buf, "msgid "))
- {
- ps = &msgid;
- }
- if (ps != nullptr)
- {
- char *p = strchr(buf, '"');
- char *q = strrchr(buf, '"');
- if (std::string::size_type n = q - p)
- {
- ps->append(p + 1, n - 1);
- }
- else
- {
- ps = nullptr;
- // avoid dereference of empty vector or last vector
- if (found_uid)
- {
- unslash(0, msgid);
- m_map_msgid_to_uid.insert(std::make_pair(msgid, uid));
- m_map_uid_to_msgid.insert(std::make_pair(uid, msgid));
- }
- found_uid = false;
- msgid.erase();
- }
- }
- }
FILE *f;
- if (_tfopen_s(&f, strPath.c_str(), _T("r")) != 0)
+ if (_tfopen_s(&f, strPath.c_str(), _T("r,ccs=UTF-8")) != 0)
{
- FreeLibrary(m_hCurrentDll);
- m_hCurrentDll = nullptr;
if (bShowError)
{
String str = _T("Failed to load ") + strPath;
ps = nullptr;
msgid.erase();
found_uid = false;
- std::string format;
- std::string msgstr;
- std::string directive;
- while (fgets(buf, sizeof buf, f) != nullptr)
+ std::wstring format;
+ std::wstring msgstr;
+ std::wstring directive;
+ while (fgetws(buf, countof(buf), f) != nullptr)
{
- if (char *p0 = EatPrefix(buf, "#:"))
+ if (wchar_t *p0 = EatPrefix(buf, L"#:"))
{
- if (char *q = strchr(p0, ':'))
+ if (wchar_t *q = wcschr(p0, ':'))
{
- uid = strtoul(q + 1, &q, 16);
+ uid = wcstoul(q + 1, &q, 16);
found_uid = true;
- --unresolved;
}
}
- else if (char *p1 = EatPrefix(buf, "#,"))
+ else if (wchar_t *p1 = EatPrefix(buf, L"#,"))
{
format = p1;
- format.erase(0, format.find_first_not_of(" \t\r\n"));
- format.erase(format.find_last_not_of(" \t\r\n") + 1);
+ format.erase(0, format.find_first_not_of(L" \t\r\n"));
+ format.erase(format.find_last_not_of(L" \t\r\n") + 1);
}
- else if (char *p2 = EatPrefix(buf, "#."))
+ else if (wchar_t *p2 = EatPrefix(buf, L"#."))
{
directive = p2;
- directive.erase(0, directive.find_first_not_of(" \t\r\n"));
- directive.erase(directive.find_last_not_of(" \t\r\n") + 1);
+ directive.erase(0, directive.find_first_not_of(L" \t\r\n"));
+ directive.erase(directive.find_last_not_of(L" \t\r\n") + 1);
}
- else if (EatPrefix(buf, "msgid "))
+ else if (EatPrefix(buf, L"msgid "))
{
ps = &msgid;
}
- else if (EatPrefix(buf, "msgstr "))
+ else if (EatPrefix(buf, L"msgstr "))
{
ps = &msgstr;
}
if (ps != nullptr)
{
- char *p = strchr(buf, '"');
- char *q = strrchr(buf, '"');
- if (std::string::size_type n = q - p)
+ wchar_t *p = wcschr(buf, '"');
+ wchar_t *q = wcsrchr(buf, '"');
+ if (std::wstring::size_type n = q - p)
{
ps->append(p + 1, n - 1);
}
{
ps = nullptr;
if (!msgid.empty())
- unslash(0, msgid);
+ unslash(msgid);
if (msgstr.empty())
msgstr = msgid;
- unslash(m_codepage, msgstr);
- // avoid dereference of empty vector or last vector
+ unslash(msgstr);
if (found_uid)
- {
- if (m_map_uid_to_msgid.find(uid) != m_map_uid_to_msgid.end() && m_map_uid_to_msgid.at(uid) == msgid)
- m_map_uid_to_msgid[uid] = msgstr;
- else
- ++mismatched;
- }
+ m_map_msgid_to_msgstr.insert_or_assign(msgid, msgstr);
found_uid = false;
- if (directive == "Codepage")
- {
- m_codepage = strtol(msgstr.c_str(), &p, 10);
- directive.erase();
- }
msgid.erase();
msgstr.erase();
}
}
}
fclose(f);
- if (unresolved != 0 || mismatched != 0)
- {
- FreeLibrary(m_hCurrentDll);
- m_hCurrentDll = nullptr;
- m_map_uid_to_msgid.clear();
- m_map_msgid_to_uid.clear();
- m_codepage = 0;
- if (bShowError)
- {
- String str = _T("Unresolved or mismatched references detected when ")
- _T("attempting to read translations from\n") + strPath;
- AfxMessageBox(str.c_str(), MB_ICONSTOP);
- }
- return false;
- }
return true;
}
return false;
if (m_wCurLanguage == wLangId)
return true;
- // reset the resource handle
- AfxSetResourceHandle(AfxGetInstanceHandle());
- // free the existing DLL
- if (m_hCurrentDll != nullptr)
- {
- FreeLibrary(m_hCurrentDll);
- m_hCurrentDll = nullptr;
- }
- m_map_uid_to_msgid.clear();
- m_map_msgid_to_uid.clear();
- m_codepage = 0;
+ m_map_msgid_to_msgstr.clear();
if (wLangId != wSourceLangId)
{
- if (LoadLanguageFile(wLangId, bShowError))
- AfxSetResourceHandle(m_hCurrentDll);
- else
+ if (!LoadLanguageFile(wLangId, bShowError))
wLangId = wSourceLangId;
}
m_wCurLanguage = wLangId;
/////////////////////////////////////////////////////////////////////////////
// CLanguageSelect commands
-bool CLanguageSelect::TranslateString(unsigned uid, std::string &s) const
+bool CLanguageSelect::TranslateString(const std::wstring& msgid, std::wstring &s) const
{
- if (m_map_uid_to_msgid.find(uid) != m_map_uid_to_msgid.end())
+ if (m_map_msgid_to_msgstr.find(msgid) != m_map_msgid_to_msgstr.end())
{
- s = m_map_uid_to_msgid.at(uid);
- unsigned codepage = GetACP();
- if (m_codepage != codepage)
- {
- // Attempt to convert to UI codepage
- if (size_t len = s.length())
- {
- std::wstring ws;
- ws.resize(len);
- len = MultiByteToWideChar(m_codepage, 0, s.c_str(), -1, &*ws.begin(), static_cast<int>(len) + 1);
- if (len)
- {
- ws.resize(len - 1);
- len = WideCharToMultiByte(codepage, 0, ws.c_str(), -1, 0, 0, 0, 0);
- if (len)
- {
- s.resize(len - 1);
- WideCharToMultiByte(codepage, 0, ws.c_str(), -1, &*s.begin(), static_cast<int>(len), 0, 0);
- }
- }
- }
- }
+ s = m_map_msgid_to_msgstr.at(msgid);
return true;
}
+ s = msgid;
return false;
}
-bool CLanguageSelect::TranslateString(unsigned uid, std::wstring &ws) const
+bool CLanguageSelect::TranslateString(const std::string& msgid, String& s) const
{
- if (m_map_uid_to_msgid.find(uid) != m_map_uid_to_msgid.end())
- {
- if (size_t len = m_map_uid_to_msgid.at(uid).length())
- {
- ws.resize(len);
- const char *msgstr = m_map_uid_to_msgid.at(uid).c_str();
- len = MultiByteToWideChar(m_codepage, 0, msgstr, -1, &*ws.begin(), static_cast<int>(len) + 1);
- ws.resize(len - 1);
- return true;
- }
- }
- return false;
-}
-
-bool CLanguageSelect::TranslateString(const std::string& str, String &translated_str) const
-{
- EngMsgIDToUIDMap::const_iterator it = m_map_msgid_to_uid.find(str);
- if (it != m_map_msgid_to_uid.end())
- {
- return TranslateString(it->second, translated_str);
- }
- translated_str = ucr::toTString(str);
- return false;
+#ifdef _UNICODE
+ bool result = TranslateString(std::wstring(msgid.begin(), msgid.end()), s);
+#else
+ bool result = TranslateString(std::wstring(msgid.begin(), msgid.end()), ws);
+ s = ucr::toTString(ws);
+#endif
+ return result;
}
void CLanguageSelect::SetIndicators(CStatusBar &sb, const UINT *rgid, int n) const
{
if (LPCWSTR text = pItemData->GetWideString())
{
- unsigned uid = 0;
- swscanf_s(text, L"Merge.rc:%x", &uid);
std::wstring s;
- if (TranslateString(uid, s))
+ if (TranslateString(text, s))
pItemData->SetWideString(s.c_str());
}
}
- TCHAR text[80];
- if (::GetMenuString(h, i, text, countof(text), MF_BYPOSITION))
+ wchar_t text[80];
+ if (::GetMenuStringW(h, i, text, countof(text), MF_BYPOSITION))
{
- unsigned uid = 0;
- _stscanf_s(text, _T("Merge.rc:%x"), &uid);
- String s;
- if (TranslateString(uid, s))
- ::ModifyMenu(h, i, mii.fState | MF_BYPOSITION, mii.wID, s.c_str());
+ std::wstring s;
+ if (TranslateString(text, s))
+ ::ModifyMenuW(h, i, mii.fState | MF_BYPOSITION, mii.wID, s.c_str());
}
}
}
UINT gw = GW_CHILD;
do
{
- TCHAR text[80];
- ::GetWindowText(h, text, countof(text));
- unsigned uid = 0;
- _stscanf_s(text, _T("Merge.rc:%x"), &uid);
- String s;
- if (TranslateString(uid, s))
- ::SetWindowText(h, s.c_str());
+ wchar_t text[512];
+ ::GetWindowTextW(h, text, countof(text));
+ std::wstring s;
+ if (TranslateString(text, s))
+ ::SetWindowTextW(h, s.c_str());
h = ::GetWindow(h, gw);
gw = GW_HWNDNEXT;
} while (h != nullptr);
reinterpret_cast<WORD*>((reinterpret_cast<DWORD_PTR>(pw) + 3) & ~DWORD_PTR(3))); // DWORD align
};
- bool english = false;
- HMODULE hModule = m_hCurrentDll;
- if (hModule == nullptr)
+ DLGTEMPLATEEX *pTemplate = nullptr;
+ if ((pTemplate = loadDialogResource(AfxGetInstanceHandle(), name)) != nullptr)
{
- hModule = LoadLibrary(_T("MergeLang.dll"));
- english = true;
- }
- if (hModule != nullptr)
- {
- if (DLGTEMPLATEEX* pTemplate = loadDialogResource(hModule, name))
+ HWND hWndChlid = ::GetWindow(h, GW_CHILD);
+ const DLGITEMTEMPLATEEX *pItem = findFirstDlgItem(pTemplate);
+ for (int nDlgItems = 0; nDlgItems < pTemplate->cDlgItems; ++nDlgItems)
{
- DLGTEMPLATEEX *pTemplateEng = nullptr;
- if (!english || (pTemplateEng = loadDialogResource(AfxGetInstanceHandle(), name)) != nullptr)
- {
- HWND hWndChlid = ::GetWindow(h, GW_CHILD);
- const DLGITEMTEMPLATEEX *pItem = findFirstDlgItem(pTemplate);
- const DLGITEMTEMPLATEEX *pItemEng = pTemplateEng ? findFirstDlgItem(pTemplateEng) : nullptr;
- for (int nDlgItems = 0; nDlgItems < pTemplate->cDlgItems; ++nDlgItems)
- {
- const WORD *pw = reinterpret_cast<const WORD *>(pItem);
- pw += sizeof(DLGITEMTEMPLATEEX) / sizeof(WORD);
- skip(pw); // Skip class name string or ordinal
-
- if (*pw == static_cast<WORD>(-1)) // Skip text string or ordinal
- pw += 2;
- else
- {
- const wchar_t *p = reinterpret_cast<const wchar_t*>(pw);
- if (wcsncmp(p, L"Merge.rc:", 9) == 0)
- {
- if (pItemEng != nullptr)
- {
- const WORD *pw2 = reinterpret_cast<const WORD *>(pItemEng);
- pw2 += sizeof(DLGITEMTEMPLATEEX) / sizeof(WORD);
- skip(pw2); // Skip class name string or ordinal
- const wchar_t *peng = reinterpret_cast<const wchar_t *>(pw2);
- ::SetWindowText(hWndChlid, peng);
- }
- else
- {
- ::SetWindowText(hWndChlid, p);
- }
- }
- while (*pw++);
- }
+ const WORD *pw = reinterpret_cast<const WORD *>(pItem);
+ pw += sizeof(DLGITEMTEMPLATEEX) / sizeof(WORD);
+ skip(pw); // Skip class name string or ordinal
- hWndChlid = ::GetWindow(hWndChlid, GW_HWNDNEXT);
- pItem = findNextDlgItem(pItem);
- if (pItemEng != nullptr)
- pItemEng = findNextDlgItem(pItemEng);
- }
+ if (*pw == static_cast<WORD>(-1)) // Skip text string or ordinal
+ pw += 2;
+ else
+ {
+ const wchar_t *p = reinterpret_cast<const wchar_t*>(pw);
+ ::SetWindowTextW(hWndChlid, p);
+ while (*pw++);
}
+
+ hWndChlid = ::GetWindow(hWndChlid, GW_HWNDNEXT);
+ pItem = findNextDlgItem(pItem);
}
- if (english)
- FreeLibrary(hModule);
- else
- TranslateDialog(h);
}
+ TranslateDialog(h);
}
String CLanguageSelect::LoadString(UINT id) const
String s;
if (id)
{
- TCHAR text[1024];
+ wchar_t text[1024];
AfxLoadString(id, text, countof(text));
- unsigned uid = 0;
- _stscanf_s(text, _T("Merge.rc:%x"), &uid);
- if (!TranslateString(uid, s))
+ if (!TranslateString(text, s))
s = text;
}
return s;
else
while (*text++);
// Caption string is ahead
- unsigned uid = 0;
- swscanf_s(text, L"Merge.rc:%x", &uid);
- if (!TranslateString(uid, s))
+ if (!TranslateString(text, s))
s = text;
}
}
String GetFileName(LANGID) const;
void InitializeLanguage(WORD langID);
- bool TranslateString(unsigned uid, std::string &) const;
- bool TranslateString(unsigned uid, std::wstring &) const;
- bool TranslateString(const std::string&, String &) const;
+ bool TranslateString(const std::wstring&, std::wstring&) const;
+ bool TranslateString(const std::string&, String&) const;
void SetIndicators(CStatusBar &, const UINT *, int) const;
void TranslateMenu(HMENU) const;
void TranslateDialog(HWND) const;
// Implementation data
private:
- HINSTANCE m_hCurrentDll;
LANGID m_wCurLanguage;
- std::map<unsigned, std::string> m_map_uid_to_msgid;
- typedef std::map<std::string, unsigned> EngMsgIDToUIDMap;
- EngMsgIDToUIDMap m_map_msgid_to_uid;
- unsigned m_codepage;
+ std::map<std::wstring, std::wstring> m_map_msgid_to_msgstr;
// Implementation methods
private:
bool LoadLanguageFile(LANGID, bool bShowError = false);
FileWriteString(_T( " WinMerge: Path names are relative to the Code File's directory.\r\n"));
WriteVersionOf1(2, _T(".\\ShellExtensionU.dll"));
WriteVersionOf1(2, _T(".\\ShellExtensionX64.dll"));
- WriteVersionOf1(2, _T(".\\MergeLang.dll"));
WriteVersionOf1(2, _T(".\\Frhed\\hekseditU.dll"));
WriteVersionOf1(2, _T(".\\WinIMerge\\WinIMergeLib.dll"));
WriteVersionOf1(2, _T(".\\Merge7z\\7z.dll"));
+++ /dev/null
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
- <ItemGroup Label="ProjectConfigurations">\r
- <ProjectConfiguration Include="UnicodeDebug|Win32">\r
- <Configuration>UnicodeDebug</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="UnicodeDebug|x64">\r
- <Configuration>UnicodeDebug</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="UnicodeRelease|Win32">\r
- <Configuration>UnicodeRelease</Configuration>\r
- <Platform>Win32</Platform>\r
- </ProjectConfiguration>\r
- <ProjectConfiguration Include="UnicodeRelease|x64">\r
- <Configuration>UnicodeRelease</Configuration>\r
- <Platform>x64</Platform>\r
- </ProjectConfiguration>\r
- </ItemGroup>\r
- <PropertyGroup Label="Globals">\r
- <ProjectName>MergeLang</ProjectName>\r
- <ProjectGuid>{4B011DDA-2279-437D-903C-8028913AF31B}</ProjectGuid>\r
- <RootNamespace>MergeLang</RootNamespace>\r
- <Keyword>Win32Proj</Keyword>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v141_xp</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v141</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v141_xp</PlatformToolset>\r
- </PropertyGroup>\r
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'" Label="Configuration">\r
- <ConfigurationType>DynamicLibrary</ConfigurationType>\r
- <CharacterSet>Unicode</CharacterSet>\r
- <PlatformToolset>v141</PlatformToolset>\r
- </PropertyGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
- <ImportGroup Label="ExtensionSettings">\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <ImportGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'" Label="PropertySheets">\r
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
- </ImportGroup>\r
- <PropertyGroup Label="UserMacros" />\r
- <PropertyGroup>\r
- <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Build\MergeUnicodeDebug\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">true</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Build\MergeUnicodeRelease\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">false</LinkIncremental>\r
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>\r
- <IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>\r
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">false</LinkIncremental>\r
- </PropertyGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">\r
- <PreBuildEvent>\r
- <Command>\r
- </Command>\r
- </PreBuildEvent>\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\r
- </ClCompile>\r
- <Link>\r
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>\r
- <SubSystem>Windows</SubSystem>\r
- <NoEntryPoint>true</NoEntryPoint>\r
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- <PostBuildEvent>\r
- <Command>pushd $(ProjectDir)..\Translations\WinMerge\r
-cscript UpdatePoFilesFromPotFile.vbs\r
-popd\r
-mkdir $(OutDir)\Languages\ 2> NUL\r
-copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>\r
- </PostBuildEvent>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">\r
- <PreBuildEvent>\r
- <Command>\r
- </Command>\r
- </PreBuildEvent>\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <Optimization>Disabled</Optimization>\r
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <MinimalRebuild>true</MinimalRebuild>\r
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\r
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- <Link>\r
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>\r
- <SubSystem>Windows</SubSystem>\r
- <NoEntryPoint>true</NoEntryPoint>\r
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>\r
- <TargetMachine>MachineX64</TargetMachine>\r
- </Link>\r
- <PostBuildEvent>\r
- <Command>pushd $(ProjectDir)..\Translations\WinMerge\r
-cscript UpdatePoFilesFromPotFile.vbs\r
-popd\r
-mkdir $(OutDir)\Languages\ 2> NUL\r
-copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>\r
- </PostBuildEvent>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">\r
- <PreBuildEvent>\r
- <Command>\r
- </Command>\r
- </PreBuildEvent>\r
- <ClCompile>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- <Link>\r
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <NoEntryPoint>true</NoEntryPoint>\r
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>\r
- <TargetMachine>MachineX86</TargetMachine>\r
- </Link>\r
- <PostBuildEvent>\r
- <Command>pushd $(ProjectDir)..\Translations\WinMerge\r
-cscript UpdatePoFilesFromPotFile.vbs\r
-popd\r
-mkdir $(OutDir)\Languages\ 2> NUL\r
-copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"\r
-</Command>\r
- </PostBuildEvent>\r
- </ItemDefinitionGroup>\r
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">\r
- <PreBuildEvent>\r
- <Command>\r
- </Command>\r
- </PreBuildEvent>\r
- <Midl>\r
- <TargetEnvironment>X64</TargetEnvironment>\r
- </Midl>\r
- <ClCompile>\r
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
- <PrecompiledHeader>\r
- </PrecompiledHeader>\r
- <WarningLevel>Level3</WarningLevel>\r
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\r
- </ClCompile>\r
- <Link>\r
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>\r
- <GenerateDebugInformation>true</GenerateDebugInformation>\r
- <SubSystem>Windows</SubSystem>\r
- <OptimizeReferences>true</OptimizeReferences>\r
- <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
- <NoEntryPoint>true</NoEntryPoint>\r
- <RandomizedBaseAddress>false</RandomizedBaseAddress>\r
- <DataExecutionPrevention>\r
- </DataExecutionPrevention>\r
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>\r
- <TargetMachine>MachineX64</TargetMachine>\r
- </Link>\r
- <PostBuildEvent>\r
- <Command>pushd $(ProjectDir)..\Translations\WinMerge\r
-cscript UpdatePoFilesFromPotFile.vbs\r
-popd\r
-mkdir $(OutDir)\Languages\ 2> NUL\r
-copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>\r
- </PostBuildEvent>\r
- </ItemDefinitionGroup>\r
- <ItemGroup>\r
- <CustomBuild Include="Merge.rc">\r
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">cd ..\Translations\WinMerge\r
-cscript CreateMasterPotFile.vbs\r
-</Command>\r
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>\r
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">cd ..\Translations\WinMerge\r
-cscript CreateMasterPotFile.vbs\r
-</Command>\r
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>\r
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">cd ..\Translations\WinMerge\r
-cscript CreateMasterPotFile.vbs\r
-</Command>\r
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>\r
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">cd ..\Translations\WinMerge\r
-cscript CreateMasterPotFile.vbs\r
-</Command>\r
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>\r
- </CustomBuild>\r
- <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">\r
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\r
- </ResourceCompile>\r
- </ItemGroup>\r
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
- <ImportGroup Label="ExtensionTargets">\r
- </ImportGroup>\r
-</Project>
\ No newline at end of file
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
</PropertyGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Build\MergeUnicodeDebug\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Build\MergeUnicodeRelease\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">false</LinkIncremental>
</PropertyGroup>
<Command>
</Command>
</PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
<PostBuildEvent>
- <Command>pushd $(ProjectDir)..\Translations\WinMerge
-cscript UpdatePoFilesFromPotFile.vbs
-popd
-mkdir $(OutDir)\Languages\ 2> NUL
+ <Command>mkdir $(OutDir)\Languages\ 2> NUL
copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
<PostBuildEvent>
<Command>pushd $(ProjectDir)..\Translations\WinMerge
cscript UpdatePoFilesFromPotFile.vbs
<Command>
</Command>
</PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
<PostBuildEvent>
<Command>pushd $(ProjectDir)..\Translations\WinMerge
cscript UpdatePoFilesFromPotFile.vbs
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
<PostBuildEvent>
<Command>pushd $(ProjectDir)..\Translations\WinMerge
cscript UpdatePoFilesFromPotFile.vbs
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="Merge.rc">
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">cd ..\Translations\WinMerge
+ <Command>pushd ..\Translations\WinMerge
+
cscript CreateMasterPotFile.vbs
+cscript UpdatePoFilesFromPotFile.vbs
+popd
</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
+ <Outputs>$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
</CustomBuild>
- <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\Translations\WinMerge\CreateMasterPotFile.vbs" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
</Filter>
</ItemGroup>
<ItemGroup>
- <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
- <Filter>Resource FIles</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
<CustomBuild Include="Merge.rc">
<Filter>Resource FIles</Filter>
</CustomBuild>
<ProjectGuid>{4B011DDA-2279-437D-903C-8028913AF31B}</ProjectGuid>
<RootNamespace>MergeLang</RootNamespace>
<Keyword>Win32Proj</Keyword>
- <WindowsTargetPlatformVersion>10.0.17134.0</WindowsTargetPlatformVersion>
+ <WindowsTargetPlatformVersion>7.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141_xp</PlatformToolset>
- <XPDeprecationWarning>false</XPDeprecationWarning>
+ <XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141_xp</PlatformToolset>
- <XPDeprecationWarning>false</XPDeprecationWarning>
+ <XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141_xp</PlatformToolset>
- <XPDeprecationWarning>false</XPDeprecationWarning>
+ <XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141_xp</PlatformToolset>
- <XPDeprecationWarning>false</XPDeprecationWarning>
+ <XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Build\MergeUnicodeDebug\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Build\MergeUnicodeRelease\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">false</LinkIncremental>
</PropertyGroup>
<Command>
</Command>
</PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
<PostBuildEvent>
- <Command>pushd $(ProjectDir)..\Translations\WinMerge
-cscript UpdatePoFilesFromPotFile.vbs
-popd
-mkdir $(OutDir)\Languages\ 2> NUL
+ <Command>mkdir $(OutDir)\Languages\ 2> NUL
copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
<PostBuildEvent>
<Command>pushd $(ProjectDir)..\Translations\WinMerge
cscript UpdatePoFilesFromPotFile.vbs
<Command>
</Command>
</PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
<PostBuildEvent>
<Command>pushd $(ProjectDir)..\Translations\WinMerge
cscript UpdatePoFilesFromPotFile.vbs
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
<PostBuildEvent>
<Command>pushd $(ProjectDir)..\Translations\WinMerge
cscript UpdatePoFilesFromPotFile.vbs
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="Merge.rc">
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">cd ..\Translations\WinMerge
+ <Command>pushd ..\Translations\WinMerge
+
cscript CreateMasterPotFile.vbs
+cscript UpdatePoFilesFromPotFile.vbs
+popd
</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
+ <Outputs>$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
</CustomBuild>
- <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\Translations\WinMerge\CreateMasterPotFile.vbs" />
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <None Include="..\Translations\WinMerge\CreateMasterPotFile.vbs">
- <Filter>VBS Scripts</Filter>
- </None>
- <None Include="..\Translations\WinMerge\UpdatePoFilesFromPotFile.vbs">
- <Filter>VBS Scripts</Filter>
- </None>
- </ItemGroup>
- <ItemGroup>
- <Filter Include="VBS Scripts">
- <UniqueIdentifier>{51a3b56c-eeee-43c9-a0e7-c2561a2e74fe}</UniqueIdentifier>
- </Filter>
- <Filter Include="Resource FIles">
- <UniqueIdentifier>{6ed17c4f-f8ad-4783-b08d-accd2076a66b}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
- <Filter>Resource FIles</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
- <CustomBuild Include="Merge.rc">
- <Filter>Resource FIles</Filter>
- </CustomBuild>
- </ItemGroup>
+<?xml version="1.0" encoding="utf-8"?>\r
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
+ <ItemGroup>\r
+ <None Include="..\Translations\WinMerge\CreateMasterPotFile.vbs">\r
+ <Filter>VBS Scripts</Filter>\r
+ </None>\r
+ <None Include="..\Translations\WinMerge\UpdatePoFilesFromPotFile.vbs">\r
+ <Filter>VBS Scripts</Filter>\r
+ </None>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <Filter Include="VBS Scripts">\r
+ <UniqueIdentifier>{51a3b56c-eeee-43c9-a0e7-c2561a2e74fe}</UniqueIdentifier>\r
+ </Filter>\r
+ <Filter Include="Resource FIles">\r
+ <UniqueIdentifier>{6ed17c4f-f8ad-4783-b08d-accd2076a66b}</UniqueIdentifier>\r
+ </Filter>\r
+ </ItemGroup>\r
+ <ItemGroup>\r
+ <CustomBuild Include="Merge.rc">\r
+ <Filter>Resource FIles</Filter>\r
+ </CustomBuild>\r
+ </ItemGroup>\r
</Project>
\ No newline at end of file
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141_xp</PlatformToolset>
- <XPDeprecationWarning>false</XPDeprecationWarning>
+ <XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141_xp</PlatformToolset>
- <XPDeprecationWarning>false</XPDeprecationWarning>
+ <XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141_xp</PlatformToolset>
- <XPDeprecationWarning>false</XPDeprecationWarning>
+ <XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'" Label="Configuration">
- <ConfigurationType>DynamicLibrary</ConfigurationType>
+ <ConfigurationType>Utility</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v141_xp</PlatformToolset>
- <XPDeprecationWarning>false</XPDeprecationWarning>
+ <XPDeprecationWarning>false</XPDeprecationWarning>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Build\MergeUnicodeDebug\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">true</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Build\MergeUnicodeRelease\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">.\..\BuildTmp\MergeLang\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">false</LinkIncremental>
- <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Build\$(Platform)\Merge$(Configuration)\</OutDir>
+ <OutDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\Translations\WinMerge\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">.\..\BuildTmp\MergeLang\$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">false</LinkIncremental>
</PropertyGroup>
<Command>
</Command>
</PreBuildEvent>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>EditAndContinue</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
<PostBuildEvent>
- <Command>pushd $(ProjectDir)..\Translations\WinMerge
-cscript UpdatePoFilesFromPotFile.vbs
-popd
-mkdir $(OutDir)\Languages\ 2> NUL
+ <Command>mkdir $(OutDir)\Languages\ 2> NUL
copy /Y "$(ProjectDir)..\Translations\WinMerge\*.po" "$(OutDir)\Languages\"</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
- <ClCompile>
- <Optimization>Disabled</Optimization>
- <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <MinimalRebuild>true</MinimalRebuild>
- <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
- <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <ProgramDatabaseFile>$(OutDir)MergeLang.pdb</ProgramDatabaseFile>
- <SubSystem>Windows</SubSystem>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
<PostBuildEvent>
<Command>pushd $(ProjectDir)..\Translations\WinMerge
cscript UpdatePoFilesFromPotFile.vbs
<Command>
</Command>
</PreBuildEvent>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX86</TargetMachine>
- </Link>
<PostBuildEvent>
<Command>pushd $(ProjectDir)..\Translations\WinMerge
cscript UpdatePoFilesFromPotFile.vbs
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
- <ClCompile>
- <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MERGELANG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
- <PrecompiledHeader>
- </PrecompiledHeader>
- <WarningLevel>Level3</WarningLevel>
- <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
- </ClCompile>
- <Link>
- <OutputFile>$(OutDir)MergeLang.dll</OutputFile>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <SubSystem>Windows</SubSystem>
- <OptimizeReferences>true</OptimizeReferences>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <NoEntryPoint>true</NoEntryPoint>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
- <DataExecutionPrevention>
- </DataExecutionPrevention>
- <ImportLibrary>$(OutDir)MergeLang.lib</ImportLibrary>
- <TargetMachine>MachineX64</TargetMachine>
- </Link>
<PostBuildEvent>
<Command>pushd $(ProjectDir)..\Translations\WinMerge
cscript UpdatePoFilesFromPotFile.vbs
</ItemDefinitionGroup>
<ItemGroup>
<CustomBuild Include="Merge.rc">
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">cd ..\Translations\WinMerge
-cscript CreateMasterPotFile.vbs
-</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|Win32'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
- <Command Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">cd ..\Translations\WinMerge
+ <Command>pushd ..\Translations\WinMerge
+
cscript CreateMasterPotFile.vbs
+cscript UpdatePoFilesFromPotFile.vbs
+popd
</Command>
- <Outputs Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
+ <Outputs>$(ProjectDir)..\Translations\WinMerge\English.pot</Outputs>
</CustomBuild>
- <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeDebug|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='UnicodeRelease|x64'">$(ProjectDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- </ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="..\Translations\WinMerge\CreateMasterPotFile.vbs" />
</Filter>
</ItemGroup>
<ItemGroup>
- <ResourceCompile Include="..\Translations\WinMerge\MergeLang.rc">
- <Filter>Resource FIles</Filter>
- </ResourceCompile>
- </ItemGroup>
- <ItemGroup>
<CustomBuild Include="Merge.rc">
<Filter>Resource FIles</Filter>
</CustomBuild>
Const PATH_ENGLISH_POT = "English.pot"
Const PATH_MERGE_RC = "../../Src/Merge.rc"
-Const PATH_MERGELANG_RC = "MergeLang.rc"
Dim oFSO, bRunFromCmd, bInsertLineNumbers
InfoBox "Creating POT file from Merge.rc...", 3
bNecessary = True
- If (oFSO.FileExists(PATH_ENGLISH_POT) = True) And (oFSO.FileExists(PATH_MERGELANG_RC) = True) Then 'If the POT and RC file exists...
- bNecessary = GetArchiveBit(PATH_MERGE_RC) Or GetArchiveBit(PATH_ENGLISH_POT) Or GetArchiveBit(PATH_MERGELANG_RC) 'RCs or POT file changed?
+ If (oFSO.FileExists(PATH_ENGLISH_POT) = True) Then 'If the POT file exists...
+ bNecessary = GetArchiveBit(PATH_MERGE_RC) Or GetArchiveBit(PATH_ENGLISH_POT) 'RCs or POT file changed?
End If
If (bNecessary = True) Then 'If update necessary...
CreateMasterPotFile PATH_ENGLISH_POT, oStrings
SetArchiveBit PATH_MERGE_RC, False
SetArchiveBit PATH_ENGLISH_POT, False
- SetArchiveBit PATH_MERGELANG_RC, False
For Each oFile In oFSO.GetFolder(".").Files 'For all files in the current folder...
If (LCase(oFSO.GetExtensionName(oFile.Name)) = "po") Then 'If a PO file...
SetArchiveBit oFile.Path, True
Function GetStringsFromRcFile(ByVal sRcFilePath)
Dim oBlacklist, oStrings, oString, oRcFile, sLine, iLine, oUIDs
Dim sRcFileName, iBlockType, sReference, sString, sComment, sContext, oMatch, sTemp, sKey
- Dim oLcFile, sLcLine, fContinuation
+ Dim fContinuation
Set oBlacklist = GetStringBlacklist("StringBlacklist.txt")
iLine = 0
iBlockType = NO_BLOCK
Set oRcFile = oFSO.OpenTextFile(sRcFilePath, ForReading)
- Set oLcFile = oFSO.CreateTextFile("MergeLang.rc", True)
Do Until oRcFile.AtEndOfStream = True 'For all lines...
- sLcLine = oRcFile.ReadLine
- sLine = Trim(sLcLine)
+ sLine = Trim(oRcFile.ReadLine)
iLine = iLine + 1
sReference = sRcFileName & ":" & iLine
sTemp = oMatch.SubMatches(0)
If (sTemp <> "") And (oBlacklist.Exists(sTemp) = False) Then 'If NOT blacklisted...
sString = Replace(sTemp, """""", "\""")
- If bInsertLineNumbers Then
- sLcLine = Replace(sLcLine, """" & sTemp & """", """" & sReference & """", 1, 1)
- Else
- sLcLine = Replace(sLcLine, """" & sTemp & """", """" & sRcFileName & ":" & Hex(GetUniqueId(oUIDs, sString)) & """", 1, 1)
- End If
If (FoundRegExpMatch(sLine, "//#\. (.*?)$", oMatch) = True) Then 'If found a comment for the translators...
sComment = Trim(oMatch.SubMatches(0))
ElseIf (FoundRegExpMatch(sLine, "//msgctxt (.*?)$", oMatch) = True) Then 'If found a context for the translation...
Else
oString.References = sReference
End If
- End If
+ End If
oString.Context = sContext
oString.Id = sString
oString.Str = ""
oStrings.Add sContext & sString, oString
End If
End If
- oLcFile.WriteLine sLcLine
fContinuation = sLine <> "" And InStr(",|", Right(sLine, 1)) <> 0
Loop
- oLcFile.WriteLine "MERGEPOT RCDATA ""English.pot"""
oRcFile.Close
- oLcFile.Close
End If
Set GetStringsFromRcFile = oStrings
End Function
msgstr ""
"Project-Id-Version: WinMerge\n"
"Report-Msgid-Bugs-To: http://bugs.winmerge.org/\n"
-"POT-Creation-Date: 2019-01-07 22:08+0000\n"
+"POT-Creation-Date: 2019-01-14 01:56+0000\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: English <winmerge-translate@lists.sourceforge.net>\n"