Project

General

Profile

« Previous | Next » 

Revision 57318058

Added by Patrick Plitzner over 8 years ago

  • i18n language preferences

View differences:

.gitattributes
1219 1219
eu.etaxonomy.taxeditor.store/plugin.xml -text
1220 1220
eu.etaxonomy.taxeditor.store/pom.xml -text
1221 1221
eu.etaxonomy.taxeditor.store/schema/eu.etaxonomy.taxeditor.store.cdmViewer.exsd -text
1222
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java -text
1222 1223
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/CdmDataSourceRepository.java -text
1223 1224
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceCredentialsWizardPage.java -text
1224 1225
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/datasource/wizard/CdmDataSourceH2WizardPage.java -text
......
1784 1785
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewPart.java -text
1785 1786
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewerComparator.java -text
1786 1787
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmMetaDataAwareDataSourceContainer.java -text
1787
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/Messages.java -text
1788 1788
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/AbstractDataSourceHandler.java -text
1789 1789
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/ChangeConnectionHandler.java -text
1790 1790
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/handler/CloneDataSourceHandler.java -text
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages.properties
10 10
CdmDataSourceViewPart_7=Database
11 11
CdmDataSourceViewPart_8=Type
12 12
CdmDataSourceViewPart_9=Up
13
LanguageEditorPreferencePage_ChooseDefaultLanguage=Please choose your default language for the editor: 
14
LanguageEditorPreferencePage_EditorHasToRestart=The Taxonomic Editor has to restart now, in order to complete the language switch.\nDo you want to restart now?
15
LanguageEditorPreferencePage_PleaseRestart=Please Restart
16
LanguageEditorPreferencePage_RestartRequired=After changing the default language, a restart is required,\nin order for the new settings to take effect.
eu.etaxonomy.taxeditor.store/OSGI-INF/l10n/messages_de.properties
10 10
CdmDataSourceViewPart_7=Datenquelle
11 11
CdmDataSourceViewPart_8=Typ
12 12
CdmDataSourceViewPart_9=Verf\u00FCgbar
13
LanguageEditorPreferencePage_ChooseDefaultLanguage=Bitte w?hlen Sie die Standardsprache f?r den Taxonomischen Editor aus.
14
LanguageEditorPreferencePage_EditorHasToRestart=Der Taxonomische Editor muss neu gestartet werden, um die Sprache zu wechseln.\nWollen Sie jetzt neu starten?
15
LanguageEditorPreferencePage_PleaseRestart=Bitte neu starten
16
LanguageEditorPreferencePage_RestartRequired=Nach dem Wechsel der Standardsprache ist ein Neustart erforderlich.
17

  
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/Messages.java
1
// $Id$
2
/**
3
 * Copyright (C) 2015 EDIT
4
 * European Distributed Institute of Taxonomy
5
 * http://www.e-taxonomy.eu
6
 *
7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8
 * See LICENSE.TXT at the top of this package for the full license terms.
9
 */
10
package eu.etaxonomy.taxeditor;
11

  
12
import org.eclipse.osgi.util.NLS;
13

  
14
/**
15
 * @author pplitzner
16
 * @date Apr 14, 2015
17
 *
18
 */
