mirror of
https://github.com/python/cpython.git
synced 2025-09-01 22:47:59 +00:00
Fix interaction of custom translation classes and caching (#9042)
This commit is contained in:
parent
701761693c
commit
6108bf5ed0
3 changed files with 35 additions and 1 deletions
|
@ -419,7 +419,7 @@ def translation(domain, localedir=None, languages=None,
|
|||
# once.
|
||||
result = None
|
||||
for mofile in mofiles:
|
||||
key = os.path.abspath(mofile)
|
||||
key = (class_, os.path.abspath(mofile))
|
||||
t = _translations.get(key)
|
||||
if t is None:
|
||||
with open(mofile, 'rb') as fp:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue