diff --git a/src/gui/gui.cpp b/src/gui/gui.cpp index 5a533234f..e8d34144c 100644 --- a/src/gui/gui.cpp +++ b/src/gui/gui.cpp @@ -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) { diff --git a/src/gui/settings.cpp b/src/gui/settings.cpp index 4ed9ac6a0..05a565499 100644 --- a/src/gui/settings.cpp +++ b/src/gui/settings.cpp @@ -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")); diff --git a/src/ta-utils.h b/src/ta-utils.h index 3a9bd7f93..8c18c31ea 100644 --- a/src/ta-utils.h +++ b/src/ta-utils.h @@ -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;