Added localization plural rules support

This commit is contained in:
Leon Styhre 2024-07-16 10:15:42 +02:00
parent a1cb6ce4c4
commit 42f7e46d08
2 changed files with 2 additions and 1 deletions

View file

@ -15,6 +15,7 @@
#include <vector>
#define _(STR) std::string(gettext(STR))
#define _n(STR1, STR2, NUM) std::string(ngettext(STR1, STR2, NUM))
namespace Utils
{

View file

@ -23,7 +23,7 @@ if [ ! $(which xgettext 2>/dev/null) ]; then
exit
fi
find ../es-app/src/ ../es-core/src -name '*.cpp' -o -name '*.h' | xgettext -f - -o ../locale/es-de.pot -k_ --no-location \
find ../es-app/src/ ../es-core/src -name '*.cpp' -o -name '*.h' | xgettext -f - -o ../locale/es-de.pot -k_ -k_n:1,2 --no-location \
--copyright-holder="Northwestern Software AB" --package-name="ES-DE Frontend" --msgid-bugs-address "info@es-de.org"
sed -i "1s/.*/# ES-DE Frontend translation strings./" ../locale/es-de.pot