translation_center 1.4.0 → 1.4.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.
- data/README.md +1 -0
- data/app/controllers/translation_center/translation_keys_controller.rb +0 -17
- data/config/routes.rb +1 -1
- data/lib/translation_center/translations_transfer.rb +5 -1
- data/lib/translation_center/version.rb +1 -1
- data/test/dummy/log/development.log +14216 -0
- data/test/dummy/tmp/cache/assets/CD6/F30/sprockets%2F3d4924f68747fc1d600b4d7a0b181f20 +0 -0
- data/test/dummy/tmp/cache/assets/CDB/0B0/sprockets%2Fd44248d455dc32b5d0d0694193b9a3f3 +0 -0
- data/test/dummy/tmp/cache/assets/CE0/2B0/sprockets%2F9f924e591087e633cea041028cff44c0 +0 -0
- data/test/dummy/tmp/cache/assets/D1D/630/sprockets%2F3af4fd4472321861e5b5a4ae0ad00a10 +0 -0
- data/test/dummy/tmp/cache/assets/D2F/FF0/sprockets%2F00d4ae0093a6d2ee8a2c5cf25283484b +0 -0
- data/test/dummy/tmp/cache/assets/D3D/A50/sprockets%2F117dc38b0a178661ba6d8ab89dcd3654 +0 -0
- data/test/dummy/tmp/cache/assets/D5C/0F0/sprockets%2F0d44cc7011a890ca1eb339ddf370ef32 +0 -0
- data/test/dummy/tmp/cache/assets/D65/A90/sprockets%2F8d23dda8bdf250e5f3c78d34000fe621 +0 -0
- data/test/dummy/tmp/cache/assets/D7E/C10/sprockets%2Fd4ea295413a05aab4f4a3c04a380f3ca +0 -0
- data/test/dummy/tmp/cache/assets/D9A/AF0/sprockets%2Fe5fc66f22b717fc0eb6c460ea1806f3c +0 -0
- metadata +2 -2
data/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
## Translation Center Status
|
|
2
2
|
[](https://codeclimate.com/github/BadrIT/translation_center)
|
|
3
3
|
[](http://badge.fury.io/rb/translation_center)
|
|
4
|
+
[](https://gemnasium.com/BadrIT/translation_center)
|
|
4
5
|
|
|
5
6
|
## Introduction
|
|
6
7
|
|
|
@@ -39,23 +39,6 @@ module TranslationCenter
|
|
|
39
39
|
def show
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
# POST /translation_keys
|
|
43
|
-
# POST /translation_keys.json
|
|
44
|
-
def create
|
|
45
|
-
@translation_key = TranslationKey.new(params[:translation_key])
|
|
46
|
-
@translation_key.last_accessed = Time.now
|
|
47
|
-
category = Category.find(params[:translation_key][:category_id])
|
|
48
|
-
respond_to do |format|
|
|
49
|
-
if @translation_key.save
|
|
50
|
-
format.html { redirect_to @translation_key.category, notice: 'Translation key was successfully created.' }
|
|
51
|
-
format.json { render json: @translation_key, status: :created, location: @translation_key }
|
|
52
|
-
else
|
|
53
|
-
format.html { redirect_to category, notice: 'Translation key must have a name.' }
|
|
54
|
-
format.json { render json: @translation_key.errors, status: :unprocessable_entity }
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
|
|
59
42
|
# PUT /translation_keys/1
|
|
60
43
|
# PUT /translation_keys/1.json
|
|
61
44
|
def update
|
data/config/routes.rb
CHANGED
|
@@ -112,7 +112,11 @@ module TranslationCenter
|
|
|
112
112
|
I18n.locale = locale
|
|
113
113
|
puts "Started exporting translations in #{locale}"
|
|
114
114
|
TranslationCenter::TranslationKey.translated(locale).each do |key|
|
|
115
|
-
|
|
115
|
+
begin
|
|
116
|
+
key.add_to_hash(result, locale)
|
|
117
|
+
rescue
|
|
118
|
+
puts "Error writing key: #{key.name} to yaml for #{locale}"
|
|
119
|
+
end
|
|
116
120
|
end
|
|
117
121
|
File.open("config/locales/#{locale.to_s}.yml", 'w') do |file|
|
|
118
122
|
file.write({locale.to_s => result}.ya2yaml)
|