[REM] core: useless translation mark

I misremembered that `_` would go look for the translation stuff
through the stack, but it only goes up to the caller of `_` itself.

Since `clean_filename` has no `cr`, `cursor` or `self` that's never
going to do anything, and it's thus completely useless.

closes odoo/odoo#65534

X-original-commit: ab3122448079d998e88f77704df62d1b1871e918
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
This commit is contained in:
Xavier Morel
2021-02-04 13:03:44 +00:00
parent 98d8d51100
commit 0d9b480ee7
+2 -4
View File
@@ -13,8 +13,6 @@ import zipfile
from contextlib import contextmanager
from os.path import join as opj
from .translate import _
_logger = logging.getLogger(__name__)
WINDOWS_RESERVED = re.compile(r'''
@@ -53,8 +51,8 @@ def clean_filename(name, replacement=''):
:rtype: str
"""
if WINDOWS_RESERVED.match(name):
return _("Untitled")
return re.sub(r'[^\w_.()\[\] -]+', replacement, name).lstrip('.-') or _("Untitled")
return "Untitled"
return re.sub(r'[^\w_.()\[\] -]+', replacement, name).lstrip('.-') or "Untitled"
def listdir(dir, recursive=False):
"""Allow to recursively get the file listing following symlinks, returns