Skip to content

Commit

Permalink
Fix import quote escape string from CSV
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveKChiu committed May 30, 2019
1 parent a279779 commit a0a9e58
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ios-strings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,10 @@ def import_ios(import_path)
}
end

def import_csv_string(str)
return str.gsub(/\\"/, '"')
end

def import_csv(csv_path)
is_first = true
locales_keys = []
Expand Down Expand Up @@ -367,6 +371,8 @@ def import_csv(csv_path)
value = row[idx]
next if not value

value = import_csv_string(value)

if type == :strings
values[key] = value
$strings_keys[key] = true
Expand Down

0 comments on commit a0a9e58

Please sign in to comment.