Révision 3449

TXM/trunk/org.txm.referencer.rcp/src/org/txm/referencer/rcp/messages/ReferencerUIMessages.java (revision 3449)
21 21
	public static String showingPreviousResultPage; 
22 22
	public static String referencePattern; 
23 23
	public static String referencer; 
24
	public static String orderReferencesByFrequency; 
24
	public static String orderReferencesByFrequency;
25
	public static String showCounts; 
25 26

  
26 27
	static {
27 28
		// initialize resource bundle
TXM/trunk/org.txm.referencer.rcp/src/org/txm/referencer/rcp/messages/messages_fr.properties (revision 3449)
8 8
showingLastResultPage=Affichage de la dernière page de résultats
9 9
showingNextResultPage=Affichage de la page de résultats suivante 
10 10
showingPreviousResultPage=Affichage de la page de résultats précédente 
11
showCounts=Show counts
TXM/trunk/org.txm.referencer.rcp/src/org/txm/referencer/rcp/messages/messages.properties (revision 3449)
8 8
showingLastResultPage=Showing the last page of results
9 9
showingNextResultPage=Showing the next page of results
10 10
showingPreviousResultPage=Showing the previous page of results
11
showCounts=Show counts
TXM/trunk/org.txm.referencer.rcp/src/org/txm/referencer/rcp/editors/ReferencerEditor.java (revision 3449)
194 194
		
195 195
		// [show counts]
196 196
		showCountsButton = new Button(paramArea, SWT.CHECK);
197
		showCountsButton.setText("Show counts");
197
		showCountsButton.setText(ReferencerUIMessages.showCounts);
198 198
		showCountsButton.setSelection(referencer.getShowCounts());
199 199
		
200 200
		
TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/messages/CQPUIMessages.java (revision 3449)
14 14
	
15 15
	private static final String BUNDLE_NAME = "org.txm.searchengine.cqp.rcp.messages.messages"; //$NON-NLS-1$
16 16
	
17
	public static String cQPlibPath; 
17
	public static String cQPlibPath;
18

  
19
	public static String creatingANewPartitionWithP0; 
18 20
	public static String useNetworkProtocol; 
19 21
	public static String ampRemoteCWBServerAddressColon; 
20 22
	public static String cWBServerColonAmphostColon; 
......
23 25
	public static String cWBServerColonAmppasswordColon; 
24 26
	public static String pathToCWBServerBinary; 
25 27
	public static String pathToCWBServerInitializationFile; 
26
	public static String additionalAmpoptionsForTheCWBServerColon; 
28
	public static String additionalAmpoptionsForTheCWBServerColon;
29

  
30
	public static String AddExtraFiles;
31

  
32
	public static String AvailablesSubcorpus;
33

  
34
	public static String ChangeThisIdentifierToRenameTheCorpus;
35

  
36
	public static String ClearSelection;
37

  
38
	public static String CorpusIndentifier;
39

  
40
	public static String CorpusVersion;
41

  
42
	public static String DirectoriesNotManagedByTXM;
43

  
44
	public static String ErrorAllPartsAreEmpty;
45

  
46
	public static String ErrorSelectedSubcorpusHaveDifferentMainCorpusP0;
47

  
48
	public static String ErrorSelectionSize2;
49

  
50
	public static String errorColonThePartitionCreatedHasNoPart;
51

  
52
	public static String errorColonThePartitionWasNotCreated;
53

  
54
	public static String errorWhileCreatingAPartitionColonP0;
55

  
56
	public static String ExportingP0;
57

  
58
	public static String Name;
59

  
60
	public static String noSelectionForColon;
61

  
62
	public static String OutputFile;
63

  
64
	public static String refreshingCorpora;
65

  
66
	public static String SelectAll;
67

  
68
	public static String SelectASubcorpusInTheList;
69

  
70
	public static String WarningSomePartsAreEmptyP0; 
27 71
	
28 72
	static {
29 73
		// initialize resource bundle
TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/messages/messages.properties (revision 3449)
2 2
#Tue Dec 18 10:24:08 CET 2018
3 3
additionalAmpoptionsForTheCWBServerColon=Additional &options for the CQP server\: 
4 4
ampRemoteCWBServerAddressColon=&Remote CWB server address\:
5
AddExtraFiles=Add extra files
6
AvailablesSubcorpus=Availables Subcorpus
7
ChangeThisIdentifierToRenameTheCorpus=Change this identifier to rename the corpus
8
ClearSelection=Clear selection
9
CorpusIndentifier=Corpus identifier
10
CorpusVersion=Corpus version
5 11
cQPlibPath=CQPlib path
12
creatingANewPartitionWithP0=Creating a new partition on {0}
6 13
cWBServerColonAmphostColon=Remote CQP server\: &host\:
7 14
cWBServerColonAmploginColon=Remote CQP server\: &login\:
8 15
cWBServerColonAmppasswordColon=Remote CQP server\: &password\:
9 16
cWBServerColonAmpportColon=Remote CQP server\: network &port\:
17
DirectoriesNotManagedByTXM=Directories not managed by TXM
18
ErrorAllPartsAreEmpty=Error: all parts are empty.
19
ErrorSelectedSubcorpusHaveDifferentMainCorpusP0=Error: selected subcorpus have different main corpus: 
20
ErrorSelectionSize2=Error: selection size \!= 2 : 
21
errorColonThePartitionCreatedHasNoPart=** Error: the partition created is empty.
22
errorColonThePartitionWasNotCreated=** Error: the partition has not been created.
23
errorWhileCreatingAPartitionColonP0=** Error while creating a partition: {0}
24
ExportingP0=Exporting {0}...
25
Name=Name
26
noSelectionForColon=No selection for: 
27
OutputFile=Output file
10 28
pathToCWBServerBinary=Path to the CQP server executable file
11 29
pathToCWBServerInitializationFile=Path to the CQP server configuration file
30
refreshingCorpora=Updating the Corpus view
31
SelectAll=Select All
32
SelectASubcorpusInTheList=[select a subcorpus in the list]
12 33
useNetworkProtocol=Use the network protocol
34
WarningSomePartsAreEmptyP0=Warning: some parts are empty: {0}
TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ComputeIntersection.java (revision 3449)
19 19
import org.txm.searchengine.cqp.corpus.CqpObject;
20 20
import org.txm.searchengine.cqp.corpus.MainCorpus;
21 21
import org.txm.searchengine.cqp.corpus.Subcorpus;
22
import org.txm.searchengine.cqp.rcp.messages.CQPUIMessages;
22 23
import org.txm.utils.logger.Log;
23 24

  
24 25
public class ComputeIntersection extends BaseAbstractHandler {
......
46 47
			if (o instanceof Subcorpus) subcorpora.add((Subcorpus) o);
47 48
		
48 49
		if (subcorpora.size() != 2) {
49
			System.out.println("Error: selection size != 2 : " + subcorpora.size());
50
			System.out.println(CQPUIMessages.ErrorSelectionSize2 + subcorpora.size());
50 51
			return null;
51 52
		}
52 53
		
......
62 63
			}
63 64
		}
64 65
		if (set.size() > 1) {
65
			System.out.println("Error: selected subcorpus have different main corpus: " + set);
66
			System.out.println(CQPUIMessages.ErrorSelectedSubcorpusHaveDifferentMainCorpusP0 + set);
66 67
			return null;
67 68
		}
68 69
		
......
70 71
		String id1 = subcorpora.get(0).getQualifiedCqpId();
71 72
		String id2 = subcorpora.get(1).getQualifiedCqpId();
72 73
		String cqpid = CqpObject.subcorpusNamePrefix + CQPCorpus.getNextSubcorpusCounter();
73
		String command = "inter";
74
		String command = "inter"; //$NON-NLS-1$
74 75
		AbstractCqiClient CQI = CQPSearchEngine.getCqiClient();
75 76
		
76 77
		// TODO: finish the command
TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/handlers/base/ComputePartition.java (revision 3449)
54 54
import org.txm.searchengine.cqp.corpus.Part;
55 55
import org.txm.searchengine.cqp.corpus.Partition;
56 56
import org.txm.searchengine.cqp.rcp.editor.PartitionEditor;
57
import org.txm.searchengine.cqp.rcp.messages.CQPUIMessages;
57 58
import org.txm.utils.logger.Log;
58 59

  
59 60
/**
......
134 135
		Partition part = null;
135 136
		if (firstElement instanceof CQPCorpus) {
136 137
			part = new Partition((CQPCorpus) firstElement);
137
			part.setParameters("", new ArrayList<String>(), new ArrayList<String>());
138
			part.setParameters("", new ArrayList<String>(), new ArrayList<String>()); //$NON-NLS-1$
138 139
		}
139 140
		else if (firstElement instanceof Partition) {
140 141
			part = (Partition) firstElement;
......
192 193
								}
193 194
							}
194 195
							if (emptyParts.size() == partition.getPartsCount()) {
195
								Log.warning(NLS.bind("Error: all parts are empty.", partition.getPartsCount()));
196
								Log.warning(NLS.bind(CQPUIMessages.ErrorAllPartsAreEmpty, partition.getPartsCount()));
196 197
								return Status.CANCEL_STATUS;
197 198
							}
198 199
							else if (emptyParts.size() != 0) {
199
								Log.warning(NLS.bind("Warning: some parts are empty: {0}", emptyParts));
200
								Log.warning(NLS.bind(CQPUIMessages.WarningSomePartsAreEmptyP0, emptyParts));
200 201
							}
201 202
							
202 203
							subMonitor.subTask(TXMUIMessages.refreshingCorpora);
TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/dialogs/SetOperationsDialog.java (revision 3449)
38 38
import org.txm.rcp.swt.provider.SimpleLabelProvider;
39 39
import org.txm.searchengine.cqp.corpus.CQPCorpus;
40 40
import org.txm.searchengine.cqp.corpus.Subcorpus;
41
import org.txm.searchengine.cqp.rcp.messages.CQPUIMessages;
41 42

  
42 43
/**
43 44
 * 
......
59 60
	
60 61
	public static HashMap<String, String> operations = new HashMap<String, String>();
61 62
	static {
62
		operations.put("UNION", "''{0}'' subcorpus union with...");
63
		operations.put("INTER", "''{0}'' subcorpus intersection with...");
64
		operations.put("MINUS", "''{0}'' subcorpus minus");
65
		operations.put("COMPL", "''{0}'' subcorpus complement...");
63
		operations.put("UNION", "''{0}'' subcorpus union with..."); //$NON-NLS-1$ //$NON-NLS-2$
64
		operations.put("INTER", "''{0}'' subcorpus intersection with..."); //$NON-NLS-1$ //$NON-NLS-2$
65
		operations.put("MINUS", "''{0}'' subcorpus minus"); //$NON-NLS-1$ //$NON-NLS-2$
66
		operations.put("COMPL", "''{0}'' subcorpus complement..."); //$NON-NLS-1$ //$NON-NLS-2$
66 67
	}
67 68
	
68 69
	public static HashMap<String, String> symbols = new HashMap<String, String>();
69 70
	static {
70
		symbols.put("UNION", "{0} ∪ {1}");
71
		symbols.put("INTER", "{0} ∩ {1}");
72
		symbols.put("MINUS", "{0} - {1}");
73
		symbols.put("COMPL", "-{0}");
71
		symbols.put("UNION", "{0} ∪ {1}"); //$NON-NLS-1$ //$NON-NLS-2$
72
		symbols.put("INTER", "{0} ∩ {1}"); //$NON-NLS-1$ //$NON-NLS-2$
73
		symbols.put("MINUS", "{0} - {1}"); //$NON-NLS-1$ //$NON-NLS-2$
74
		symbols.put("COMPL", "-{0}"); //$NON-NLS-1$ //$NON-NLS-2$
74 75
	}
75 76
	
76 77
	/**
......
84 85
		super(parentShell);
85 86
		this.operation = operation;
86 87
		this.corpus[0] = corpus1;
87
		if (this.operation.equals("COMPL")) {
88
		if (this.operation.equals("COMPL")) { //$NON-NLS-1$
88 89
			this.corpus[1] = corpus1.getCorpusParent();
89 90
		}
90 91
	}
......
104 105
		layout.numColumns = 2;
105 106
		
106 107
		Label l = new Label(comp, SWT.LEFT);
107
		l.setText("Name");
108
		l.setText(CQPUIMessages.Name);
108 109
		l.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false));
109 110
		
110 111
		textField = new Text(comp, SWT.SINGLE|SWT.BORDER);
111 112
		textField.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
112 113

  
113 114
		treeViewer = new TreeViewer (comp, SWT.SINGLE | SWT.BORDER);
114
		if (this.operation.equals("COMPL")) {
115
		if (this.operation.equals("COMPL")) { //$NON-NLS-1$
115 116
			treeViewer.getTree().setEnabled(false);
116 117
		}
117 118
		treeViewer.setContentProvider(new ITreeContentProvider() {
......
176 177
		});
177 178

  
178 179
		nameColumn = new TreeViewerColumn(treeViewer, SWT.NONE);
179
		nameColumn.getColumn().setText("Availables Subcorpus");
180
		nameColumn.getColumn().setText(CQPUIMessages.AvailablesSubcorpus);
180 181
		nameColumn.getColumn().setWidth(150);
181 182
		nameColumn.setLabelProvider(new CellLabelProvider() {
182 183
			@Override
......
186 187
				if (element instanceof CQPCorpus) {
187 188
					cell.setText(((CQPCorpus)element).getName());
188 189
				} else {
189
					cell.setText("");
190
					cell.setText(""); //$NON-NLS-1$
190 191
				}
191 192
			}
192 193
		});
......
214 215
	}
215 216

  
216 217
	public String getDefaultName() {
217
		String s = "[select a subcorpus in the list]";
218
		String s = CQPUIMessages.SelectASubcorpusInTheList;
218 219
		if (corpus[1] != null) {
219 220
			s = corpus[1].getSimpleName();
220 221
		}
TXM/trunk/org.txm.searchengine.cqp.rcp/src/org/txm/searchengine/cqp/rcp/dialogs/ExportCorpusDialog.java (revision 3449)
37 37
import org.txm.core.preferences.TXMPreferences;
38 38
import org.txm.objects.Project;
39 39
import org.txm.searchengine.cqp.corpus.CQPCorpus;
40
import org.txm.searchengine.cqp.rcp.messages.CQPUIMessages;
40 41

  
41 42
/**
42 43
 * Allow to select the file to create and select elements to include in the binary
......
48 49
	/**
49 50
	 * list of the default files to include in the corpus binary
50 51
	 */
51
	private List<String> defaultFiles = Arrays.asList("HTML", "txm", "data", "registry", "analec", "temporary_annotations", "xsl", "css", ".settings", ".project", "doc");
52
	private List<String> defaultFiles = Arrays.asList("HTML", "txm", "data", "registry", "analec", "temporary_annotations", "xsl", "css", ".settings", ".project", "doc"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$
52 53
	
53 54
	private File zipFile;
54 55
	
......
89 90
	@Override
90 91
	protected void configureShell(Shell newShell) {
91 92
		super.configureShell(newShell);
92
		newShell.setText(NLS.bind("Exporting {0}...", corpus.getProject().getName().toUpperCase()));
93
		newShell.setText(NLS.bind(CQPUIMessages.ExportingP0, corpus.getProject().getName().toUpperCase()));
93 94
		newShell.setMinimumSize(400, 300);
94 95
	}
95 96
	
......
101 102
		layout.numColumns = 3;
102 103
		
103 104
		Label l = new Label(comp, SWT.LEFT);
104
		l.setText("Output file");
105
		l.setText(CQPUIMessages.OutputFile);
105 106
		l.setLayoutData(new GridData(GridData.BEGINNING, GridData.CENTER, false, false));
106 107
		
107 108
		textField = new Text(comp, SWT.SINGLE | SWT.BORDER);
108 109
		textField.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
109
		String previousPath = TXMPreferences.getString("path", ExportCorpusDialog.class.getName());
110
		String previousPath = TXMPreferences.getString("path", ExportCorpusDialog.class.getName()); //$NON-NLS-1$
110 111
		if (previousPath == null || previousPath.length() == 0) {
111
			previousPath = System.getProperty("user.home"); //
112
			previousPath = System.getProperty("user.home"); // //$NON-NLS-1$
112 113
		}
113
		textField.setText(previousPath + "/" + corpus.getProject().getName().toUpperCase() + "-" + Toolbox.dateformat.format(Calendar.getInstance().getTime()) + ".txm"); //$NON-NLS-1$
114
		textField.setText(previousPath + "/" + corpus.getProject().getName().toUpperCase() + "-" + Toolbox.dateformat.format(Calendar.getInstance().getTime()) + ".txm"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
114 115
		
115 116
		selectButton = new Button(comp, SWT.PUSH);
116
		selectButton.setText("...");
117
		selectButton.setText("..."); //$NON-NLS-1$
117 118
		selectButton.addSelectionListener(new SelectionListener() {
118 119
			
119 120
			@Override
......
140 141
					textField.setText(path);
141 142
					File dir = new File(path).getParentFile();
142 143
					getButton(IDialogConstants.OK_ID).setEnabled(dir.exists());
143
					TXMPreferences.put(ExportCorpusDialog.class.getName(), "path", dir.getAbsolutePath());
144
					TXMPreferences.put(ExportCorpusDialog.class.getName(), "path", dir.getAbsolutePath()); //$NON-NLS-1$
144 145
				}
145 146
			}
146 147
			
......
148 149
			public void widgetDefaultSelected(SelectionEvent e) {}
149 150
		});
150 151
		
151
		new Label(comp, SWT.NONE).setText("Corpus identifier");
152
		new Label(comp, SWT.NONE).setText(CQPUIMessages.CorpusIndentifier);
152 153
		renameField = new Text(comp, SWT.BORDER);
153 154
		GridData gdata2 = GridDataFactory.fillDefaults().create();
154 155
		gdata2.widthHint = 50;
155 156
		gdata2.horizontalSpan = 2;
156 157
		renameField.setLayoutData(gdata2);
157 158
		renameField.setText(corpus.getProject().getName());
158
		renameField.setToolTipText("Change this identifier to rename the corpus");
159
		renameField.setToolTipText(CQPUIMessages.ChangeThisIdentifierToRenameTheCorpus);
159 160
		
160
		new Label(comp, SWT.NONE).setText("Corpus version");
161
		new Label(comp, SWT.NONE).setText(CQPUIMessages.CorpusVersion);
161 162
		versionField = new Combo(comp, SWT.SINGLE | SWT.READ_ONLY);
162
		versionField.setItems("0.8.0", "0.7.9");
163
		versionField.setItems("0.8.0", "0.7.9"); //$NON-NLS-1$ //$NON-NLS-2$
163 164
		versionField.select(0);
164 165
		GridData gdata = GridDataFactory.fillDefaults().create();
165 166
		gdata.widthHint = 50;
......
176 177
				
177 178
				@Override
178 179
				public boolean accept(File f) {
179
					return !f.getName().startsWith(".") && !f.isHidden() && f.isDirectory() && !defaultFiles.contains(f.getName());
180
					return !f.getName().startsWith(".") && !f.isHidden() && f.isDirectory() && !defaultFiles.contains(f.getName()); //$NON-NLS-1$
180 181
				}
181 182
			});
