Révision 2280
tmp/org.txm.core/src/java/org/txm/core/messages/messages.properties (revision 2280) | ||
---|---|---|
16 | 16 |
catalogFileNotFoundP0 = ** Catalog file {0} not found. |
17 | 17 |
|
18 | 18 |
checkingBinaryFormat = Checking binary corpus format... |
19 |
|
|
20 |
corpusImportDoneInP0=Import done in {0}. |
|
21 |
corpusUpdateDoneInP0=Update done in {0}. |
|
22 |
creatingCorpus = Importing corpus... |
|
23 |
updatingcorpus = Updating corpus... |
|
19 | 24 |
|
20 | 25 |
common_P0ItemsForP1Occurrences = {0} item(s) for {1} occurrence(s). |
21 | 26 |
common_P0Occurrences = {0} occurrence(s). |
tmp/org.txm.core/src/java/org/txm/core/messages/TXMCoreMessages.java (revision 2280) | ||
---|---|---|
57 | 57 |
|
58 | 58 |
public static String P0BuiltParts; |
59 | 59 |
|
60 |
public static String corpusImportDoneInP0; |
|
61 |
public static String corpusUpdateDoneInP0; |
|
60 | 62 |
|
61 |
|
|
62 | 63 |
public static String ToolboxStatesWorkspaceColonP0; |
63 | 64 |
public static String binaryDirectoryP0NotFound; |
64 | 65 |
public static String cQiClientNotInitialized; |
... | ... | |
174 | 175 |
|
175 | 176 |
public static String initializingToolbox; |
176 | 177 |
|
177 |
public static String fminP0fmaxP1tP2vP3; |
|
178 |
public static String fminP0fmaxP1tP2vP3; |
|
179 |
|
|
180 |
public static String creatingCorpus; |
|
181 |
public static String updatingCorpus; |
|
178 | 182 |
|
179 | 183 |
/** |
180 | 184 |
* Binds the given message's substitution locations with the given string values. |
tmp/org.txm.core/src/java/org/txm/core/messages/messages_fr.properties (revision 2280) | ||
---|---|---|
46 | 46 |
common_units = Unités |
47 | 47 |
common_vMax = Vmax |
48 | 48 |
common_warning = Avertissement |
49 |
|
|
50 |
corpusImportDone = Import terminé en {0}. |
|
51 |
corpusUpdateDone = Mise à jour terminée en {0}. |
|
52 |
creatingCorpus = Import du corpus... |
|
53 |
updatingcorpus = Mise à jour du corpus... |
|
49 | 54 |
|
50 | 55 |
computingColon = Calcul: |
51 | 56 |
|
tmp/org.txm.core/src/java/org/txm/utils/ConsoleProgressBar.java (revision 2280) | ||
---|---|---|
10 | 10 |
int point_progress = 0; |
11 | 11 |
boolean done = false; |
12 | 12 |
String mode = "%%% "; |
13 |
int percent = 1; |
|
14 |
|
|
13 | 15 |
public ConsoleProgressBar(long amount) { |
14 | 16 |
start(amount); |
15 | 17 |
} |
16 | 18 |
|
17 | 19 |
public void start(long amount) { |
18 | 20 |
progress = 0.0d; |
21 |
percent = 1; |
|
19 | 22 |
point_progress = 0; |
20 | 23 |
done = false; |
21 | 24 |
progress_per_tick = 100f / amount; |
... | ... | |
33 | 36 |
progress += progress_per_tick; |
34 | 37 |
while (progress > point_progress) { |
35 | 38 |
point_progress++; |
36 |
if (point_progress%LINE_PROGRESS == 0) System.out.print("|"); |
|
39 |
if (point_progress%LINE_PROGRESS == 0) { |
|
40 |
// System.out.print("|"); |
|
41 |
System.out.print(percent++); |
|
42 |
} |
|
37 | 43 |
else System.out.print("."); |
38 | 44 |
|
39 | 45 |
if (point_progress == TOTAL_PROGRESS) { |
... | ... | |
44 | 50 |
} |
45 | 51 |
|
46 | 52 |
public static void main(String[] args) { |
47 |
int[] amounts = {10,50,150,155,15000,150000};
|
|
53 |
int[] amounts = {10,42,150,155,15000,150000};
|
|
48 | 54 |
for (int amount : amounts) { |
49 | 55 |
System.out.println(""+amount+" ticks"); |
50 | 56 |
ConsoleProgressBar cpb = new ConsoleProgressBar(amount); |
tmp/org.txm.core/src/java/org/txm/importer/xtz/ImportModule.java (revision 2280) | ||
---|---|---|
6 | 6 |
|
7 | 7 |
import org.eclipse.core.runtime.CoreException; |
8 | 8 |
import org.eclipse.core.runtime.IProgressMonitor; |
9 |
import org.txm.core.messages.TXMCoreMessages; |
|
9 | 10 |
import org.txm.objects.Project; |
10 | 11 |
import org.txm.objects.Text; |
11 | 12 |
import org.txm.utils.DeleteDir; |
... | ... | |
103 | 104 |
binaryDirectory.mkdirs(); // ensure output exists |
104 | 105 |
//System.out.println("ImportModule.start"); |
105 | 106 |
if (!updateCorpus) { // create XML-TXM files and annotate |
106 |
//System.out.println("ImportModule.start: not updating");
|
|
107 |
System.out.println(TXMCoreMessages.creatingCorpus);
|
|
107 | 108 |
if (importer != null) { |
108 | 109 |
//System.out.println("ImportModule.start: importer: "+importer); |
109 | 110 |
if (monitor != null) monitor.subTask("-- IMPORTER - Reading source files"); |
... | ... | |
152 | 153 |
//System.out.println("XML-TXM files already annotated."); |
153 | 154 |
} |
154 | 155 |
} else { |
155 |
System.out.println("Updating corpus...");
|
|
156 |
System.out.println(TXMCoreMessages.updatingCorpus);
|
|
156 | 157 |
// fixing Text XML-TXM configurations |
157 | 158 |
for (Text text : project.getTexts()) { |
158 | 159 |
File f = text.getXMLTXMFile(); |
159 | 160 |
if (f == null || !f.exists()) { |
160 |
|
|
161 | 161 |
f = new File(project.getProjectDirectory(), "txm/"+project.getName()+"/"+text.getName()+".xml"); |
162 | 162 |
text.setTXMFile(f); |
163 | 163 |
} |
Formats disponibles : Unified diff