Skip to main content

translation_file_changed

Clear the internal translations cache if a .mo file is modified.

def translation_file_changed(
sender: object,
file_path: pathlib.Path,
**kwargs: dict
) - > boolean

Clear the internal translations cache if a .mo file is modified.

Parameters

NameTypeDescription
senderobjectThe object that sent the file change signal.
file_pathpathlib.PathThe path object representing the file that was modified.
**kwargsdictAdditional keyword arguments passed by the signal dispatcher.

Returns

TypeDescription
booleanReturns True if the cache was cleared because a .mo file was modified, otherwise returns None.