INNER CODE UNIT · Ruby
configs_match
wordpress-mobile/WordPress-Android · fastlane/lanes/localization.rb:538
configs_match = output.match(/^#{app}: \[(.*)\]$/)
if configs_match.nil?
UI.message("No `resourceConfigurations` field set in `build.gradle` for the `#{app}` flavor. Nothing to check.")
next
end
resource_configs = configs_match.captures.first.gsub(' ', '').split(',').sort
if resource_configs.nil? || resource_configs.empty?
UI.message("No `resourceConfigurations` field set in `build.gradle` for the `#{app}` flavor. Nothing to check.")
next
end
locales_list = { 'wordpress' => WP_APP_LOCALES, 'jetpack' => JP_APP_LOCALES }.fetch(app, nil)
expected_locales = locales_list.map { |l| l[:android] }
# Support for legacy locale codes
expected_locales << 'in' if expected_locales.include?('id')
expected_locales << 'iw' if expected_locales.include?('he')
expected_locales.sort!