1. 31 Oct, 2018 9 commits
  2. 17 Aug, 2018 2 commits
  3. 10 Aug, 2018 1 commit
    • Mathieu Bridon's avatar
      python: Rework bytes/unicode string handling · bd27203f
      Mathieu Bridon authored
      In both Python 2 and 3, opening a file without specifying the mode will
      open it for reading in text mode ('r').
      
      On Python 2, the read() method of a file object opened in mode 'r' will
      return byte strings, while on Python 3 it will return unicode strings.
      
      Explicitly specifying the binary mode ('rb') then decoding the byte
      string means we always handle unicode strings on both Python 2 and 3.
      
      Which in turns means all re.match(line) will return unicode strings as
      well.
      
      If we also make expandCString return unicode strings, we don't need the
      call to the unicode() constructor any more.
      
      We were using the ugettext() method because it always returns unicode
      strings in Python 2, contrarily to the gettext() one which returns
      byte strings. The ugettext() method doesn't exist on Python 3, so we
      must use the right method on each version of Python.
      
      The last hurdles are that Python 3 doesn't let us concatenate unicode
      and byte strings directly, and that Python 2's stdout wants encoded byte
      strings while Python 3's want unicode strings.
      
      With these changes, the script gives the same output on both Python 2
      and 3.
      Signed-off-by: Mathieu Bridon's avatarMathieu Bridon <bochecha@daitauha.fr>
      Reviewed-by: Dylan Baker's avatarDylan Baker <dylan@pnwbakers.com>
      bd27203f
  4. 01 Aug, 2018 1 commit
  5. 24 Jul, 2018 1 commit
  6. 06 Jul, 2018 1 commit
  7. 31 Jul, 2017 1 commit
  8. 10 Mar, 2017 1 commit
  9. 11 Jan, 2013 1 commit
  10. 12 Apr, 2005 1 commit
  11. 11 Apr, 2005 1 commit
    • Felix Kühling's avatar
      Manage option translations in separate .po files to make translations · 55ba0dcc
      Felix Kühling authored
      easier for non-programmers familiar with GNU gettext. For now there is
      only a German translation but more translations are encouraged.
      
      Translatable strings are extracted from t_options.h containing option
      definitions with English descriptions. A corresponding header options.h
      with all available translations of option descriptions is generated by
      gen_xmlpool.py and included by xmlpool.h.
      
      Many option descriptions were rephrased to make them unambiguous for
      translation without context. They are hopefully more helpful to users at
      the same time.
      55ba0dcc