{"action":"created","comment":{"url":"https://api.github.com/repos/fastlane/deliver/pulls/comments/45606269","id":45606269,"diff_hunk":"@@ -61,6 +61,51 @@ def upload(options)\n       Helper.log.info \"Successfully uploaded initial set of metadata to iTunes Connect\".green\n     end\n \n+    # If the user is using the 'default' language, then assign values where they are needed\n+    def assign_defaults(options)\n+\n+      # Build a complete list of the required languages\n+      enabled_languages = []\n+\n+      # Get all languages used in existing settings\n+      (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|\n+        current = options[key]\n+        next unless current && current.kind_of?(Hash)\n+        current.each do |language, value|\n+          enabled_languages << language unless enabled_languages.include?(language)\n+        end\n+      end\n+\n+      # Check folder list (an empty folder signifies a language is required)\n+      Dir.glob(File.join(options[:metadata_path], \"*\")).each do |lng_folder|\n+        next unless File.directory?(lng_folder) # We don't want to read txt as they are non localised\n+\n+        language = File.basename(lng_folder)\n+        enabled_languages << language unless enabled_languages.include?(language)\n+\n+      end\n+\n+      return unless enabled_languages.include?(\"default\")\n+      Helper.log.info \"Detected languages: \"+enabled_languages.to_s\n+\n+      #for each detected language, assign the default value if there specified value\n+      (LOCALISED_VERSION_VALUES + LOCALISED_APP_VALUES).each do |key|\n+        current = options[key]\n+        next unless current && current.kind_of?(Hash)\n+        ","path":"lib/deliver/upload_metadata.rb","position":35,"original_position":35,"commit_id":"554ae2cb0c7427c2d18049a786ee110d3f7ccc8a","original_commit_id":"554ae2cb0c7427c2d18049a786ee110d3f7ccc8a","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Trailing whitespace detected.","created_at":"2015-11-23T14:12:13Z","updated_at":"2015-11-23T14:12:13Z","html_url":"https://github.com/fastlane/deliver/pull/495#discussion_r45606269","pull_request_url":"https://api.github.com/repos/fastlane/deliver/pulls/495","_links":{"self":{"href":"https://api.github.com/repos/fastlane/deliver/pulls/comments/45606269"},"html":{"href":"https://github.com/fastlane/deliver/pull/495#discussion_r45606269"},"pull_request":{"href":"https://api.github.com/repos/fastlane/deliver/pulls/495"}}},"pull_request":{"url":"https://api.github.com/repos/fastlane/deliver/pulls/495","id":51527318,"html_url":"https://github.com/fastlane/deliver/pull/495","diff_url":"https://github.com/fastlane/deliver/pull/495.diff","patch_url":"https://github.com/fastlane/deliver/pull/495.patch","issue_url":"https://api.github.com/repos/fastlane/deliver/issues/495","number":495,"state":"open","locked":false,"title":"allow use of 'default' language value","user":{"login":"ConfusedVorlon","id":586910,"avatar_url":"https://avatars.githubusercontent.com/u/586910?v=3","gravatar_id":"","url":"https://api.github.com/users/ConfusedVorlon","html_url":"https://github.com/ConfusedVorlon","followers_url":"https://api.github.com/users/ConfusedVorlon/followers","following_url":"https://api.github.com/users/ConfusedVorlon/following{/other_user}","gists_url":"https://api.github.com/users/ConfusedVorlon/gists{/gist_id}","starred_url":"https://api.github.com/users/ConfusedVorlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConfusedVorlon/subscriptions","organizations_url":"https://api.github.com/users/ConfusedVorlon/orgs","repos_url":"https://api.github.com/users/ConfusedVorlon/repos","events_url":"https://api.github.com/users/ConfusedVorlon/events{/privacy}","received_events_url":"https://api.github.com/users/ConfusedVorlon/received_events","type":"User","site_admin":false},"body":"Users can specify a default which applies when there is no specific\r\nvalue for a given language.\r\n\r\nname ({\r\n\t\"en_us\" => \"English name\",\r\n\t\"default\" => \"Default name\"})\r\n\r\nwill have the same effect as\r\n\r\nname ({\r\n\t\"en_us\" => \"English name\",\r\n\t\"fr_FR\" => \"Default name\",\r\n        \"it\" => \"Default name\",\r\n        \"ja\" => \"Default name\"})\r\n\r\nsimilarly, a user can create a metadata folder 'default' and put in something like release_notes.txt\r\nthis will be used for all languages where there isn't an explicit release_notes.txt\r\n\r\nlanguages are filled in if they are either\r\n1) used in a setting explicitly in the deliverfile\r\n2) there is a language folder (possibly empty) in the metadata folder","created_at":"2015-11-23T14:12:08Z","updated_at":"2015-11-23T14:12:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9b2afe9ac511f7eddaca3ec3245b39aaa5c4390b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fastlane/deliver/pulls/495/commits","review_comments_url":"https://api.github.com/repos/fastlane/deliver/pulls/495/comments","review_comment_url":"https://api.github.com/repos/fastlane/deliver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fastlane/deliver/issues/495/comments","statuses_url":"https://api.github.com/repos/fastlane/deliver/statuses/554ae2cb0c7427c2d18049a786ee110d3f7ccc8a","head":{"label":"ConfusedVorlon:master","ref":"master","sha":"554ae2cb0c7427c2d18049a786ee110d3f7ccc8a","user":{"login":"ConfusedVorlon","id":586910,"avatar_url":"https://avatars.githubusercontent.com/u/586910?v=3","gravatar_id":"","url":"https://api.github.com/users/ConfusedVorlon","html_url":"https://github.com/ConfusedVorlon","followers_url":"https://api.github.com/users/ConfusedVorlon/followers","following_url":"https://api.github.com/users/ConfusedVorlon/following{/other_user}","gists_url":"https://api.github.com/users/ConfusedVorlon/gists{/gist_id}","starred_url":"https://api.github.com/users/ConfusedVorlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConfusedVorlon/subscriptions","organizations_url":"https://api.github.com/users/ConfusedVorlon/orgs","repos_url":"https://api.github.com/users/ConfusedVorlon/repos","events_url":"https://api.github.com/users/ConfusedVorlon/events{/privacy}","received_events_url":"https://api.github.com/users/ConfusedVorlon/received_events","type":"User","site_admin":false},"repo":{"id":46720885,"name":"deliver","full_name":"ConfusedVorlon/deliver","owner":{"login":"ConfusedVorlon","id":586910,"avatar_url":"https://avatars.githubusercontent.com/u/586910?v=3","gravatar_id":"","url":"https://api.github.com/users/ConfusedVorlon","html_url":"https://github.com/ConfusedVorlon","followers_url":"https://api.github.com/users/ConfusedVorlon/followers","following_url":"https://api.github.com/users/ConfusedVorlon/following{/other_user}","gists_url":"https://api.github.com/users/ConfusedVorlon/gists{/gist_id}","starred_url":"https://api.github.com/users/ConfusedVorlon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConfusedVorlon/subscriptions","organizations_url":"https://api.github.com/users/ConfusedVorlon/orgs","repos_url":"https://api.github.com/users/ConfusedVorlon/repos","events_url":"https://api.github.com/users/ConfusedVorlon/events{/privacy}","received_events_url":"https://api.github.com/users/ConfusedVorlon/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ConfusedVorlon/deliver","description":"Upload screenshots, metadata and your app to the App Store using a single command","fork":true,"url":"https://api.github.com/repos/ConfusedVorlon/deliver","forks_url":"https://api.github.com/repos/ConfusedVorlon/deliver/forks","keys_url":"https://api.github.com/repos/ConfusedVorlon/deliver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ConfusedVorlon/deliver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ConfusedVorlon/deliver/teams","hooks_url":"https://api.github.com/repos/ConfusedVorlon/deliver/hooks","issue_events_url":"https://api.github.com/repos/ConfusedVorlon/deliver/issues/events{/number}","events_url":"https://api.github.com/repos/ConfusedVorlon/deliver/events","assignees_url":"https://api.github.com/repos/ConfusedVorlon/deliver/assignees{/user}","branches_url":"https://api.github.com/repos/ConfusedVorlon/deliver/branches{/branch}","tags_url":"https://api.github.com/repos/ConfusedVorlon/deliver/tags","blobs_url":"https://api.github.com/repos/ConfusedVorlon/deliver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ConfusedVorlon/deliver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ConfusedVorlon/deliver/git/refs{/sha}","trees_url":"https://api.github.com/repos/ConfusedVorlon/deliver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ConfusedVorlon/deliver/statuses/{sha}","languages_url":"https://api.github.com/repos/ConfusedVorlon/deliver/languages","stargazers_url":"https://api.github.com/repos/ConfusedVorlon/deliver/stargazers","contributors_url":"https://api.github.com/repos/ConfusedVorlon/deliver/contributors","subscribers_url":"https://api.github.com/repos/ConfusedVorlon/deliver/subscribers","subscription_url":"https://api.github.com/repos/ConfusedVorlon/deliver/subscription","commits_url":"https://api.github.com/repos/ConfusedVorlon/deliver/commits{/sha}","git_commits_url":"https://api.github.com/repos/ConfusedVorlon/deliver/git/commits{/sha}","comments_url":"https://api.github.com/repos/ConfusedVorlon/deliver/comments{/number}","issue_comment_url":"https://api.github.com/repos/ConfusedVorlon/deliver/issues/comments{/number}","contents_url":"https://api.github.com/repos/ConfusedVorlon/deliver/contents/{+path}","compare_url":"https://api.github.com/repos/ConfusedVorlon/deliver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ConfusedVorlon/deliver/merges","archive_url":"https://api.github.com/repos/ConfusedVorlon/deliver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ConfusedVorlon/deliver/downloads","issues_url":"https://api.github.com/repos/ConfusedVorlon/deliver/issues{/number}","pulls_url":"https://api.github.com/repos/ConfusedVorlon/deliver/pulls{/number}","milestones_url":"https://api.github.com/repos/ConfusedVorlon/deliver/milestones{/number}","notifications_url":"https://api.github.com/repos/ConfusedVorlon/deliver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ConfusedVorlon/deliver/labels{/name}","releases_url":"https://api.github.com/repos/ConfusedVorlon/deliver/releases{/id}","created_at":"2015-11-23T13:08:26Z","updated_at":"2015-11-23T13:08:27Z","pushed_at":"2015-11-23T14:08:45Z","git_url":"git://github.com/ConfusedVorlon/deliver.git","ssh_url":"git@github.com:ConfusedVorlon/deliver.git","clone_url":"https://github.com/ConfusedVorlon/deliver.git","svn_url":"https://github.com/ConfusedVorlon/deliver","homepage":"https://fastlane.tools","size":13527,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fastlane:master","ref":"master","sha":"74e829f73c4d470ca22e3a49c0e931e6a8664890","user":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"repo":{"id":23831045,"name":"deliver","full_name":"fastlane/deliver","owner":{"login":"fastlane","id":11098337,"avatar_url":"https://avatars.githubusercontent.com/u/11098337?v=3","gravatar_id":"","url":"https://api.github.com/users/fastlane","html_url":"https://github.com/fastlane","followers_url":"https://api.github.com/users/fastlane/followers","following_url":"https://api.github.com/users/fastlane/following{/other_user}","gists_url":"https://api.github.com/users/fastlane/gists{/gist_id}","starred_url":"https://api.github.com/users/fastlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fastlane/subscriptions","organizations_url":"https://api.github.com/users/fastlane/orgs","repos_url":"https://api.github.com/users/fastlane/repos","events_url":"https://api.github.com/users/fastlane/events{/privacy}","received_events_url":"https://api.github.com/users/fastlane/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fastlane/deliver","description":"Upload screenshots, metadata and your app to the App Store using a single command","fork":false,"url":"https://api.github.com/repos/fastlane/deliver","forks_url":"https://api.github.com/repos/fastlane/deliver/forks","keys_url":"https://api.github.com/repos/fastlane/deliver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fastlane/deliver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fastlane/deliver/teams","hooks_url":"https://api.github.com/repos/fastlane/deliver/hooks","issue_events_url":"https://api.github.com/repos/fastlane/deliver/issues/events{/number}","events_url":"https://api.github.com/repos/fastlane/deliver/events","assignees_url":"https://api.github.com/repos/fastlane/deliver/assignees{/user}","branches_url":"https://api.github.com/repos/fastlane/deliver/branches{/branch}","tags_url":"https://api.github.com/repos/fastlane/deliver/tags","blobs_url":"https://api.github.com/repos/fastlane/deliver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fastlane/deliver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fastlane/deliver/git/refs{/sha}","trees_url":"https://api.github.com/repos/fastlane/deliver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fastlane/deliver/statuses/{sha}","languages_url":"https://api.github.com/repos/fastlane/deliver/languages","stargazers_url":"https://api.github.com/repos/fastlane/deliver/stargazers","contributors_url":"https://api.github.com/repos/fastlane/deliver/contributors","subscribers_url":"https://api.github.com/repos/fastlane/deliver/subscribers","subscription_url":"https://api.github.com/repos/fastlane/deliver/subscription","commits_url":"https://api.github.com/repos/fastlane/deliver/commits{/sha}","git_commits_url":"https://api.github.com/repos/fastlane/deliver/git/commits{/sha}","comments_url":"https://api.github.com/repos/fastlane/deliver/comments{/number}","issue_comment_url":"https://api.github.com/repos/fastlane/deliver/issues/comments{/number}","contents_url":"https://api.github.com/repos/fastlane/deliver/contents/{+path}","compare_url":"https://api.github.com/repos/fastlane/deliver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fastlane/deliver/merges","archive_url":"https://api.github.com/repos/fastlane/deliver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fastlane/deliver/downloads","issues_url":"https://api.github.com/repos/fastlane/deliver/issues{/number}","pulls_url":"https://api.github.com/repos/fastlane/deliver/pulls{/number}","milestones_url":"https://api.github.com/repos/fastlane/deliver/milestones{/number}","notifications_url":"https://api.github.com/repos/fastlane/deliver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fastlane/deliver/labels{/name}","releases_url":"https://api.github.com/repos/fastlane/deliver/releases{/id}","created_at":"2014-09-09T11:40:43Z","updated_at":"2015-11-23T09:53:01Z","pushed_at":"2015-11-23T14:12:10Z","git_url":"git://github.com/fastlane/deliver.git","ssh_url":"git@github.com:fastlane/deliver.git","clone_url":"https://github.com/fastlane/deliver.git","svn_url":"https://github.com/fastlane/deliver","homepage":"https://fastlane.tools","size":13549,"stargazers_count":2286,"watchers_count":2286,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":159,"mirror_url":null,"open_issues_count":104,"forks":159,"open_issues":104,"watchers":2286,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fastlane/deliver/pulls/495"},"html":{"href":"https://github.com/fastlane/deliver/pull/495"},"issue":{"href":"https://api.github.com/repos/fastlane/deliver/issues/495"},"comments":{"href":"https://api.github.com/repos/fastlane/deliver/issues/495/comments"},"review_comments":{"href":"https://api.github.com/repos/fastlane/deliver/pulls/495/comments"},"review_comment":{"href":"https://api.github.com/repos/fastlane/deliver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fastlane/deliver/pulls/495/commits"},"statuses":{"href":"https://api.github.com/repos/fastlane/deliver/statuses/554ae2cb0c7427c2d18049a786ee110d3f7ccc8a"}}}}