i18n-migrations 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/i18n/migrations/locale.rb +5 -5
- data/lib/i18n/migrations/migrator.rb +1 -1
- data/lib/i18n/migrations/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: 531a223b03e63c6f9d34aaf078bb147680e52750
|
4
|
+
data.tar.gz: ca7e31d8322a7a7adf7d3ccefec0e3819707f22f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae393c640c0e3310c84c8a048cbef260b5dc9f21b494730fc97c6040992f800ad9b80d2ea4b9aeabf876b0f4956fedac9fce2a6be1457650f0eca0d7e6f6f35f
|
7
|
+
data.tar.gz: c530be9f465eea4c245932e339e9bc19d3b2edf63a04658758d3dfb06f7e45ef165643da9ad5dffd2befebd7b6281b458ca643ab5deef55af911d010b69138fb
|
@@ -137,6 +137,10 @@ module I18n
|
|
137
137
|
read_versions(read_data).last
|
138
138
|
end
|
139
139
|
|
140
|
+
def read_data
|
141
|
+
read_from_file("#{@name}.yml")
|
142
|
+
end
|
143
|
+
|
140
144
|
private
|
141
145
|
|
142
146
|
def main_locale
|
@@ -144,7 +148,7 @@ module I18n
|
|
144
148
|
locales_dir: @locales_dir,
|
145
149
|
main_locale_name: @main_locale_name,
|
146
150
|
migrations: @migrations,
|
147
|
-
dictionary:
|
151
|
+
dictionary: nil) # should not use dictionary on main locale
|
148
152
|
end
|
149
153
|
|
150
154
|
def replace_errors_in_notes(all_notes, key, errors)
|
@@ -162,10 +166,6 @@ module I18n
|
|
162
166
|
[data, notes]
|
163
167
|
end
|
164
168
|
|
165
|
-
def read_data
|
166
|
-
read_from_file("#{@name}.yml")
|
167
|
-
end
|
168
|
-
|
169
169
|
def write_data_and_notes(data, notes)
|
170
170
|
write_to_file("#{@name}.yml", data)
|
171
171
|
write_to_file("../#{@name}_notes.yml", notes) unless main_locale?
|
@@ -82,7 +82,7 @@ end
|
|
82
82
|
def push(locale_or_all, force = false)
|
83
83
|
each_locale(locale_or_all) do |locale|
|
84
84
|
next if locale.main_locale?
|
85
|
-
sheet = get_google_spreadsheet(locale)
|
85
|
+
sheet = get_google_spreadsheet(locale.name)
|
86
86
|
unless force
|
87
87
|
locale.pull(sheet)
|
88
88
|
migrate(locale.name)
|