smartling_rails 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -1
- data/lib/smartling_rails/models/smartling_file.rb +1 -1
- data/lib/smartling_rails/smartling_processor.rb +1 -1
- data/lib/smartling_rails/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: 82d5e6986da0ca41df9f8f6f00d4671ce40ec92c
|
4
|
+
data.tar.gz: 03ef9ed1735b02db0e04f9e95f402994d648c182
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ba98e6de6a08e885b3e66891fad9cb6a19d21e9709fd10baf4b91919ee1fc378b8ed1d72053e4c671a7ba9cd5424dcfa9bb100a9c7fdc6eaa6779eb80fbdd74
|
7
|
+
data.tar.gz: 1841825530d247fce72af930d0cbc43349335555728ca8a6bcaa681e98d98fe5315bdf44cb72c20c1a867321db8cf3aa175daccaee7bd47e44819592a703f730
|
data/README.md
CHANGED
@@ -126,7 +126,28 @@ Local `.env` file
|
|
126
126
|
>SMARTLING_APP_NAME=[your_app name_id]
|
127
127
|
|
128
128
|
ENV (pending)
|
129
|
-
|
129
|
+
|
130
|
+
**Yaml file**
|
131
|
+
Defining which locales your application supports can be done via yaml configuration file. If this file is missing there will be an exception. If this file is blank you will not be able to check status or get your localizations.
|
132
|
+
|
133
|
+
The configuration file needs to reside in the `config/` folder and be called `smartling_rails.yml`. Here is an example:
|
134
|
+
|
135
|
+
```
|
136
|
+
locales:
|
137
|
+
French:
|
138
|
+
smartling: fr-FR
|
139
|
+
custom: fr-fr
|
140
|
+
German:
|
141
|
+
smartling: de-DE
|
142
|
+
custom: de-de
|
143
|
+
Dutch:
|
144
|
+
smartling: nl-NL
|
145
|
+
custom: nl-nl
|
146
|
+
Italian:
|
147
|
+
smartling: it-IT
|
148
|
+
custom: it-it
|
149
|
+
...
|
150
|
+
```
|
130
151
|
|
131
152
|
## dependencies
|
132
153
|
smartling_rails is dependant on the [smartling gem](https://rubygems.org/gems/smartling) version 0.5.1 or higher.
|
@@ -35,7 +35,7 @@ module SmartlingRails
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def fix_locale_root_node
|
38
|
-
puts
|
38
|
+
puts " converting smartling locale code to CB locale code from #{locale_codes['smartling']} to #{locale_codes['custom']}"
|
39
39
|
@file_contents.sub!(locale_codes['smartling'],locale_codes['custom'])
|
40
40
|
end
|
41
41
|
|
@@ -68,7 +68,7 @@ module SmartlingRails
|
|
68
68
|
smartling_file = SmartlingFile.new('', locale_codes)
|
69
69
|
SmartlingRails.print_msg "Downloading #{locale_codes['smartling']}:", true
|
70
70
|
begin
|
71
|
-
smartling_file.file_contents = @my_smartling.download(upload_file_path, :locale => locale_codes[
|
71
|
+
smartling_file.file_contents = @my_smartling.download(upload_file_path, :locale => locale_codes['smartling'])
|
72
72
|
SmartlingRails.print_msg "file loaded..."
|
73
73
|
rescue Exception => e
|
74
74
|
SmartlingRails.print_msg e
|