OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

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

Rev 174 Rev 177
Line 12... Line 12...
12
 */
12
 */
13
 
13
 
14
 package org.openconcerto.erp.action;
14
 package org.openconcerto.erp.action;
15
 
15
 
16
import org.openconcerto.erp.config.ComptaPropsConfiguration;
16
import org.openconcerto.erp.config.ComptaPropsConfiguration;
17
import org.openconcerto.erp.utils.TM;
-
 
18
import org.openconcerto.sql.Configuration;
17
import org.openconcerto.sql.Configuration;
19
import org.openconcerto.sql.PropsConfiguration;
18
import org.openconcerto.sql.PropsConfiguration;
20
import org.openconcerto.sql.element.SQLElement;
19
import org.openconcerto.sql.element.SQLElement;
21
import org.openconcerto.sql.ui.light.LightUIFrameProvider;
20
import org.openconcerto.sql.ui.light.LightUIFrameProvider;
22
import org.openconcerto.sql.users.UserManager;
21
import org.openconcerto.sql.users.UserManager;
Line 65... Line 64...
65
    }
64
    }
66
 
65
 
67
    protected CreateListFrameAbstractAction(final ComptaPropsConfiguration conf, final E elem) {
66
    protected CreateListFrameAbstractAction(final ComptaPropsConfiguration conf, final E elem) {
68
        super(elem);
67
        super(elem);
69
        this.conf = conf;
68
        this.conf = conf;
70
        // TODO use conf to find TM
-
 
71
        final NounClass nounClass = this.getElem().getName().getNounClass();
69
        final NounClass nounClass = this.getElem().getName().getNounClass();
72
        final String[] translationKeys = nounClass == null ? TRANSLATION_KEY_ARRAY : new String[] { TRANSLATION_KEY + '.' + nounClass.getName(), TRANSLATION_KEY };
70
        final String[] translationKeys = nounClass == null ? TRANSLATION_KEY_ARRAY : new String[] { TRANSLATION_KEY + '.' + nounClass.getName(), TRANSLATION_KEY };
73
        this.putValue(NAME, StringUtils.firstUp(TM.getTM().translateFirst(MissingMode.NULL, MessageArgs.create("elem", this.getElem().getName()), translationKeys)));
71
        this.putValue(NAME, StringUtils.firstUp(conf.getERP_TM().translateFirst(MissingMode.STRING, MessageArgs.create("elem", this.getElem().getName()), translationKeys)));
74
    }
72
    }
75
 
73
 
76
    public final ComptaPropsConfiguration getConf() {
74
    public final ComptaPropsConfiguration getConf() {
77
        return this.conf;
75
        return this.conf;
78
    }
76
    }