Skip to content

Commit

Permalink
chore: update deprecated File.exists calls (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
arora-r authored May 15, 2023
1 parent 2fad104 commit 6c91bb1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion po2yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ end


def generate_yaml(filename, outfilename, langcode)
if File.exists? filename
if File.exist? filename
pofile = File.open(filename, "r")
tr = {langcode => po2hash(pofile)}
outfile = File.new(outfilename, "w")
Expand Down
6 changes: 3 additions & 3 deletions yaml2po
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ end


def generate_pot(engfilename, outfilename)
if File.exists? engfilename
if File.exist? engfilename
engfile = YAML::load_file(engfilename)
outfile = File.new(outfilename, "w")
print_header('LANGUAGE', outfile)
Expand All @@ -117,8 +117,8 @@ end


def lang2po(lang, engfilename, langfilename, outfilename)
if File.exists? engfilename
if File.exists? langfilename
if File.exist? engfilename
if File.exist? langfilename
# Generate the PO file only once checked that both files exist
engfile = YAML::load_file(engfilename)
langfile = YAML::load_file(langfilename)
Expand Down

0 comments on commit 6c91bb1

Please sign in to comment.