182 183
			Arrays.sort(files, new Comparator<File>() {
......
213 214
			
214 215
			if (files.length > 0) {
215 216
				treeViewer = new TableViewer(comp, SWT.CHECK | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
216
				treeViewer.getTable().setToolTipText("Directories not managed by TXM");
217
				treeViewer.getTable().setToolTipText(CQPUIMessages.DirectoriesNotManagedByTXM);
217 218
				treeViewer.setContentProvider(new ArrayContentProvider());
218 219
				
219 220
				treeViewer.getTable().addListener(SWT.Selection, event -> {
......
229 230
				treeViewer.getTable().setLinesVisible(true);
230 231
				
231 232
				nameColumn = new TableViewerColumn(treeViewer, SWT.NONE);
232
				nameColumn.getColumn().setText("Add extra files");
233
				nameColumn.getColumn().setText(CQPUIMessages.AddExtraFiles);
233 234
				nameColumn.getColumn().pack();
234 235
				nameColumn.setLabelProvider(new CellLabelProvider() {
235 236
					
......
242 243
							cell.setText(f.getName());
243 244
						}
244 245
						else {
245
							cell.setText("" + element.getClass());
246
							cell.setText("" + element.getClass()); //$NON-NLS-1$
246 247
						}
247 248
					}
248 249
				});
......
253 254
				}
254 255
				
255 256
				Button selectAllButton = new Button(comp, SWT.PUSH);
256
				selectAllButton.setText("Select All");
257
				selectAllButton.setText(CQPUIMessages.SelectAll);
257 258
				selectAllButton.addSelectionListener(new SelectionListener() {
258 259
					
259 260
					@Override
......
266 267
				});
267 268
				
268 269
				Button clearAllButton = new Button(comp, SWT.PUSH);
269
				clearAllButton.setText("Clear selection");
270
				clearAllButton.setText(CQPUIMessages.ClearSelection);
270 271
				clearAllButton.addSelectionListener(new SelectionListener() {
271 272
					
272 273
					@Override

Formats disponibles : Unified diff