Skip to content

Commit

Permalink
Merge pull request #8051 from wordpress-mobile/fix/preserve-translato…
Browse files Browse the repository at this point in the history
…r-comments

Preserve translator comments when the metadata .po file is updated
  • Loading branch information
mzorz authored Jul 19, 2018
2 parents ebe1b15 + 29dfb39 commit 14e3f8b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions fastlane/actions/update_metadata_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,21 @@ def self.write_target_block(fw, line)
end
end

if (is_comment(line))
@current_block = @blocks.first
end

@current_block.handle_line(fw, line)
end

def self.is_block_id(line)
line.start_with?('msgctxt')
end

def self.is_comment(line)
line.start_with?('#')
end



#####################################################
Expand Down

0 comments on commit 14e3f8b

Please sign in to comment.