mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 01:08:12 +00:00
Fix incorrect regex in translation script (#91536)
This commit is contained in:
parent
5c7d124f02
commit
d1b8f2987c
@ -69,7 +69,7 @@ def substitute_translation_references(integration_strings, flattened_translation
|
||||
|
||||
def substitute_reference(value, flattened_translations):
|
||||
"""Substitute localization key references in a translation string."""
|
||||
matches = re.findall(r"\[\%key:((?:[\w]+|[:]{2})*)\%\]", value)
|
||||
matches = re.findall(r"\[\%key:((?:[a-z0-9-_]+|[:]{2})*)\%\]", value)
|
||||
if not matches:
|
||||
return value
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user