Révision 1347
tmp/org.txm.rcp/src/main/java/org/txm/rcp/commands/ImportSelectedText.java (revision 1347) | ||
---|---|---|
41 | 41 |
import org.eclipse.osgi.util.NLS; |
42 | 42 |
import org.eclipse.swt.widgets.Shell; |
43 | 43 |
import org.txm.Toolbox; |
44 |
import org.txm.core.messages.TXMCoreMessages; |
|
44 | 45 |
import org.txm.core.preferences.TBXPreferences; |
45 | 46 |
import org.txm.objects.Project; |
46 | 47 |
import org.txm.objects.Workspace; |
... | ... | |
76 | 77 |
String corpusName = TXMUIMessages.clipboard_2.toUpperCase()+(nextclipcorpus++); |
77 | 78 |
File wl = Toolbox.workspace.getLocation(); |
78 | 79 |
if (wl == null) { |
79 |
System.out.println("Error: Toolbox not correctly initialized. Aborting clipboard import.");
|
|
80 |
System.err.println("Error: Toolbox is not correctly initialized. Clipboard import aborted.");
|
|
80 | 81 |
return null; |
81 | 82 |
} |
82 | 83 |
while (new File(wl, corpusName).exists()) { |
... | ... | |
112 | 113 |
if (CorpusManager.getCorpusManager().hasCorpus(clipboardDirectory.getName())) { |
113 | 114 |
Shell shell = new Shell(); |
114 | 115 |
boolean b = MessageDialog.openConfirm(shell, |
115 |
TXMUIMessages.confirm, |
|
116 |
NLS.bind(TXMUIMessages.theCorpusAndTheCorpusP0WillBeDeleted, clipboardDirectory.getName())); |
|
116 |
TXMUIMessages.confirm, NLS.bind(TXMUIMessages.theCorpusAndTheCorpusP0WillBeDeleted, clipboardDirectory.getName())); |
|
117 | 117 |
if (!b) |
118 | 118 |
return null; |
119 | 119 |
} |
... | ... | |
123 | 123 |
|
124 | 124 |
File quicksrc = new File(clipboardDirectory, basename + ".txt"); //$NON-NLS-1$ |
125 | 125 |
try { |
126 |
Writer writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(quicksrc)), "UTF-8"); |
|
126 |
Writer writer = new OutputStreamWriter(new BufferedOutputStream(new FileOutputStream(quicksrc)), "UTF-8"); //$NON-NLS-1$
|
|
127 | 127 |
writer.write(text.replace("\t", " ")); //$NON-NLS-1$ //$NON-NLS-2$ |
128 | 128 |
writer.close(); |
129 | 129 |
} catch (Exception e) { |
... | ... | |
139 | 139 |
project = new Project(w, clipboardDirectory.getName()); |
140 | 140 |
} |
141 | 141 |
project.setSourceDirectory(clipboardDirectory.getAbsolutePath()); |
142 |
project.setImportModuleName("txt"); |
|
143 |
project.setEncoding("UTF-8"); |
|
144 |
project.getEditionDefinition("default").setBuildEdition(true); |
|
142 |
project.setImportModuleName("txt"); //$NON-NLS-1$
|
|
143 |
project.setEncoding("UTF-8"); //$NON-NLS-1$
|
|
144 |
project.getEditionDefinition("default").setBuildEdition(true); //$NON-NLS-1$
|
|
145 | 145 |
|
146 | 146 |
String lang = TBXPreferences.getInstance().getString(TBXPreferences.IMPORT_DEFAULT_LANG); |
147 | 147 |
if (lang.length() == 0) lang = Locale.getDefault().getLanguage(); |
148 | 148 |
if ("??".equals(lang)) { //$NON-NLS-1$ |
149 | 149 |
LangDetector detector = new LangDetector(quicksrc); |
150 | 150 |
lang = detector.getLang(); |
151 |
System.out.println(TXMUIMessages.identifiedLanguage+lang);
|
|
151 |
System.out.println(TXMCoreMessages.bind(TXMUIMessages.identifiedLanguage, lang));
|
|
152 | 152 |
} |
153 | 153 |
project.setLang(lang); //$NON-NLS-1$ |
154 |
System.out.println(TXMUIMessages.usingLanguage+project.getLang()); //$NON-NLS-1$
|
|
154 |
System.out.println(TXMCoreMessages.bind(TXMUIMessages.usingLanguage, project.getLang()));
|
|
155 | 155 |
|
156 | 156 |
ExecuteImportScript.executeScript(project); |
157 | 157 |
return null; |
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages.properties (revision 1347) | ||
---|---|---|
473 | 473 |
|
474 | 474 |
iAcceptTheLicenceAndIUndertakeToCiteTXMForAcknowledgingMyUseOfTXMInMyResearchWorkSeeTheCitationSectionOfTheInfhttpDDottextometrieenslyonfrspipphprubrique61SupPage = I accept the licence and I undertake to cite TXM for acknowledging my use of TXM in my research work \n(see the Citation section of the <http://textometrie.ens-lyon.fr/spip.php?rubrique61> page). |
475 | 475 |
|
476 |
identifiedLanguage = Identified Language |
|
476 |
identifiedLanguage = Identified Language: {0}.
|
|
477 | 477 |
|
478 | 478 |
imLookingForDDot = I'm looking for: |
479 | 479 |
|
480 |
importClipboardText = Import clipboard text
|
|
480 |
importClipboardText = Importing clipboard text...
|
|
481 | 481 |
|
482 | 482 |
importParametersOfP0 = Import parameters of {0} |
483 | 483 |
|
... | ... | |
879 | 879 |
|
880 | 880 |
textualPlanes = Textual planes |
881 | 881 |
|
882 |
theCorpusAndTheCorpusP0WillBeDeleted = The corpus and the corpus {0} will be deleted
|
|
882 |
theCorpusAndTheCorpusP0WillBeDeleted = The corpus {0} will be deleted.
|
|
883 | 883 |
|
884 | 884 |
theErrorIsDDot = The error is: |
885 | 885 |
|
... | ... | |
928 | 928 |
|
929 | 929 |
userInterfaceLanguage = User interface language |
930 | 930 |
|
931 |
usingLanguage = Using language |
|
931 |
usingLanguage = Using language: {0}.
|
|
932 | 932 |
|
933 | 933 |
valueSelector = Value selector |
934 | 934 |
|
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_ru.properties (revision 1347) | ||
---|---|---|
379 | 379 |
|
380 | 380 |
iAcceptTheLicenceAndIUndertakeToCiteTXMForAcknowledgingMyUseOfTXMInMyResearchWorkSeeTheCitationSectionOfTheInfhttpDDottextometrieenslyonfrspipphprubrique61SupPage = J'accepte la licence et je m'engage à citer TXM dans mes travaux de recherche \n(voir la section Citation de la page <http://textometrie.ens-lyon.fr/spip.php?rubrique61>) |
381 | 381 |
|
382 |
identifiedLanguage = Идентифицированный язык
|
|
382 |
identifiedLanguage = Идентифицированный язык: {0}.
|
|
383 | 383 |
|
384 | 384 |
imLookingForDDot = Я ищу: |
385 | 385 |
|
386 |
importClipboardText = Импорт текста из буфера обмена
|
|
386 |
importClipboardText = |
|
387 | 387 |
|
388 | 388 |
importParametersOfP0 = Параметры импорта в модуле {0} |
389 | 389 |
|
... | ... | |
695 | 695 |
|
696 | 696 |
textSeparator = Разделитель текста |
697 | 697 |
|
698 |
theCorpusAndTheCorpusP0WillBeDeleted = Корпус {0} будет удален |
|
698 |
theCorpusAndTheCorpusP0WillBeDeleted = Корпус {0} будет удален.
|
|
699 | 699 |
|
700 | 700 |
theErrorIsDDot = Ошибка: |
701 | 701 |
|
... | ... | |
742 | 742 |
|
743 | 743 |
userInterfaceLanguage = Язык интерфейса |
744 | 744 |
|
745 |
usingLanguage = Будет использован
|
|
745 |
usingLanguage = Будет использован: {0}.
|
|
746 | 746 |
|
747 | 747 |
valueSelector = Селектор значений |
748 | 748 |
|
tmp/org.txm.rcp/src/main/java/org/txm/rcp/messages/messages_fr.properties (revision 1347) | ||
---|---|---|
309 | 309 |
|
310 | 310 |
errorInAtOptionNameDeclarationDDot = ** Erreur : déclaration du nom de l'@Option : |
311 | 311 |
|
312 |
errorWhileCallingOrgeclipseuiwindowresetPerspectiveDDot = |
|
313 |
|
|
312 | 314 |
errorWhileComputingCorpusSummary = ** Erreur lors du calcul des informations du corpus |
313 | 315 |
|
314 | 316 |
errorWhileComputingTheConcordanceDDot = ** Une erreur est survenue lors du calcul de la concordance |
... | ... | |
329 | 331 |
|
330 | 332 |
errorWithElementP0 = Erreur : |
331 | 333 |
|
332 |
error_invalidRegularExpression = Expression régulière invalide : {0} |
|
334 |
error_invalidRegularExpression = Expression régulière invalide : {0}
|
|
333 | 335 |
|
334 | 336 |
execDDot = Exec : {0}. |
335 | 337 |
|
... | ... | |
431 | 433 |
|
432 | 434 |
iAcceptTheLicenceAndIUndertakeToCiteTXMForAcknowledgingMyUseOfTXMInMyResearchWorkSeeTheCitationSectionOfTheInfhttpDDottextometrieenslyonfrspipphprubrique61SupPage = J'accepte la licence et je m'engage à citer TXM dans mes travaux de recherche \n(voir la section 'Citation de TXM' de la page <http://textometrie.ens-lyon.fr/spip.php?rubrique61>) |
433 | 435 |
|
434 |
identifiedLanguage = Langue identifiée |
|
436 |
identifiedLanguage = Langue identifiée : {0}.
|
|
435 | 437 |
|
436 | 438 |
imLookingForDDot = Je recherche : |
437 | 439 |
|
438 |
importClipboardText = Importe le texte du presse-papier
|
|
440 |
importClipboardText = Import du texte du presse-papier...
|
|
439 | 441 |
|
440 | 442 |
importParametersOfP0 = Paramètres d''import du module {0} |
441 | 443 |
|
... | ... | |
797 | 799 |
|
798 | 800 |
textualPlanes = Plans textuels |
799 | 801 |
|
800 |
theCorpusAndTheCorpusP0WillBeDeleted = Le corpus {0} va être supprimé |
|
802 |
theCorpusAndTheCorpusP0WillBeDeleted = Le corpus {0} va être supprimé.
|
|
801 | 803 |
|
802 | 804 |
theErrorIsDDot = L'erreur est : |
803 | 805 |
|
... | ... | |
846 | 848 |
|
847 | 849 |
userInterfaceLanguage = Langue de l'interface |
848 | 850 |
|
849 |
usingLanguage = La langue suivante sera utilisée |
|
851 |
usingLanguage = La langue suivante sera utilisée : {0}.
|
|
850 | 852 |
|
851 | 853 |
valueSelector = Sélecteur de valeurs |
852 | 854 |
|
Formats disponibles : Unified diff