GUI: U32: encode and use c strings for translations in macos dialogs

This commit is contained in:
aryanrawlani28 2020-06-26 01:41:38 +05:30 committed by Eugene Sandulenko
parent 8cfa8a5589
commit e91f968992

View File

@ -82,7 +82,7 @@
#else
CFStringEncoding stringEncoding = kCFStringEncodingASCII;
#endif
CFStringRef hiddenFilesString = CFStringCreateWithCString(0, _("Show hidden files"), stringEncoding);
CFStringRef hiddenFilesString = CFStringCreateWithCString(0, _("Show hidden files").encode().c_str(), stringEncoding);
[showHiddenFilesButton setTitle:(NSString*)hiddenFilesString];
CFRelease(hiddenFilesString);
@ -143,7 +143,7 @@ Common::DialogManager::DialogResult MacOSXDialogManager::showFileBrowser(const c
// Convert labels to NSString
CFStringRef titleRef = CFStringCreateWithCString(0, title, stringEncoding);
CFStringRef chooseRef = CFStringCreateWithCString(0, _("Choose"), stringEncoding);
CFStringRef chooseRef = CFStringCreateWithCString(0, _("Choose").encode().c_str(), stringEncoding);
beginDialog();