Text this: Topological invariants of principal G-bundles with singularities