Révision 3815
TXM/trunk/bundles/org.txm.annotation.core/src/org/txm/annotation/core/Messages.java (revision 3815) | ||
---|---|---|
1 |
package org.txm.annotation.core; |
|
2 |
|
|
3 |
import org.eclipse.osgi.util.NLS; |
|
4 |
import org.txm.utils.messages.Utf8NLS; |
|
5 |
|
|
6 |
public class Messages extends NLS { |
|
7 |
|
|
8 |
public static String ErrorFailedToStopAnnotationEngineP0P1; |
|
9 |
public static String FailToInitializeTheP0AnnotationEngine; |
|
10 |
public static String FailToInstanciateP0P1; |
|
11 |
public static String ErrorNoSuitableFileToProcessInP0; |
|
12 |
|
|
13 |
static { |
|
14 |
// initialize resource bundle |
|
15 |
Utf8NLS.initializeMessages(Messages.class); |
|
16 |
} |
|
17 |
|
|
18 |
private Messages() { } |
|
19 |
} |
|
0 | 20 |
TXM/trunk/bundles/org.txm.annotation.core/src/org/txm/annotation/core/messages_fr.properties (revision 3815) | ||
---|---|---|
1 |
AnnotationEnginesManager_ErrorFailedToStopAnnotationEngineP0P1=?chec lors de l''arr?te du moteur d'annotation ''{0}'' : {1} |
|
2 |
AnnotationEnginesManager_FailToInitializeTheP0AnnotationEngine=?chec lors de l''initialisation du moteur d''annotation {0}. |
|
3 |
AnnotationEnginesManager_FailToInstanciateP0P1=?chec de l'instanciation de {0} : {1}. |
|
4 |
ErrorNoSuitableFileToProcessInP0=Erreur: pas de fichier ? traiter dans {0}. |
|
0 | 5 |
TXM/trunk/bundles/org.txm.annotation.core/src/org/txm/annotation/core/AnnotationEnginesManager.java (revision 3815) | ||
---|---|---|
66 | 66 |
for (AnnotationEngine e : values()) { |
67 | 67 |
// System.out.println(e); |
68 | 68 |
AnnotationEngine se = e; |
69 |
Log.fine("Stoping " + se.getName() + " annotation engine."); |
|
69 |
Log.fine("Stoping " + se.getName() + " annotation engine."); //$NON-NLS-1$ //$NON-NLS-2$
|
|
70 | 70 |
try { |
71 | 71 |
se.stop(); |
72 | 72 |
} |
73 | 73 |
catch (Exception ex) { |
74 |
Log.severe("Error: failed to stop annotation engine: " + se.getName() + ": " + ex.getLocalizedMessage());
|
|
74 |
Log.severe(Messages.ErrorFailedToStopAnnotationEngineP0P1 + se.getName() + ": " + ex.getLocalizedMessage());
|
|
75 | 75 |
} |
76 | 76 |
} |
77 | 77 |
return true; |
... | ... | |
94 | 94 |
put(e.getName(), e); |
95 | 95 |
} |
96 | 96 |
else { |
97 |
Log.warning(NLS.bind("Fail to initialize the {0} annotation engine.", e.getName()));
|
|
97 |
Log.warning(NLS.bind(Messages.FailToInitializeTheP0AnnotationEngine, e.getName()));
|
|
98 | 98 |
} |
99 | 99 |
} |
100 | 100 |
catch (Exception e) { |
101 |
Log.warning(NLS.bind("Fail to instanciate {0}: {1}", contributions[i].getName(), e.getLocalizedMessage()));
|
|
101 |
Log.warning(NLS.bind(Messages.FailToInstanciateP0P1, contributions[i].getName(), e.getLocalizedMessage()));
|
|
102 | 102 |
Log.printStackTrace(e); |
103 | 103 |
} |
104 | 104 |
} |
TXM/trunk/bundles/org.txm.annotation.core/src/org/txm/annotation/core/AnnotationEngine.java (revision 3815) | ||
---|---|---|
64 | 64 |
|
65 | 65 |
@Override |
66 | 66 |
public boolean accept(File pathname) { |
67 |
return pathname.isFile() && !pathname.isHidden() && !pathname.getName().startsWith(".") && pathname.getName().endsWith(".xml"); |
|
67 |
return pathname.isFile() && !pathname.isHidden() && !pathname.getName().startsWith(".") && pathname.getName().endsWith(".xml"); //$NON-NLS-1$ //$NON-NLS-2$
|
|
68 | 68 |
} |
69 | 69 |
}); |
70 | 70 |
if (files == null || files.length == 0) { |
71 |
Log.warning("Error: no suitable file to process in " + xmlFilesDirectory);
|
|
71 |
Log.warning(Messages.ErrorNoSuitableFileToProcessInP0 + xmlFilesDirectory);
|
|
72 | 72 |
return false; |
73 | 73 |
} |
74 | 74 |
boolean ret = true; |
75 | 75 |
ConsoleProgressBar cpb = new ConsoleProgressBar(files.length); |
76 | 76 |
|
77 |
File annotDir = new File(binaryCorpusDirectory, "annotations"); |
|
77 |
File annotDir = new File(binaryCorpusDirectory, "annotations"); //$NON-NLS-1$
|
|
78 | 78 |
DeleteDir.deleteDirectory(annotDir); |
79 | 79 |
annotDir.mkdir(); |
80 |
File ptreetaggerDir = new File(binaryCorpusDirectory, "ptreetagger"); |
|
80 |
File ptreetaggerDir = new File(binaryCorpusDirectory, "ptreetagger"); //$NON-NLS-1$
|
|
81 | 81 |
DeleteDir.deleteDirectory(ptreetaggerDir); |
82 | 82 |
ptreetaggerDir.mkdir(); |
83 |
File treetaggerDir = new File(binaryCorpusDirectory, "treetagger"); |
|
83 |
File treetaggerDir = new File(binaryCorpusDirectory, "treetagger"); //$NON-NLS-1$
|
|
84 | 84 |
DeleteDir.deleteDirectory(treetaggerDir); |
85 | 85 |
treetaggerDir.mkdir(); |
86 | 86 |
|
TXM/trunk/bundles/org.txm.annotation.core/src/org/txm/annotation/core/messages.properties (revision 3815) | ||
---|---|---|
1 |
AnnotationEnginesManager_ErrorFailedToStopAnnotationEngineP0P1=Error: failed to stop the ''{0}'' annotation engine: {1}. |
|
2 |
AnnotationEnginesManager_FailToInitializeTheP0AnnotationEngine=Fail to initialize the {0} annotation engine. |
|
3 |
AnnotationEnginesManager_FailToInstanciateP0P1=Fail to instanciate {0}: {1}. |
|
4 |
ErrorNoSuitableFileToProcessInP0=Error: no suitable file to process in {0}. |
|
0 | 5 |
Formats disponibles : Unified diff