OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 156 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 156 Rev 174
Line 27... Line 27...
27
 
27
 
28
    private static final String TRANSLATION_KEY = "createMenuItem.name";
28
    private static final String TRANSLATION_KEY = "createMenuItem.name";
29
    private static final String[] TRANSLATION_KEY_ARRAY = new String[] { TRANSLATION_KEY };
29
    private static final String[] TRANSLATION_KEY_ARRAY = new String[] { TRANSLATION_KEY };
30
 
30
 
31
    protected CreateEditFrameAbstractAction(final PropsConfiguration conf, final Class<? extends E> clazz) {
31
    protected CreateEditFrameAbstractAction(final PropsConfiguration conf, final Class<? extends E> clazz) {
32
        super(conf.getDirectory().getElement(clazz));
32
        this(conf, conf.getDirectory().getElementOfClass(clazz, true));
-
 
33
    }
-
 
34
 
-
 
35
    protected CreateEditFrameAbstractAction(final PropsConfiguration conf, final E elem) {
-
 
36
        super(elem);
33
        // TODO use conf to find TM
37
        // TODO use conf to find TM
34
        final NounClass nounClass = this.getElem().getName().getNounClass();
38
        final NounClass nounClass = this.getElem().getName().getNounClass();
35
        final String[] translationKeys = nounClass == null ? TRANSLATION_KEY_ARRAY : new String[] { TRANSLATION_KEY + '.' + nounClass.getName(), TRANSLATION_KEY };
39
        final String[] translationKeys = nounClass == null ? TRANSLATION_KEY_ARRAY : new String[] { TRANSLATION_KEY + '.' + nounClass.getName(), TRANSLATION_KEY };
36
        this.putValue(NAME, StringUtils.firstUp(TM.getTM().translateFirst(MissingMode.NULL, MessageArgs.create("elem", this.getElem().getName()), translationKeys)));
40
        this.putValue(NAME, StringUtils.firstUp(TM.getTM().translateFirst(MissingMode.NULL, MessageArgs.create("elem", this.getElem().getName()), translationKeys)));
37
    }
41
    }