0014-Use-translations-in-oggdec.patch 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From: =?utf-8?q?Martin_Stegh=C3=B6fer?= <martin@steghoefer.eu>
  2. Date: Fri, 12 Dec 2014 23:17:02 +0100
  3. Subject: Use translations in oggdec
  4. The "oggdec" executable uses the "_" (underscore) macro for
  5. internationalization and has translations of the relevant strings
  6. available in the .po files, but nevertheless outputs everything
  7. in English. This was due to a lack of initialization of the
  8. internationalization modules in that executable.
  9. Bug-Debian: https://bugs.debian.org/772976
  10. Forwarded: https://trac.xiph.org/ticket/2149
  11. ---
  12. oggdec/oggdec.c | 5 +++++
  13. 1 file changed, 5 insertions(+)
  14. diff --git a/oggdec/oggdec.c b/oggdec/oggdec.c
  15. index 16f87ac..3f2ae7b 100644
  16. --- a/oggdec/oggdec.c
  17. +++ b/oggdec/oggdec.c
  18. @@ -16,6 +16,7 @@
  19. #include <getopt.h>
  20. #include <errno.h>
  21. #include <string.h>
  22. +#include <locale.h>
  23. #if defined(_WIN32) || defined(__EMX__) || defined(__WATCOMC__)
  24. #include <fcntl.h>
  25. @@ -364,6 +365,10 @@ int main(int argc, char **argv)
  26. {
  27. int i;
  28. + setlocale(LC_ALL, "");
  29. + bindtextdomain(PACKAGE, LOCALEDIR);
  30. + textdomain(PACKAGE);
  31. +
  32. if(argc == 1) {
  33. usage();
  34. return 1;