19
public class Messages extends NLS {
20
    private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
21
    public static String LanguageEditorPreferencePage_ChooseDefaultLanguage;
22
    public static String LanguageEditorPreferencePage_EditorHasToRestart;
23
    public static String LanguageEditorPreferencePage_PleaseRestart;
24
    public static String LanguageEditorPreferencePage_RestartRequired;
25
    public static String CdmDataSourceViewPart_1;
26
    public static String CdmDataSourceViewPart_10;
27
    public static String CdmDataSourceViewPart_11;
28
    public static String CdmDataSourceViewPart_12;
29
    public static String CdmDataSourceViewPart_2;
30
    public static String CdmDataSourceViewPart_3;
31
    public static String CdmDataSourceViewPart_4;
32
    public static String CdmDataSourceViewPart_5;
33
    public static String CdmDataSourceViewPart_6;
34
    public static String CdmDataSourceViewPart_7;
35
    public static String CdmDataSourceViewPart_8;
36
    public static String CdmDataSourceViewPart_9;
37
    static {
38
        // initialize resource bundle
39
        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
40
    }
41

  
42
    private Messages() {
43
    }
44
}
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/LanguageEditorPreferencePage.java
28 28
import org.eclipse.ui.IWorkbenchPreferencePage;
29 29
import org.eclipse.ui.PlatformUI;
30 30

  
31
import eu.etaxonomy.taxeditor.Messages;
32

  
31 33
/**
32 34
 * @author n.hoffmann
33 35
 * @created Dec 3, 2010
......
56 58
    private void createEditorDefaultLanguage(Composite container) {
57 59
        // TODO Auto-generated method stub
58 60
        final Label description = new Label(container, SWT.NONE);
59
        description.setText("After changing the default language, a restart is required,\nin order for the new settings to take effect.");
61
        description.setText(Messages.LanguageEditorPreferencePage_RestartRequired);
60 62

  
61 63
        final Label label = new Label(container, SWT.NONE);
62
        label.setText("Please choose your default language for the editor: ");
64
        label.setText(Messages.LanguageEditorPreferencePage_ChooseDefaultLanguage);
63 65

  
64 66
        GridData oneLine = new GridData();
65 67
        oneLine.grabExcessHorizontalSpace = true;
......
97 99
    private void restoreSavedSelection() {
98 100
        String rememberedValue = PreferencesUtil.getPreferenceStore().getString(IPreferenceKeys.DEFAULT_LANGUAGE_EDITOR);
99 101
        if(StringUtils.isNotEmpty(rememberedValue)&& StringUtils.isNotBlank(rememberedValue)){
100
            if(rememberedValue.equalsIgnoreCase("en")){
102
            if(rememberedValue.equalsIgnoreCase("en")){ //$NON-NLS-1$
101 103
                combo.select(1);
102
            }else if(rememberedValue.equalsIgnoreCase("de")){
104
            }else if(rememberedValue.equalsIgnoreCase("de")){ //$NON-NLS-1$
103 105
                 combo.select(0);
104 106
            }
105 107
        }
......
107 109

  
108 110
    private enum Language{
109 111

  
110
        GERMAN("Deutsch"), ENGLISH("English");
112
        GERMAN("Deutsch"), ENGLISH("English"); //$NON-NLS-1$ //$NON-NLS-2$
111 113
        private final String label;
112 114
        private Language(String label){
113 115
            this.label = label;
......
136 138
	public boolean performOk() {
137 139
        try {
138 140
            preferencesUtil.writePropertyToConfigFile(combo.getSelectionIndex());
139
            boolean result = MessageDialog.openConfirm(getShell(), "Please Restart", "The Taxonomic Editor has to restart now, in order to complete the language switch.\nDo you want to restart now?");
141
            boolean result = MessageDialog.openConfirm(getShell(), Messages.LanguageEditorPreferencePage_PleaseRestart, Messages.LanguageEditorPreferencePage_EditorHasToRestart);
140 142
            if(result){
141 143
                //Press Ok
142 144
                PlatformUI.getWorkbench().restart();
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/CdmDataSourceViewPart.java
49 49
import org.eclipse.ui.progress.IWorkbenchSiteProgressService;
50 50

  
51 51
import eu.etaxonomy.cdm.config.ICdmSource;
52
import eu.etaxonomy.taxeditor.Messages;
52 53
import eu.etaxonomy.taxeditor.datasource.CdmDataSourceRepository;
53 54
import eu.etaxonomy.taxeditor.model.ContextListenerAdapter;
54 55
import eu.etaxonomy.taxeditor.model.IContextListener;
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/datasource/Messages.java
1
// $Id$
2
/**
3
 * Copyright (C) 2014 EDIT
4
 * European Distributed Institute of Taxonomy
5
 * http://www.e-taxonomy.eu
6
 *
7
 * The contents of this file are subject to the Mozilla Public License Version 1.1
8
 * See LICENSE.TXT at the top of this package for the full license terms.
9
 */
10
package eu.etaxonomy.taxeditor.view.datasource;
11

  
12
import org.eclipse.osgi.util.NLS;
13

  
14
/**
15
 * @author d.schild
16
 * @date 18.06.2014
17
 *
18
 */
19
public class Messages extends NLS {
20
    private static final String BUNDLE_NAME = "OSGI-INF/l10n/messages"; //$NON-NLS-1$
21
    public static String CdmDataSourceViewPart_1;
22
    public static String CdmDataSourceViewPart_10;
23
    public static String CdmDataSourceViewPart_11;
24
    public static String CdmDataSourceViewPart_12;
25
    public static String CdmDataSourceViewPart_2;
26
    public static String CdmDataSourceViewPart_3;
27
    public static String CdmDataSourceViewPart_4;
28
    public static String CdmDataSourceViewPart_5;
29
    public static String CdmDataSourceViewPart_6;
30
    public static String CdmDataSourceViewPart_7;
31
    public static String CdmDataSourceViewPart_8;
32
    public static String CdmDataSourceViewPart_9;
33
    static {
34
        // initialize resource bundle
35
        NLS.initializeMessages(BUNDLE_NAME, Messages.class);
36
    }
37

  
38
    private Messages() {
39
    }
40
}

Also available in: Unified diff