UiSelOkDialog(title,_("The host is running a different game than you."),false);
}else{
charmsg[64];
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());
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 {:d}.{:d}.{:d}."),PROJECT_VERSION,PROJECT_VERSION_MAJOR,PROJECT_VERSION_MINOR,PROJECT_VERSION_PATCH).c_str());
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());
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());
overwrite=UiSelHeroYesNoDialog(title,dialogText);
LoadBackgroundArt("ui_art\\selhero.pcx");
@ -621,7 +621,7 @@ static void UiSelHeroDialog(
}else{
strncpy(dialogTitle,_("Delete Single Player Hero"),sizeof(dialogTitle)-1);
}
snprintf(dialogText,sizeof(dialogText),fmt::format(_("Are you sure you want to delete the character \"%s\"?"),selhero_heroInfo.name).c_str());
snprintf(dialogText,sizeof(dialogText),fmt::format(_("Are you sure you want to delete the character \"{:s}\"?"),selhero_heroInfo.name).c_str());
@ -116,7 +116,7 @@ void ErrDlg(const char *title, const char *error, const char *logFilePath, int l
FreeDlg();
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),fmt::format(_(/* TRANSLATORS: Error message that displays relevant information for bug report */"{:s}\n\nThe error occurred at: {:s} line {:d}"),error,logFilePath,logLineNr).c_str());
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());
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,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(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,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());
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);
@ -1568,8 +1568,8 @@ void GetStaffSpell(int i, int lvl, bool onlygood)
s=SPL_FIREBOLT;
}
if(!control_WriteStringToBuffer(istr))
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());
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);
@ -2163,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,fmt::format(_("%s of %s"),items[i]._iIName,_(PL_Suffix[sufidx].PLName)).c_str());
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);
@ -2182,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,fmt::format(_("%s of %s"),items[i]._iIName,_(PL_Suffix[sufidx].PLName)).c_str());
sprintf(istr,fmt::format(_("{:s} of {:s}"),items[i]._iIName,_(PL_Suffix[sufidx].PLName)).c_str());
strcpy(items[i]._iIName,istr);
}
}
@ -2746,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,fmt::format(_(/* TRANSLATORS: %s will be a Character Name */"Ear of %s"),tempstr).c_str());
sprintf(items[ii]._iName,fmt::format(_(/* TRANSLATORS: {:s} will be a Character Name */"Ear of {:s}"),tempstr).c_str());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: %s will be a name from the Shrine block above */"%s Shrine"),_(shrinestrs[object[i]._oVar1])).c_str());
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,fmt::format(_(/* TRANSLATORS: %s will either be a chest or a door */"Trapped %s"),infostr).c_str());
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,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(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,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(pMsg->str,fmt::format(_(/* TRANSLATORS: Shown if player presses "v" button. {:s} is player name, {:d} is level, {:s} is location */"{:s} (lvl {:d}): {:s}"),plr[pnum]._pName,plr[pnum]._pLevel,pszStr).c_str());
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these items for sale: Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -339,7 +339,7 @@ bool S_StartSPBuy()
stextscrl=true;
stextsval=0;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these premium items for sale: Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -467,7 +467,7 @@ void S_StartSSell()
if(!sellok){
stextscrl=false;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing I want. Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -477,7 +477,7 @@ void S_StartSSell()
stextscrl=true;
stextsval=0;
stextsmax=plr[myplr]._pNumInv;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Which item is for sale? Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -537,7 +537,7 @@ void S_StartSRepair()
}
if(!repairok){
stextscrl=false;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing to repair. Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -549,7 +549,7 @@ void S_StartSRepair()
stextscrl=true;
stextsval=0;
stextsmax=plr[myplr]._pNumInv;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Repair which item? Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -623,7 +623,7 @@ void S_StartWBuy()
stextscrl=true;
stextsval=0;
stextsmax=20;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these items for sale: Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -717,7 +717,7 @@ void S_StartWSell()
if(!sellok){
stextscrl=false;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing I want. Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -727,7 +727,7 @@ void S_StartWSell()
stextscrl=true;
stextsval=0;
stextsmax=plr[myplr]._pNumInv;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Which item is for sale? Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -793,7 +793,7 @@ void S_StartWRecharge()
if(!rechargeok){
stextscrl=false;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing to recharge. Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -803,7 +803,7 @@ void S_StartWRecharge()
stextscrl=true;
stextsval=0;
stextsmax=plr[myplr]._pNumInv;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Recharge which item? Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -915,7 +915,7 @@ void S_StartBBoy()
{
stextsize=true;
stextscrl=false;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have this item for sale: Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -989,7 +989,7 @@ void S_StartHBuy()
stextsize=true;
stextscrl=true;
stextsval=0;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"I have these items for sale: Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -1090,7 +1090,7 @@ void S_StartSIdentify()
if(!idok){
stextscrl=false;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"You have nothing to identify. Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -1100,7 +1100,7 @@ void S_StartSIdentify()
stextscrl=true;
stextsval=0;
stextsmax=plr[myplr]._pNumInv;
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());
sprintf(tempstr,fmt::format(_(/* TRANSLATORS: This text is white space sensitive. Check for correct alignment! */"Identify which item? Your gold: {:d}"),plr[myplr]._pGold).c_str());
AddSText(0,1,tempstr,UIS_GOLD|UIS_CENTER,false);
AddSLine(3);
AddSLine(21);
@ -1129,11 +1129,11 @@ void S_StartTalk()
stextsize=false;
stextscrl=false;
sprintf(tempstr,fmt::format(_("Talk to %s"),talkname[talker]).c_str());
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,fmt::format(_("Talking to %s"),talkname[talker]).c_str());
sprintf(tempstr,fmt::format(_("Talking to {:s}"),talkname[talker]).c_str());