Revision 2519

tmp/org.txm.rcp/src/main/java/org/txm/rcp/corpuswizard/SourceDirectoryPage.java (revision 2519)
42 42
	private Label newOrEdit, corpusNameLabel;
43 43
	
44 44
	public SourceDirectoryPage() {
45
		super("Select source directory");
46
		setTitle("Sources");
47
		setDescription("The source directory contains the sources files read by the import module.");
45
		super(TXMUIMessages.SourceDirectoryPage_0);
46
		setTitle(TXMUIMessages.SourceDirectoryPage_1);
47
		setDescription(TXMUIMessages.SourceDirectoryPage_2);
48 48
	}
49 49
	
50 50
	@Override
......
57 57
		GridData gd = new GridData(GridData.FILL_HORIZONTAL);
58 58
		
59 59
		Label label2 = new Label(container, SWT.NONE);
60
		label2.setText("Source directory");
60
		label2.setText(TXMUIMessages.SourceDirectoryPage_3);
61 61
		
62 62
		Button button = new Button(container, SWT.PUSH);
63
		button.setText("...");
64
		button.setToolTipText("click to select the corpus source directory");
63
		button.setText("..."); //$NON-NLS-1$
64
		button.setToolTipText(TXMUIMessages.SourceDirectoryPage_5);
