Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/twine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/twine/formatters/django.rb')
-rw-r--r--lib/twine/formatters/django.rb20
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/twine/formatters/django.rb b/lib/twine/formatters/django.rb
index 19685b3..5c88766 100644
--- a/lib/twine/formatters/django.rb
+++ b/lib/twine/formatters/django.rb
@@ -9,23 +9,17 @@ module Twine
'.po'
end
- def can_handle_directory?(path)
- Dir.entries(path).any? { |item| /^.+\.po$/.match(item) }
- end
-
def default_file_name
- return 'strings.po'
+ 'strings.po'
end
def determine_language_given_path(path)
- path_arr = path.split(File::SEPARATOR)
- path_arr.each do |segment|
- match = /(..)\.po$/.match(segment)
- if match
- return match[1]
- end
- end
-
+ path_arr = path.split(File::SEPARATOR)
+ path_arr.each do |segment|
+ match = /(..)\.po$/.match(segment)
+ return match[1] if match
+ end
+
return
end