mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Fix incorrect regex in translation script (#91536)
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user