Skip to content
Extraits de code Groupes Projets
Valider 9fec6769 rédigé par Patrick Watrin's avatar Patrick Watrin
Parcourir les fichiers

Fix UnitexConstants.OUTPUT_MODE_RELACE > UnitexConstants.OUTPUT_MODE_REPLACE

parent a695bc4e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -66,7 +66,7 @@ class UnitexConstants(object):
OUTPUT_MODE_MERGE = "merge"
OUTPUT_MODE_IGNORE = "ignore"
OUTPUT_MODE_RELACE = "replace"
OUTPUT_MODE_REPLACE = "replace"
ON_ERROR_EXIT = "exit"
ON_ERROR_IGNORE = "ignore"
......
......@@ -393,7 +393,7 @@ class LocateOptions(Options):
output_mode = options.get("output_mode", UnitexConstants.OUTPUT_MODE_IGNORE)
if output_mode not in (UnitexConstants.OUTPUT_MODE_IGNORE,
UnitexConstants.OUTPUT_MODE_MERGE,
UnitexConstants.OUTPUT_MODE_RELACE):
UnitexConstants.OUTPUT_MODE_REPLACE):
raise UnitexException("[LOCATE] Wrong value for the 'output_mode' option. UnitexConstants.OUTPUT_MODE_X required.")
self["output_mode"] = output_mode
......
......@@ -235,7 +235,7 @@ class UnitexProcessor(object):
if output_mode not in (UnitexConstants.OUTPUT_MODE_IGNORE,
UnitexConstants.OUTPUT_MODE_MERGE,
UnitexConstants.OUTPUT_MODE_RELACE):
UnitexConstants.OUTPUT_MODE_REPLACE):
raise UnitexException("Wrong value for the 'output_mode' option. UnitexConstants.OUTPUT_MODE_X required.")
kwargs["output_mode"] = output_mode
......
......@@ -904,7 +904,7 @@ def locate(grammar, text, alphabet, **kwargs):
command.append("--ignore")
elif options["output_mode"] == UnitexConstants.OUTPUT_MODE_MERGE:
command.append("--merge")
elif options["output_mode"] == UnitexConstants.OUTPUT_MODE_RELACE:
elif options["output_mode"] == UnitexConstants.OUTPUT_MODE_REPLACE:
command.append("--replace")
if options["protect_dic_chars"] is True:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter