fix ngettext issue
This commit is contained in:
parent
4e18bb7ee9
commit
972346d22d
|
|
@ -4578,9 +4578,15 @@ bool FurnaceGUI::loop() {
|
|||
int totalMonths=totalDays/30;
|
||||
totalDays%=30;
|
||||
|
||||
#ifdef HAVE_LOCALE
|
||||
info+=fmt::sprintf(ngettext("%d year ","%d years ",totalYears),totalYears);
|
||||
info+=fmt::sprintf(ngettext("%d month ","%d months ",totalMonths),totalMonths);
|
||||
info+=fmt::sprintf(ngettext("%d day ","%d days ",totalDays),totalDays);
|
||||
#else
|
||||
info+=fmt::sprintf(_GN("%d year ","%d years ",totalYears),totalYears);
|
||||
info+=fmt::sprintf(_GN("%d month ","%d months ",totalMonths),totalMonths);
|
||||
info+=fmt::sprintf(_GN("%d day ","%d days ",totalDays),totalDays);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (totalSeconds>=3600) {
|
||||
|
|
|
|||
|
|
@ -1406,8 +1406,13 @@ void FurnaceGUI::drawSettings() {
|
|||
TAAudioDesc& audioWant=e->getAudioDescWant();
|
||||
TAAudioDesc& audioGot=e->getAudioDescGot();
|
||||
|
||||
#ifdef HAVE_LOCALE
|
||||
ImGui::Text(ngettext("want: %d samples @ %.0fHz (%d channel)","want: %d samples @ %.0fHz (%d channels)",audioWant.outChans),audioWant.bufsize,audioWant.rate,audioWant.outChans);
|
||||
ImGui::Text(ngettext("got: %d samples @ %.0fHz (%d channel)","got: %d samples @ %.0fHz (%d channels)",audioGot.outChans),audioGot.bufsize,audioGot.rate,audioGot.outChans);
|
||||
#else
|
||||
ImGui::Text(_GN("want: %d samples @ %.0fHz (%d channel)","want: %d samples @ %.0fHz (%d channels)",audioWant.outChans),audioWant.bufsize,audioWant.rate,audioWant.outChans);
|
||||
ImGui::Text(_GN("got: %d samples @ %.0fHz (%d channel)","got: %d samples @ %.0fHz (%d channels)",audioGot.outChans),audioGot.bufsize,audioGot.rate,audioGot.outChans);
|
||||
#endif
|
||||
|
||||
// SUBSECTION MIXING
|
||||
CONFIG_SUBSECTION(_("Mixing"));
|
||||
|
|
|
|||
|
|
@ -47,9 +47,9 @@ typedef std::string String;
|
|||
#define _(_str) gettext(_str)
|
||||
#else
|
||||
#define _(_str) _str
|
||||
#define ngettext(_strS,_strP,_cond) (((_cond)==1)?(_strS):(_strP))
|
||||
#endif
|
||||
|
||||
#define _GN(_strS,_strP,_cond) (((_cond)==1)?(_strS):(_strP))
|
||||
#define _N(_str) _str
|
||||
|
||||
typedef std::wstring WString;
|
||||
|
|
|
|||
Loading…
Reference in a new issue