It's probably easier to create a global dictionary that has the different translation keys as keys and the widgetNames/default as the values. That'll make it a lot easier and more efficient to check if a key is used more than once.