old_contents: # Copyright (C) 2016 Adam Schubert <adam.schubert@sg1-game.net>
  #
  # This program is free software: you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
  # the Free Software Foundation, either version 3 of the License, or
  # (at your option) any later version.
  #
  # This program is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # GNU General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  import xml.etree.ElementTree as ET
  """
  A strongly-typed resource class, for looking up localized strings, etc.
  """
  
  tree = ET.parse('Resources.resx')
  root = tree.getroot()
  translationTable = {}
  for first in root.findall('./data'):
          translationTable[first.attrib['name']] = first.find('./value').text
  
  
  class resourceManager(object):
  
      @staticmethod
      def GetString(name, resourceCulture):
          return translationTable[name]
  
  
  class ResourcesExt(type):
      resourceMan = None
      resourceCulture = None
  
      def __init__(self, name, object, something):
          pass
  
      def __getattr__(self, key):
          return resourceManager.GetString(key, self.resourceCulture)
  
  
  class Resources(object, metaclass = ResourcesExt):
      __metaclass__ = ResourcesExt
  
new_contents: # Copyright (C) 2016 Adam Schubert <adam.schubert@sg1-game.net>
  #
  # This program is free software: you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
  # the Free Software Foundation, either version 3 of the License, or
  # (at your option) any later version.
  #
  # This program is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # GNU General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  import xml.etree.ElementTree as ET
  
  # import future.utils.with_metaclass or six.with_metaclass for class Resources
  try:
      from future.utils import with_metaclass
  except ImportError:
      from six import with_metaclass
  """
  A strongly-typed resource class, for looking up localized strings, etc.
  """
  
  tree = ET.parse('Resources.resx')
  root = tree.getroot()
  translationTable = {}
  for first in root.findall('./data'):
          translationTable[first.attrib['name']] = first.find('./value').text
  
  
  class resourceManager(object):
  
      @staticmethod
      def GetString(name, resourceCulture):
          return translationTable[name]
  
  
  class ResourcesExt(type):
      resourceMan = None
      resourceCulture = None
  
      def __init__(self, name, object, something):
          pass
  
      def __getattr__(self, key):
          return resourceManager.GetString(key, self.resourceCulture)
  
  
  class Resources(with_metaclass(ResourcesExt)):
      pass
  
  """
  Cant use both __metaclass__ is not working in python3 and metaclass = ResourcesExt is not working in python2
  class Resources(object, metaclass = ResourcesExt):
      __metaclass__ = ResourcesExt
  """
  
subject: Make it work in python2 and 3