UiSelOkDialog(title,_("The host is running a different game than you."),false);
}else{
charmsg[64];
sprintf(msg,_(/* TRANSLATORS: Error message when somebody tries to join a game running another version. */"Your version %s does not match the host %i.%i.%i."),PROJECT_VERSION,PROJECT_VERSION_MAJOR,PROJECT_VERSION_MINOR,PROJECT_VERSION_PATCH);
sprintf(msg,fmt::format(_(/* TRANSLATORS: Error message when somebody tries to join a game running another version. */"Your version %s does not match the host %i.%i.%i."),PROJECT_VERSION,PROJECT_VERSION_MAJOR,PROJECT_VERSION_MINOR,PROJECT_VERSION_PATCH).c_str());
snprintf(dialogText,sizeof(dialogText),_(/* Error message when User tries to create multiple heros with the same name */"Character already exists. Do you want to overwrite \"%s\"?"),selhero_heroInfo.name);
snprintf(dialogText,sizeof(dialogText),fmt::format(_(/* Error message when User tries to create multiple heros with the same name */"Character already exists. Do you want to overwrite \"%s\"?"),selhero_heroInfo.name).c_str());
@ -114,7 +116,7 @@ void ErrDlg(const char *title, const char *error, const char *logFilePath, int l
FreeDlg();
snprintf(text,sizeof(text),_(/* TRANSLATORS: Error message that displays relevant information for bug report */"%s\n\nThe error occurred at: %s line %i"),error,logFilePath,logLineNr);
snprintf(text,sizeof(text),fmt::format(_(/* TRANSLATORS: Error message that displays relevant information for bug report */"%s\n\nThe error occurred at: %s line %i"),error,logFilePath,logLineNr).c_str());
snprintf(text,sizeof(text),_(/* TRANSLATORS: Error when Program is not allowed to write data */"Unable to write to location:\n%s"),error);
snprintf(text,sizeof(text),fmt::format(_(/* TRANSLATORS: Error when Program is not allowed to write data */"Unable to write to location:\n%s"),error).c_str());
sprintf(pszStr,_(/* TRANSLATORS: %s means: Character Name, Game Version, Game Difficulty. */"%s, version = %s, mode = %s"),gszProductName,PROJECT_VERSION,difficulties[sgGameInitInfo.nDifficulty]);
sprintf(pszStr,fmt::format(_(/* TRANSLATORS: %s means: Character Name, Game Version, Game Difficulty. */"%s, version = %s, mode = %s"),gszProductName,PROJECT_VERSION,difficulties[sgGameInitInfo.nDifficulty]).c_str());
sprintf(istr,_(/* TRANSLATORS: Constructs item names. Format: <Prefix> <Item> of <Suffix>. Example: King's Long Sword of the Whale */"%s of %s"),items[i]._iIName,_(spelldata[bs].sNameText));
sprintf(istr,fmt::format(_(/* TRANSLATORS: Constructs item names. Format: <Prefix> <Item> of <Suffix>. Example: King's Long Sword of the Whale */"%s of %s"),items[i]._iIName,_(spelldata[bs].sNameText)).c_str());
strcpy(items[i]._iIName,istr);
if(items[i]._iMagical==ITEM_QUALITY_NORMAL)
strcpy(items[i]._iName,items[i]._iIName);
@ -1566,8 +1568,8 @@ void GetStaffSpell(int i, int lvl, bool onlygood)
s=SPL_FIREBOLT;
}
if(!control_WriteStringToBuffer(istr))
sprintf(istr,_("%s of %s"),items[i]._iName,_(spelldata[bs].sNameText));
sprintf(istr,_("Staff of %s"),_(spelldata[bs].sNameText));
sprintf(istr,fmt::format(_("%s of %s"),items[i]._iName,_(spelldata[bs].sNameText)).c_str());
sprintf(istr,fmt::format(_("Staff of %s"),_(spelldata[bs].sNameText)).c_str());
strcpy(items[i]._iName,istr);
strcpy(items[i]._iIName,istr);
@ -2161,7 +2163,7 @@ void GetItemPower(int i, int minlvl, int maxlvl, affix_item_type flgs, bool only
}
if(nl!=0){
sufidx=l[GenerateRnd(nl)];
sprintf(istr,_("%s of %s"),items[i]._iIName,_(PL_Suffix[sufidx].PLName));
sprintf(istr,fmt::format(_("%s of %s"),items[i]._iIName,_(PL_Suffix[sufidx].PLName)).c_str());
strcpy(items[i]._iIName,istr);
items[i]._iMagical=ITEM_QUALITY_MAGIC;
SaveItemSuffix(i,sufidx);
@ -2180,7 +2182,7 @@ void GetItemPower(int i, int minlvl, int maxlvl, affix_item_type flgs, bool only
strcpy(items[i]._iIName,istr);
}
if(sufidx!=-1){
sprintf(istr,_("%s of %s"),items[i]._iIName,_(PL_Suffix[sufidx].PLName));
sprintf(istr,fmt::format(_("%s of %s"),items[i]._iIName,_(PL_Suffix[sufidx].PLName)).c_str());
strcpy(items[i]._iIName,istr);
}
}
@ -2744,7 +2746,7 @@ void RecreateEar(int ii, uint16_t ic, int iseed, int Id, int dur, int mdur, int
tempstr[14]=(ibuff>>8)&0x7F;
tempstr[15]=ibuff&0x7F;
tempstr[16]='\0';
sprintf(items[ii]._iName,_(/* TRANSLATORS: %s will be a Character Name */"Ear of %s"),tempstr);
sprintf(items[ii]._iName,fmt::format(_(/* TRANSLATORS: %s will be a Character Name */"Ear of %s"),tempstr).c_str());
sprintf(tempstr,_(/* TRANSLATORS: %s will be a name from the Shrine block above */"%s Shrine"),_(shrinestrs[object[i]._oVar1]));
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: %s will be a name from the Shrine block above */"%s Shrine"),_(shrinestrs[object[i]._oVar1])).c_str());
strcpy(infostr,tempstr);
break;
caseOBJ_SKELBOOK:
@ -5570,13 +5570,13 @@ void GetObjectStr(int i)
}
if(plr[myplr]._pClass==HeroClass::Rogue){
if(object[i]._oTrapFlag){
sprintf(tempstr,_(/* TRANSLATORS: %s will either be a chest or a door */"Trapped %s"),infostr);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: %s will either be a chest or a door */"Trapped %s"),infostr).c_str());
strcpy(infostr,tempstr);
infoclr=UIS_RED;
}
}
if(objectIsDisabled(i)){
sprintf(tempstr,_(/* TRANSLATORS: If user enabled diablo.ini setting "Disable Crippling Shrines" is set to 1; also used for Na-Kruls leaver */"%s (disabled)"),infostr);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: If user enabled diablo.ini setting "Disable Crippling Shrines" is set to 1; also used for Na-Kruls leaver */"%s (disabled)"),infostr).c_str());
sprintf(pMsg->str,_(/* TRANSLATORS: Shown if player presses "v" button. %s is player name, %i is level, %s is location */"%s (lvl %i): %s"),plr[pnum]._pName,plr[pnum]._pLevel,pszStr);
sprintf(pMsg->str,fmt::format(_(/* TRANSLATORS: Shown if player presses "v" button. %s is player name, %i is level, %s is location */"%s (lvl %i): %s"),plr[pnum]._pName,plr[pnum]._pLevel,pszStr).c_str());
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these items for sale: Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these items for sale: Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -337,7 +339,7 @@ bool S_StartSPBuy()
stextscrl=true;
stextsval=0;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these premium items for sale: Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these premium items for sale: Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -465,7 +467,7 @@ void S_StartSSell()
if(!sellok){
stextscrl=false;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing I want. Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing I want. Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -475,7 +477,7 @@ void S_StartSSell()
stextscrl=true;
stextsval=0;
stextsmax=plr[myplr]._pNumInv;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Which item is for sale? Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Which item is for sale? Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -535,7 +537,7 @@ void S_StartSRepair()
}
if(!repairok){
stextscrl=false;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing to repair. Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing to repair. Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -547,7 +549,7 @@ void S_StartSRepair()
stextscrl=true;
stextsval=0;
stextsmax=plr[myplr]._pNumInv;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Repair which item? Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Repair which item? Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -621,7 +623,7 @@ void S_StartWBuy()
stextscrl=true;
stextsval=0;
stextsmax=20;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these items for sale: Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these items for sale: Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -715,7 +717,7 @@ void S_StartWSell()
if(!sellok){
stextscrl=false;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing I want. Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing I want. Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -725,7 +727,7 @@ void S_StartWSell()
stextscrl=true;
stextsval=0;
stextsmax=plr[myplr]._pNumInv;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Which item is for sale? Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Which item is for sale? Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -791,7 +793,7 @@ void S_StartWRecharge()
if(!rechargeok){
stextscrl=false;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing to recharge. Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing to recharge. Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -801,7 +803,7 @@ void S_StartWRecharge()
stextscrl=true;
stextsval=0;
stextsmax=plr[myplr]._pNumInv;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Recharge which item? Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Recharge which item? Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -913,7 +915,7 @@ void S_StartBBoy()
{
stextsize=true;
stextscrl=false;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have this item for sale: Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have this item for sale: Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -987,7 +989,7 @@ void S_StartHBuy()
stextsize=true;
stextscrl=true;
stextsval=0;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these items for sale: Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these items for sale: Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -1088,7 +1090,7 @@ void S_StartSIdentify()
if(!idok){
stextscrl=false;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing to identify. Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing to identify. Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -1098,7 +1100,7 @@ void S_StartSIdentify()
stextscrl=true;
stextsval=0;
stextsmax=plr[myplr]._pNumInv;
sprintf(tempstr,_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Identify which item? Your gold: %i"),plr[myplr]._pGold);
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Identify which item? Your gold: %i"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -1127,11 +1129,11 @@ void S_StartTalk()
stextsize=false;
stextscrl=false;
sprintf(tempstr,_("Talk to %s"),talkname[talker]);
sprintf(tempstr,fmt::format(_("Talk to %s"),talkname[talker]).c_str());
AddSText(0,2,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(5);
if(gbIsSpawn){
sprintf(tempstr,_("Talking to %s"),talkname[talker]);
sprintf(tempstr,fmt::format(_("Talking to %s"),talkname[talker]).c_str());