Handle kinda sorta not there Transifex locales
This commit is contained in:
parent
279803d052
commit
6dcbf1bef8
|
@ -28,7 +28,12 @@ project.languages.each do |language|
|
|||
project.resources.each do |resource|
|
||||
c = resource.translation(code).content
|
||||
file_name = "#{dir_name}/#{resource.name}"
|
||||
begin
|
||||
completed = resource.stats(code).completed
|
||||
rescue Transifex::NotFound
|
||||
puts "#{code} not found."
|
||||
next
|
||||
end
|
||||
has_content ||= completed != "0%"
|
||||
puts "Writing resource #{file_name}, #{completed} complete."
|
||||
File.open(file_name, 'w') { |file| file.write(c) }
|
||||
|
|
Loading…
Reference in New Issue
Block a user