Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions homeassistant/helpers/translation.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@ async def component_translation_file(hass: HomeAssistantType, component: str,
filename = "{}.{}.json".format(parts[0], language)
return str(integration.file_path / '.translations' / filename)

module = integration.get_component()

# If it's a component that is just one file, we don't support translations
# Example custom_components/my_component.py
if module.__name__ != module.__package__:
if integration.file_path.name != domain:
return None

filename = '{}.json'.format(language)
Expand Down