Merge "Fix locale matching algorithm for resources" into nyc-dev