From 22d7d41615ef07c10dc93109abdb2a868ac40067 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Sun, 2 May 2021 00:27:43 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8C=90=20Fix=20remaning=20plural=20form?= =?UTF-8?q?=20of=20gold=20related=20texts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/control.cpp | 4 ++-- Source/control.h | 1 - Source/inv.cpp | 2 +- Source/items.cpp | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Source/control.cpp b/Source/control.cpp index 3d509ed80..6660bbaa6 100644 --- a/Source/control.cpp +++ b/Source/control.cpp @@ -1258,7 +1258,7 @@ void DrawInfoBox(const CelOutputBuffer &out) } else if (pcurs >= CURSOR_FIRSTITEM) { if (plr[myplr].HoldItem._itype == ITYPE_GOLD) { int nGold = plr[myplr].HoldItem._ivalue; - sprintf(infostr, ngettext("%i gold piece", "%i gold pieces", nGold) + sprintf(infostr, ngettext("%i gold piece", "%i gold pieces", nGold), nGold); } else if (!plr[myplr].HoldItem._iStatFlag) { ClearPanel(); AddPanelString(_("Requirements not met"), true); @@ -1903,7 +1903,7 @@ void DrawGoldSplit(const CelOutputBuffer &out, int amount) CelDrawTo(out, 351, 178, *pGBoxBuff, 1); sprintf(tempstr, _("You have %u gold"), initialDropGoldValue); ADD_PlrStringXY(out, 366, 87, 600, tempstr, COL_GOLD); - sprintf(tempstr, ngettext("piece. How many do", "pieces. How many do", initialDropGoldValue)); + sprintf(tempstr, ngettext("piece. How many do", "pieces. How many do", initialDropGoldValue), initialDropGoldValue); ADD_PlrStringXY(out, 366, 103, 600, tempstr, COL_GOLD); ADD_PlrStringXY(out, 366, 121, 600, _("you want to remove?"), COL_GOLD); if (amount > 0) { diff --git a/Source/control.h b/Source/control.h index 73045544d..586a1f473 100644 --- a/Source/control.h +++ b/Source/control.h @@ -143,7 +143,6 @@ void DrawDurIcon(const CelOutputBuffer &out); void RedBack(const CelOutputBuffer &out); void DrawSpellBook(const CelOutputBuffer &out); void CheckSBook(); -const char *get_pieces_str(int nGold); void DrawGoldSplit(const CelOutputBuffer &out, int amount); void control_drop_gold(char vkey); void control_remove_gold(int pnum, int goldIndex); diff --git a/Source/inv.cpp b/Source/inv.cpp index 044cf51de..db109af4c 100644 --- a/Source/inv.cpp +++ b/Source/inv.cpp @@ -2114,7 +2114,7 @@ char CheckInvHLight() if (pi->_itype == ITYPE_GOLD) { nGold = pi->_ivalue; - sprintf(infostr, _("%i gold %s"), nGold, get_pieces_str(nGold)); + sprintf(infostr, ngettext("%i gold piece", "%i gold pieces", nGold), nGold); } else { if (pi->_iMagical == ITEM_QUALITY_MAGIC) { infoclr = COL_BLUE; diff --git a/Source/items.cpp b/Source/items.cpp index fd4e0b3fa..44de9c77f 100644 --- a/Source/items.cpp +++ b/Source/items.cpp @@ -3076,7 +3076,7 @@ void GetItemStr(int i) infoclr = COL_GOLD; } else { nGold = items[i]._ivalue; - sprintf(infostr, _("%i gold %s"), nGold, get_pieces_str(nGold)); + sprintf(infostr, ngettext("%i gold piece", "%i gold pieces", nGold), nGold); } }