Don't translate OS X codenames in wxGetOsDescription()

OS X itself doesn't seem to do it.

See https://github.com/wxWidgets/wxWidgets/pull/76#issuecomment-138067426
This commit is contained in:
Vadim Zeitlin 2015-09-06 14:24:17 +02:00
parent d9761208e5
commit 8b2dc19dbb

View File

@ -681,28 +681,31 @@ wxString wxGetOsDescription()
int majorVer, minorVer;
wxGetOsVersion(&majorVer, &minorVer);
wxString osBrand = _("OS X");
// Notice that neither the OS name itself nor the code names seem to be
// ever translated, OS X itself uses the English words even for the
// languages not using Roman alphabet.
wxString osBrand = "OS X";
wxString osName;
if (majorVer == 10)
{
switch (minorVer)
{
case 7:
osName = _("Lion");
osName = "Lion";
// 10.7 was the last version where the "Mac" prefix was used
osBrand = _("Mac OS X");
osBrand = "Mac OS X";
break;
case 8:
osName = _("Mountain Lion");
osName = "Mountain Lion";
break;
case 9:
osName = _("Mavericks");
osName = "Mavericks";
break;
case 10:
osName = _("Yosemite");
osName = "Yosemite";
break;
case 11:
osName = _("El Capitan");
osName = "El Capitan";
break;
};
}