fix LocalizedString::Load doesn't fill the value
Localize loading messages
This commit is contained in:
@@ -51,7 +51,9 @@ void LocalizedString::Load( const RString &sSection, const RString &sName )
|
|||||||
{
|
{
|
||||||
m_sSection = sSection;
|
m_sSection = sSection;
|
||||||
m_sName = sName;
|
m_sName = sName;
|
||||||
m_sValue = sName;
|
m_sValue = "????";
|
||||||
|
|
||||||
|
Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
LocalizedString::operator RString() const
|
LocalizedString::operator RString() const
|
||||||
|
|||||||
@@ -56,6 +56,8 @@ int NetworkSyncManager::GetSMOnlineSalt()
|
|||||||
return m_iSalt;
|
return m_iSalt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LocalizedString INITIALIZING_SERVER ( "NetworkSyncManager", "Initializing server..." );
|
||||||
|
static LocalizedString INITIALIZING_CLIENT_NETWORK ( "NetworkSyncManager", "Initializing Client Network..." );
|
||||||
NetworkSyncManager::NetworkSyncManager( LoadingWindow *ld )
|
NetworkSyncManager::NetworkSyncManager( LoadingWindow *ld )
|
||||||
{
|
{
|
||||||
LANserver = NULL; //So we know if it has been created yet
|
LANserver = NULL; //So we know if it has been created yet
|
||||||
@@ -63,7 +65,7 @@ NetworkSyncManager::NetworkSyncManager( LoadingWindow *ld )
|
|||||||
|
|
||||||
if( GetCommandlineArgument( "runserver" ))
|
if( GetCommandlineArgument( "runserver" ))
|
||||||
{
|
{
|
||||||
ld->SetText("Initializing server...");
|
ld->SetText( INITIALIZING_SERVER );
|
||||||
LANserver = new StepManiaLanServer;
|
LANserver = new StepManiaLanServer;
|
||||||
isLanServer = true;
|
isLanServer = true;
|
||||||
GetCommandlineArgument( "runserver", &LANserver->servername );
|
GetCommandlineArgument( "runserver", &LANserver->servername );
|
||||||
@@ -71,7 +73,7 @@ NetworkSyncManager::NetworkSyncManager( LoadingWindow *ld )
|
|||||||
else
|
else
|
||||||
isLanServer = false;
|
isLanServer = false;
|
||||||
|
|
||||||
ld->SetText("Initializing Client Network...");
|
ld->SetText( INITIALIZING_CLIENT_NETWORK );
|
||||||
NetPlayerClient = new EzSockets;
|
NetPlayerClient = new EzSockets;
|
||||||
NetPlayerClient->blocking = false;
|
NetPlayerClient->blocking = false;
|
||||||
m_ServerVersion = 0;
|
m_ServerVersion = 0;
|
||||||
|
|||||||
@@ -71,12 +71,13 @@ void SongManager::InitAll( LoadingWindow *ld )
|
|||||||
InitAutogenCourses();
|
InitAutogenCourses();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LocalizedString RELOADING ( "SongManager", "Reloading..." );
|
||||||
void SongManager::Reload( LoadingWindow *ld )
|
void SongManager::Reload( LoadingWindow *ld )
|
||||||
{
|
{
|
||||||
FlushDirCache();
|
FlushDirCache();
|
||||||
|
|
||||||
if( ld )
|
if( ld )
|
||||||
ld->SetText( "Reloading ..." );
|
ld->SetText( RELOADING );
|
||||||
|
|
||||||
// save scores before unloading songs, of the scores will be lost
|
// save scores before unloading songs, of the scores will be lost
|
||||||
PROFILEMAN->SaveMachineProfile();
|
PROFILEMAN->SaveMachineProfile();
|
||||||
@@ -152,6 +153,7 @@ void SongManager::AddGroup( CString sDir, CString sGroupDirName )
|
|||||||
m_sSongGroupBannerPaths.push_back( sBannerPath );
|
m_sSongGroupBannerPaths.push_back( sBannerPath );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LocalizedString LOADING_SONGS ( "SongManager", "Loading songs..." );
|
||||||
void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
|
void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
|
||||||
{
|
{
|
||||||
/* Make sure sDir has a trailing slash. */
|
/* Make sure sDir has a trailing slash. */
|
||||||
@@ -187,7 +189,7 @@ void SongManager::LoadStepManiaSongDir( CString sDir, LoadingWindow *ld )
|
|||||||
// this is a song directory. Load a new song!
|
// this is a song directory. Load a new song!
|
||||||
if( ld )
|
if( ld )
|
||||||
{
|
{
|
||||||
ld->SetText( ssprintf("Loading songs...\n%s\n%s",
|
ld->SetText( LOADING_SONGS.GetValue()+ssprintf("\n%s\n%s",
|
||||||
Basename(sGroupDirName).c_str(),
|
Basename(sGroupDirName).c_str(),
|
||||||
Basename(sSongDirName).c_str()));
|
Basename(sSongDirName).c_str()));
|
||||||
ld->Paint();
|
ld->Paint();
|
||||||
@@ -491,6 +493,7 @@ int SongManager::GetNumStagesForSong( const Song* pSong )
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LocalizedString LOADING_COURSES ( "SongManager", "Loading courses..." );
|
||||||
void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
||||||
{
|
{
|
||||||
LOG->Trace( "Loading courses." );
|
LOG->Trace( "Loading courses." );
|
||||||
@@ -510,7 +513,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
|||||||
|
|
||||||
if( ld )
|
if( ld )
|
||||||
{
|
{
|
||||||
ld->SetText( ssprintf("Loading courses...\n%s\n%s",
|
ld->SetText( LOADING_COURSES.GetValue()+ssprintf("\n%s\n%s",
|
||||||
"Courses",
|
"Courses",
|
||||||
Basename(saCourseFiles[i]).c_str()));
|
Basename(saCourseFiles[i]).c_str()));
|
||||||
ld->Paint();
|
ld->Paint();
|
||||||
@@ -537,7 +540,7 @@ void SongManager::InitCoursesFromDisk( LoadingWindow *ld )
|
|||||||
{
|
{
|
||||||
if( ld )
|
if( ld )
|
||||||
{
|
{
|
||||||
ld->SetText( ssprintf("Loading courses...\n%s\n%s",
|
ld->SetText( LOADING_COURSES.GetValue()+ssprintf("\n%s\n%s",
|
||||||
Basename(*sCourseGroup).c_str(),
|
Basename(*sCourseGroup).c_str(),
|
||||||
Basename(*sCoursePath).c_str()));
|
Basename(*sCoursePath).c_str()));
|
||||||
ld->Paint();
|
ld->Paint();
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "RageSurface.h"
|
#include "RageSurface.h"
|
||||||
#include "RageSurfaceUtils.h"
|
#include "RageSurfaceUtils.h"
|
||||||
#include "ProductInfo.h"
|
#include "ProductInfo.h"
|
||||||
|
#include "LocalizedString.h"
|
||||||
|
|
||||||
#include "RageSurfaceUtils_Zoom.h"
|
#include "RageSurfaceUtils_Zoom.h"
|
||||||
static HBITMAP g_hBitmap = NULL;
|
static HBITMAP g_hBitmap = NULL;
|
||||||
@@ -102,13 +103,14 @@ void LoadingWindow_Win32::SetIcon( const RageSurface *pIcon )
|
|||||||
SetClassLong( hwnd, GCL_HICON, (LONG) m_hIcon );
|
SetClassLong( hwnd, GCL_HICON, (LONG) m_hIcon );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static LocalizedString ENTER_MAIN_TITLE ("LoadingWindow_Win32","Initializing hardware...");
|
||||||
LoadingWindow_Win32::LoadingWindow_Win32()
|
LoadingWindow_Win32::LoadingWindow_Win32()
|
||||||
{
|
{
|
||||||
m_hIcon = NULL;
|
m_hIcon = NULL;
|
||||||
hwnd = CreateDialog( handle.Get(), MAKEINTRESOURCE(IDD_LOADING_DIALOG), NULL, WndProc );
|
hwnd = CreateDialog( handle.Get(), MAKEINTRESOURCE(IDD_LOADING_DIALOG), NULL, WndProc );
|
||||||
for( unsigned i = 0; i < 3; ++i )
|
for( unsigned i = 0; i < 3; ++i )
|
||||||
text[i] = "ABC"; /* always set on first call */
|
text[i] = "ABC"; /* always set on first call */
|
||||||
SetText( "Initializing hardware..." );
|
SetText( ENTER_MAIN_TITLE );
|
||||||
Paint();
|
Paint();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user