class ProxyContext {

    private static final ThreadLocal<ProxyContext> proxyContextThreadLocal = ThreadLocal.withInitial(ProxyContext::new);

    private Class<?> clazz;

    private Field field;

    private boolean i18n = false;

    public static void set(Class<?> clazz) {
        proxyContextThreadLocal.get().setClazz(clazz);
        proxyContextThreadLocal.get().setI18n(null != clazz.getAnnotation(EruptI18n.class));
    }

    public static void set(Field field) {
        proxyContextThreadLocal.get().setField(field);
        ProxyContext.set(field.getDeclaringClass());
    }

    public static ProxyContext get() {
        return proxyContextThreadLocal.get();
    }

    public static void remove() {
        proxyContextThreadLocal.remove();
    }

    public static String translate(String key) {<FILL_FUNCTION_BODY>}

}

        if (ProxyContext.get().i18n) {
            return EruptSpringUtil.getBean(I18nTranslate.class).translate(key);
        } else {
            return key;
        }
    
<no_super_class>