require 'fastlane_core/languages'

module Deliver
  module Loader
    # The directory 'appleTV' is a special folder that will cause our screenshot gathering code to iterate
    # through it as well searching for language folders.
    APPLE_TV_DIR_NAME = "appleTV".freeze
    DEFAULT_DIR_NAME = "default".freeze
    ALL_LANGUAGES = (FastlaneCore::Languages::ALL_LANGUAGES + [APPLE_TV_DIR_NAME, APPLE_TV_DIR_NAME]).map(&:downcase).freeze

    def self.language_folders(root)
      Dir.glob(File.join(root, '*')).select do |path|
        File.directory?(path) && ALL_LANGUAGES.include?(File.basename(path).downcase)
      end.sort
    end
  end
end

require 'fastlane_core/languages'

module Deliver
  module Loader
    # The directory 'appleTV' is a special folder that will cause our screenshot gathering code to iterate
    # through it as well searching for language folders.
    APPLE_TV_DIR_NAME = "appleTV".freeze
    DEFAULT_DIR_NAME = "default".freeze
    ALL_LANGUAGES = (FastlaneCore::Languages::ALL_LANGUAGES + [APPLE_TV_DIR_NAME, APPLE_TV_DIR_NAME, DEFAULT_DIR_NAME]).map(&:downcase).freeze

    def self.language_folders(root)
      Dir.glob(File.join(root, '*')).select do |path|
        File.directory?(path) && ALL_LANGUAGES.include?(File.basename(path).downcase)
      end.sort
    end
  end
end

Fix the default-setting feature. This is required for upload_metadata/load_from_filesystem to correctly load default values from the default folder.
Fix the default-setting feature.
This is required for upload_metadata/load_from_filesystem to correctly load default values from the default folder.
