commit
df6f43a3cc
|
@ -140,6 +140,7 @@ def clear(po_path, line, drop_capitalized=False):
|
|||
r"[0-9]+h", # Hours
|
||||
r"%\([a-z_]+?\)s", # Sphinx variable
|
||||
r"« . »", # Single letter examples (typically in Unicode documentation)
|
||||
"\xad", # soft hyphen
|
||||
}
|
||||
if drop_capitalized:
|
||||
to_drop.add(
|
||||
|
|
|
@ -30,6 +30,9 @@ def test_clear():
|
|||
# We remove single letters in quotes
|
||||
assert clear("test", "La lettre « é » est seule.") == "La lettre est seule."
|
||||
|
||||
# We remove soft hyphens
|
||||
assert clear("some\xadthing") == "something"
|
||||
|
||||
# We drop hours because hunspell whines on them
|
||||
assert clear("test", "Rendez-vous à 10h chez Murex") == "Rendez-vous à chez Murex"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user