i18n-cocoa 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/i18n/cocoa/finder.rb +7 -4
- data/lib/i18n/cocoa/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 211d87eb1540d27dba3ed74c5f3ab0489f84893b
|
4
|
+
data.tar.gz: 611f40a2e50f1d4dac3e3a49f6c32a3054cef3b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ed78a710294ff7db0633e4fa9dcb7ab1c059568f668e489ecaac88a34909492683837078d0c7d0e1f233d4347b08ee30019efda481c55c5e607ba20b62a086c2
|
7
|
+
data.tar.gz: 520c45d09e3e65ed2c3baef4e9efcb1f49c5745a855381a7ea515166dabeca34639277d4a1a192ca7becac33327d045512a81e0dd59b96c6d5cd323ffcd59cfe
|
data/lib/i18n/cocoa/finder.rb
CHANGED
@@ -51,13 +51,13 @@ module I18n
|
|
51
51
|
Dir::foreach(directory_path) do |f|
|
52
52
|
current_file_path = "#{directory_path}/#{f}"
|
53
53
|
|
54
|
-
|
54
|
+
_assort_with_extension current_file_path unless File.directory?current_file_path
|
55
55
|
|
56
56
|
_search_file_paths current_file_path if _need_to_search_in_directory? current_file_path
|
57
57
|
end
|
58
58
|
end
|
59
59
|
|
60
|
-
def
|
60
|
+
def _assort_with_extension file_path
|
61
61
|
return if File.directory?file_path
|
62
62
|
|
63
63
|
extension = file_path.split('.').last
|
@@ -65,7 +65,9 @@ module I18n
|
|
65
65
|
when 'm', 'mm', 'swift'
|
66
66
|
@method_file_paths << file_path
|
67
67
|
when 'strings'
|
68
|
-
|
68
|
+
directory_name = file_path.split('/').last(2).first # e.g. 'en.lproj'
|
69
|
+
_extension = directory_name.split('.').last
|
70
|
+
@localized_file_paths << file_path if _extension == 'lproj'
|
69
71
|
end
|
70
72
|
end
|
71
73
|
|
@@ -79,7 +81,8 @@ module I18n
|
|
79
81
|
xcode_extensions = ['xcodeproj', 'xcassets', 'xcworkspace']
|
80
82
|
return false if xcode_extensions.include?extension # directory for xcode
|
81
83
|
|
82
|
-
|
84
|
+
library_directories = ['Pods', 'Carthage']
|
85
|
+
return false if library_directories.include?file_name # support Pods, Carthage
|
83
86
|
|
84
87
|
true
|
85
88
|
end
|
data/lib/i18n/cocoa/version.rb
CHANGED