Shopify / theme-check

The Ultimate Shopify Theme Linter
Other
334 stars 96 forks source link

Fix IndexError: string not matched in matching translation keys fixer #602

Closed charlespwd closed 2 years ago

charlespwd commented 2 years ago

Fixes #585

The IndexError happened when MatchingTranslation fixer tried to change the shape of a translation (from string to Hash)

e.g.

{
  "parent" => "child translation"
}
=>
{
  "parent" => {
    "child1": "TODO"
    "child2": "TODO"
  }
}

The fix is to make sure that the child is Hash if you are setting a value.

charlespwd commented 2 years ago

@Shopify/theme-developer-tools