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 59... Line 59...
59
    private static final String[] TRANSLATION_KEY_ARRAY = new String[] { TRANSLATION_KEY };
59
    private static final String[] TRANSLATION_KEY_ARRAY = new String[] { TRANSLATION_KEY };
60
 
60
 
61
    private final ComptaPropsConfiguration conf;
61
    private final ComptaPropsConfiguration conf;
62
 
62
 
63
    protected CreateListFrameAbstractAction(final ComptaPropsConfiguration conf, final Class<? extends E> clazz) {
63
    protected CreateListFrameAbstractAction(final ComptaPropsConfiguration conf, final Class<? extends E> clazz) {
64
        super(conf.getDirectory().getElement(clazz));
64
        this(conf, conf.getDirectory().getElementOfClass(clazz, true));
-
 
65
    }
-
 
66
 
-
 
67
    protected CreateListFrameAbstractAction(final ComptaPropsConfiguration conf, final E elem) {
-
 
68
        super(elem);
65
        this.conf = conf;
69
        this.conf = conf;
66
        // TODO use conf to find TM
70
        // TODO use conf to find TM
67
        final NounClass nounClass = this.getElem().getName().getNounClass();
71
        final NounClass nounClass = this.getElem().getName().getNounClass();
68
        final String[] translationKeys = nounClass == null ? TRANSLATION_KEY_ARRAY : new String[] { TRANSLATION_KEY + '.' + nounClass.getName(), TRANSLATION_KEY };
72
        final String[] translationKeys = nounClass == null ? TRANSLATION_KEY_ARRAY : new String[] { TRANSLATION_KEY + '.' + nounClass.getName(), TRANSLATION_KEY };
69
        this.putValue(NAME, StringUtils.firstUp(TM.getTM().translateFirst(MissingMode.NULL, MessageArgs.create("elem", this.getElem().getName()), translationKeys)));
73
        this.putValue(NAME, StringUtils.firstUp(TM.getTM().translateFirst(MissingMode.NULL, MessageArgs.create("elem", this.getElem().getName()), translationKeys)));