Loading

Paste #ponhg7ag6

  1. diff -r 614b4710dc7e webtranslate/newgrf/language_file.py
  2. --- a/webtranslate/newgrf/language_file.py  Wed May 27 19:44:13 2015 +0200
  3. +++ b/webtranslate/newgrf/language_file.py  Wed May 27 19:52:12 2015 +0200
  4. @@ -869,7 +869,9 @@
  5.          if line.startswith(bom):
  6.              line = line[len(bom):]
  7.  
  8. -        if line.startswith('##'):
  9. +        # Comments either have 1 or >= 3 leading '#'.
  10. +        # The pragma ##id is special. It belongs to the skeleton, not to the header. Threat it like a comment.
  11. +        if line.startswith('##') and not line.startswith('###') and not line.startswith('##id'):
  12.              if seen_strings:
  13.                  data.add_error(ErrorMessage(ERROR, lnum, "Cannot change language properties after processing strings"))
  14.                  continue
  15.  

Comments