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; int majorVer, minorVer;
wxGetOsVersion(&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; wxString osName;
if (majorVer == 10) if (majorVer == 10)
{ {
switch (minorVer) switch (minorVer)
{ {
case 7: case 7:
osName = _("Lion"); osName = "Lion";
// 10.7 was the last version where the "Mac" prefix was used // 10.7 was the last version where the "Mac" prefix was used
osBrand = _("Mac OS X"); osBrand = "Mac OS X";
break; break;
case 8: case 8:
osName = _("Mountain Lion"); osName = "Mountain Lion";
break; break;
case 9: case 9:
osName = _("Mavericks"); osName = "Mavericks";
break; break;
case 10: case 10:
osName = _("Yosemite"); osName = "Yosemite";
break; break;
case 11: case 11:
osName = _("El Capitan"); osName = "El Capitan";
break; break;
}; };
} }