65 65
		button.addSelectionListener(new SelectionListener() {
66 66
			
67 67
			@Override
68 68
			public void widgetSelected(SelectionEvent e) {
69 69
				DirectoryDialog dialog = new DirectoryDialog(e.display.getActiveShell());
70 70
				dialog.setFilterPath(getSourcePath());
71
				dialog.setText("Source directory to use");
71
				dialog.setText(TXMUIMessages.SourceDirectoryPage_6);
72 72
				if (getSourcePath().length() > 0) {
73 73
					dialog.setFilterPath(getSourcePath());
74 74
				}
75 75
				String path = dialog.open();
76 76
				if (path != null) {
77 77
					sourceDirectory.setText(path);
78
					RCPPreferences.getInstance().put("lastSourcesLocation", path);
78
					RCPPreferences.getInstance().put("lastSourcesLocation", path); //$NON-NLS-1$
79 79
					RCPPreferences.getInstance().flush();
80 80
					
81 81
					String fixed = AsciiUtils.buildId(new File(path).getName()).toUpperCase();
82 82
					if (fixed.length() == 0) {
83 83
						Log.warning(
84
								"Warning: corpus name normalization: no valid character available to build the corpus name (try to use some American English - ASCII - characters in the folder name)");
84
								TXMUIMessages.SourceDirectoryPage_8);
85 85
					}
86 86
					corpusName.setText(fixed);
87 87
					
......
94 94
		});
95 95
		
96 96
		sourceDirectory = new Label(container, SWT.SINGLE);
97
		final String lastSourcesLocation = RCPPreferences.getInstance().getString("lastSourcesLocation");
97
		final String lastSourcesLocation = RCPPreferences.getInstance().getString("lastSourcesLocation"); //$NON-NLS-1$
98 98
		sourceDirectory.setText(lastSourcesLocation);
99 99
		sourceDirectory.setLayoutData(gd);
100 100
		// sourceDirectory.addModifyListener(new ModifyListener() {
......
108 108
		
109 109
		
110 110
		Label label1 = new Label(container, SWT.NONE);
111
		label1.setText("Corpus name");
111
		label1.setText(TXMUIMessages.SourceDirectoryPage_10);
112 112
		
113 113
		corpusName = new Text(container, SWT.BORDER | SWT.SINGLE);
114 114
		corpusName.setLayoutData(GridDataFactory.fillDefaults().span(2, 1).create());
......
156 156
			if (ResourcesPlugin.getWorkspace().getRoot().getProject(getCorpusName()).exists()) {
157 157
				Project p = Toolbox.workspace.getProject(getCorpusName());
158 158
				if (p != null && p.getChildren().size() > 0) {
159
					newOrEdit.setText(NLS.bind("The ''{0}'' corpus will be replaced.", getCorpusName()));
159
					newOrEdit.setText(NLS.bind(TXMUIMessages.SourceDirectoryPage_11, getCorpusName()));
160 160
				}
161 161
				else {
162
					newOrEdit.setText(NLS.bind("The ''{0}'' corpus import will be resumed or restarted.", getCorpusName()));
162
					newOrEdit.setText(NLS.bind(TXMUIMessages.SourceDirectoryPage_12, getCorpusName()));
163 163
				}
164 164
			}
165 165
			else {
166
				newOrEdit.setText(NLS.bind("The ''{0}'' corpus will be created.", getCorpusName()));
166
				newOrEdit.setText(NLS.bind(TXMUIMessages.SourceDirectoryPage_13, getCorpusName()));
167 167
			}
168 168
			
169 169
			String corpusname = corpusName.getText();
170
			Log.fine("Checking corpus name validity with '[A-Z][-A-Z0-9]+': " + corpusname);
170
			Log.fine(TXMUIMessages.SourceDirectoryPage_14 + corpusname);
171 171
			if (!corpusname.matches("[A-Z][-A-Z0-9]+")) { //$NON-NLS-1$
172 172
				newOrEdit.setText(NLS.bind(TXMUIMessages.corpusNameDoesNotMatchesTheAZAZ09120PatternColonP0, corpusname));
173 173
				return false;
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties (revision 2519)
1052 1052
LoadBinaryCorporaDirectory_corpusLoad=Corpus load
1053 1053
LoadBinaryCorporaDirectory_loadingCorporaFromTheP0Directory=Loading corpora from the {0} directory...
1054 1054
LoadBinaryCorporaDirectory_selectTheTXMCorpusToLoad=Select the '.txm' corpus to load.
1055
selectAnotherTXMCorporaToRestore=Select another TXM "corpora" directory to restore...
1055
selectAnotherTXMCorporaToRestore=Select another TXM "corpora" directory to restore...
1056
SourceDirectoryPage_0=Select source directory
1057
SourceDirectoryPage_1=Sources
1058
SourceDirectoryPage_10=Corpus name
1059
SourceDirectoryPage_11=The ''{0}'' corpus will be replaced.
1060
SourceDirectoryPage_12=The ''{0}'' corpus import will be resumed or restarted.
1061
SourceDirectoryPage_13=The ''{0}'' corpus will be created.
1062
SourceDirectoryPage_14=Checking corpus name validity with '[A-Z][-A-Z0-9]+': 
1063
SourceDirectoryPage_2=The source directory contains the sources files read by the import module.
1064
SourceDirectoryPage_3=Source directory
1065
SourceDirectoryPage_5=click to select the corpus source directory
1066
SourceDirectoryPage_6=Source directory to use
1067
SourceDirectoryPage_8=Warning: corpus name normalization: no valid character available to build the corpus name (try to use some American English - ASCII - characters in the folder name)
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties (revision 2519)
1010 1010
selectWorkingDirectory=Répertoire de travail
1011 1011
options=Options...
1012 1012
firstLaunchOfTXM=Premier lancement de TXM
1013
selectAnotherTXMCorporaToRestore=Sélectionner un autre répertoire "corpora" de corpus à récupérer...
1013
selectAnotherTXMCorporaToRestore=Sélectionner un autre répertoire "corpora" de corpus à récupérer...
1014

  
1015
SourceDirectoryPage_0=Selection du répertoire des fichiers sources
1016
SourceDirectoryPage_1=Sources
1017
SourceDirectoryPage_10=Nom du corpus
1018
SourceDirectoryPage_11=Le corpus ''{0}'' sera remplacé.
1019
SourceDirectoryPage_12=L'import du corpus ''{0}'' sera repris ou redémarré
1020
SourceDirectoryPage_13=Le corpus ''{0}'' sera créé.
1021
SourceDirectoryPage_14=Vérification du nom de corpus avec le pattern '[A-Z][-A-Z0-9]+': 
1022
SourceDirectoryPage_2=Le répertoire des fichiers sources qui seront lu par le module d'import
1023
SourceDirectoryPage_3=Répertoire des fichiers sources
1024
SourceDirectoryPage_5=Cliquer pour sélectionner le répertoire des fichiers sources
1025
SourceDirectoryPage_6=Répertoire source à utiliser
1026
SourceDirectoryPage_8=** normalisation du nom du corpus : aucun caractère valide disponible pour construire le nom du corpus (essayez d'utiliser des caractères anglais américain - ASCII - dans le nom du dossier)
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/TXMUIMessages.java (revision 2519)
1122 1122
	
1123 1123
	public static String loginToP0;
1124 1124
	
1125
	public static String SourceDirectoryPage_0;
1126
	
1127
	public static String SourceDirectoryPage_1;
1128
	
1129
	public static String SourceDirectoryPage_10;
1130
	
1131
	public static String SourceDirectoryPage_11;
1132
	
1133
	public static String SourceDirectoryPage_12;
1134
	
1135
	public static String SourceDirectoryPage_13;
1136
	
1137
	public static String SourceDirectoryPage_14;
1138
	
1139
	public static String SourceDirectoryPage_2;
1140
	
1141
	public static String SourceDirectoryPage_3;
1142
	
1143
	public static String SourceDirectoryPage_5;
1144
	
1145
	public static String SourceDirectoryPage_6;
1146
	
1147
	public static String SourceDirectoryPage_8;
1148
	
1125 1149
	static {
1126 1150
		// initialize resource bundle
1127 1151
		Utf8NLS.initializeMessages(BUNDLE_NAME, TXMUIMessages.class);

Also available in: Unified diff