Class: PhraseApp::RequestParams::LocaleDownloadParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::LocaleDownloadParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
LocaleDownloadParams
Parameters:
- convert_emoji
-
Indicates whether Emoji symbols should be converted to actual Emojis. <a href=“guides/working-with-phraseapp/emoji-support/”>Working with Emojis</a>.
- encoding
-
Enforces a specific encoding on the file contents. Valid options are “UTF-8”, “UTF-16” and “ISO-8859-1”.
- fallback_locale_id
-
If a key has no translation in the locale being downloaded the translation in the fallback locale will be used. Provide the public ID of the locale that should be used as the fallback. Requires include_empty_translations to be set to
true. - file_format
-
File format name. See the format guide for all supported file formats.
- format_options
-
Additional formatting and render options. See the <a href=“guides/formats”>format guide</a> for a list of options available for each format. Specify format options like this:
...&format_options[foo]=bar - include_empty_translations
-
Indicates whether keys without translations should be included in the output as well.
- keep_notranslate_tags
-
Indicates whether [NOTRANSLATE] tags should be kept.
- skip_unverified_translations
-
Indicates whether the locale file should skip all unverified translations.
- tag
-
Limit result to keys tagged with the given tag (identified by its name).
Instance Method Summary collapse
- #convert_emoji=(val) ⇒ Object
- #encoding=(val) ⇒ Object
- #fallback_locale_id=(val) ⇒ Object
- #file_format=(val) ⇒ Object
- #format_options=(val) ⇒ Object
- #include_empty_translations=(val) ⇒ Object
- #keep_notranslate_tags=(val) ⇒ Object
- #skip_unverified_translations=(val) ⇒ Object
- #tag=(val) ⇒ Object
- #validate ⇒ Object
Instance Method Details
#convert_emoji=(val) ⇒ Object
1341 1342 1343 1344 1345 1346 1347 1348 1349 |
# File 'lib/phraseapp-ruby.rb', line 1341 def convert_emoji=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#encoding=(val) ⇒ Object
1351 1352 1353 |
# File 'lib/phraseapp-ruby.rb', line 1351 def encoding=(val) super(val) end |
#fallback_locale_id=(val) ⇒ Object
1355 1356 1357 |
# File 'lib/phraseapp-ruby.rb', line 1355 def fallback_locale_id=(val) super(val) end |
#file_format=(val) ⇒ Object
1359 1360 1361 |
# File 'lib/phraseapp-ruby.rb', line 1359 def file_format=(val) super(val) end |
#format_options=(val) ⇒ Object
1363 1364 1365 |
# File 'lib/phraseapp-ruby.rb', line 1363 def (val) super(JSON.load(val)) end |
#include_empty_translations=(val) ⇒ Object
1367 1368 1369 1370 1371 1372 1373 1374 1375 |
# File 'lib/phraseapp-ruby.rb', line 1367 def include_empty_translations=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#keep_notranslate_tags=(val) ⇒ Object
1377 1378 1379 1380 1381 1382 1383 1384 1385 |
# File 'lib/phraseapp-ruby.rb', line 1377 def (val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#skip_unverified_translations=(val) ⇒ Object
1387 1388 1389 1390 1391 1392 1393 1394 1395 |
# File 'lib/phraseapp-ruby.rb', line 1387 def skip_unverified_translations=(val) if val.is_a?(TrueClass) super(true) elsif val.is_a?(FalseClass) return else PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}") end end |
#tag=(val) ⇒ Object
1397 1398 1399 |
# File 'lib/phraseapp-ruby.rb', line 1397 def tag=(val) super(val) end |
#validate ⇒ Object
1401 1402 1403 1404 1405 1406 |
# File 'lib/phraseapp-ruby.rb', line 1401 def validate if file_format == nil || file_format == "" raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"file_format\" of \"locale_downloadParams\" not set") end end |