GUI: U32: Convert majority of code to use U32
This commit also includes some additional major changes. - Return U32String from TransMan getTranslation() - Change tooltips to be U32Strings - Remove temporary code of convertToU32String - U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc) - U32 for music plugins - U32 for OSD messages - Add some helper functions to ustr.cpp - Change default tooltips from nullptr & 0 -> "" - Some runtime exceptions may occur when changing languages due to incorrect String::Format
This commit is contained in:
parent
aa33fc2354
commit
f800ca4ada
91 changed files with 836 additions and 714 deletions
|
@ -56,7 +56,7 @@ void FilesAjaxPageHandler::handle(Client &client) {
|
|||
// load stylish response page from the archive
|
||||
Common::SeekableReadStream *const stream = HandlerUtils::getArchiveFile(FILES_PAGE_NAME);
|
||||
if (stream == nullptr) {
|
||||
HandlerUtils::setFilesManagerErrorMessageHandler(client, HandlerUtils::toUtf8(_("The page is not available without the resources. Make sure file wwwroot.zip from ScummVM distribution is available in 'themepath'.")));
|
||||
HandlerUtils::setFilesManagerErrorMessageHandler(client, Common::convertFromU32String(_("The page is not available without the resources. Make sure file wwwroot.zip from ScummVM distribution is available in 'themepath'.")));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -64,16 +64,16 @@ void FilesAjaxPageHandler::handle(Client &client) {
|
|||
Common::String path = client.queryParameter("path");
|
||||
|
||||
//these occur twice:
|
||||
replace(response, "{create_directory_button}", HandlerUtils::toUtf8(_("Create directory")));
|
||||
replace(response, "{create_directory_button}", HandlerUtils::toUtf8(_("Create directory")));
|
||||
replace(response, "{upload_files_button}", HandlerUtils::toUtf8(_("Upload files"))); //tab
|
||||
replace(response, "{upload_file_button}", HandlerUtils::toUtf8(_("Upload files"))); //button in the tab
|
||||
replace(response, "{create_directory_desc}", HandlerUtils::toUtf8(_("Type new directory name:")));
|
||||
replace(response, "{upload_file_desc}", HandlerUtils::toUtf8(_("Select a file to upload:")));
|
||||
replace(response, "{or_upload_directory_desc}", HandlerUtils::toUtf8(_("Or select a directory (works in Chrome only):")));
|
||||
replace(response, "{index_of}", HandlerUtils::toUtf8(_("Index of ")));
|
||||
replace(response, "{create_directory_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Create directory")).c_str()));
|
||||
replace(response, "{create_directory_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Create directory")).c_str()));
|
||||
replace(response, "{upload_files_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Upload files")).c_str())); //tab
|
||||
replace(response, "{upload_file_button}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Upload files")).c_str())); //button in the tab
|
||||
replace(response, "{create_directory_desc}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Type new directory name:")).c_str()));
|
||||
replace(response, "{upload_file_desc}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Select a file to upload:")).c_str()));
|
||||
replace(response, "{or_upload_directory_desc}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Or select a directory (works in Chrome only):")).c_str()));
|
||||
replace(response, "{index_of}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Index of ")).c_str()));
|
||||
replace(response, "{loading}", HandlerUtils::toUtf8(("Loading...")));
|
||||
replace(response, "{error}", HandlerUtils::toUtf8(_("Error occurred")));
|
||||
replace(response, "{error}", HandlerUtils::toUtf8(Common::convertFromU32String(_("Error occurred")).c_str()));
|
||||
replace(response, "{start_path}", encodeDoubleQuotesAndSlashes(path));
|
||||
LocalWebserver::setClientGetHandler(client, response);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue