2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-25 14:58:42 +00:00

Move system versions to platform/platform_info.

This commit is contained in:
John Preston
2019-06-03 17:41:23 +03:00
parent 0467401635
commit 9c613fe2f7
56 changed files with 784 additions and 488 deletions

View File

@@ -8,6 +8,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "lang/lang_translator.h"
#include "lang/lang_keys.h"
#include "platform/platform_info.h"
namespace Lang {
@@ -23,8 +24,8 @@ QString Translator::translate(const char *context, const char *sourceText, const
return QString();
}
if (qstr("QWidgetTextControl") == context || qstr("QLineEdit") == context) {
if (qstr("&Undo") == sourceText) return lang((cPlatform() == dbipWindows) ? lng_wnd_menu_undo : ((cPlatform() == dbipMac || cPlatform() == dbipMacOld) ? lng_mac_menu_undo : lng_linux_menu_undo));
if (qstr("&Redo") == sourceText) return lang((cPlatform() == dbipWindows) ? lng_wnd_menu_redo : ((cPlatform() == dbipMac || cPlatform() == dbipMacOld) ? lng_mac_menu_redo : lng_linux_menu_redo));
if (qstr("&Undo") == sourceText) return lang(Platform::IsWindows() ? lng_wnd_menu_undo : (Platform::IsMac() ? lng_mac_menu_undo : lng_linux_menu_undo));
if (qstr("&Redo") == sourceText) return lang(Platform::IsWindows() ? lng_wnd_menu_redo : (Platform::IsMac() ? lng_mac_menu_redo : lng_linux_menu_redo));
if (qstr("Cu&t") == sourceText) return lang(lng_mac_menu_cut);
if (qstr("&Copy") == sourceText) return lang(lng_mac_menu_copy);
if (qstr("&Paste") == sourceText) return lang(lng_mac_menu_paste);