Skip to content
  • Juan Guecaimburu's avatar
    bd0753b3
    Add support to locales with lowdash in Resolver::PathParser · bd0753b3
    Juan Guecaimburu authored
    In previous versions of Rails, a dynamic regex was built to find templates.
    After that, PathParser started to be used to both match and sort templates.
    With the dynamic regex, templates with lowdash locales (es_AR) were
    found properly. But the PathParser regex does not match locales with this
    format, only allowing dash (es-AR) or no dash (es). Templates with lowdash
    locales have a wrong virtual path and get filtered.
    
    In this commit the PathParser regex is extended to support the lowdash.
    bd0753b3
    Add support to locales with lowdash in Resolver::PathParser
    Juan Guecaimburu authored
    In previous versions of Rails, a dynamic regex was built to find templates.
    After that, PathParser started to be used to both match and sort templates.
    With the dynamic regex, templates with lowdash locales (es_AR) were
    found properly. But the PathParser regex does not match locales with this
    format, only allowing dash (es-AR) or no dash (es). Templates with lowdash
    locales have a wrong virtual path and get filtered.
    
    In this commit the PathParser regex is extended to support the lowdash.
Loading