Class: PhraseApp::RequestParams::LocaleDownloadParams

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/phraseapp-ruby.rb

Overview

LocaleDownloadParams

Parameters:

branch

specify the branch to use

convert_emoji

Indicates whether Emoji symbols should be converted to actual Emojis. <a href=“help.phraseapp.com/manage-translations-and-languages/work-with-emojis/working-with-emojis”>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=“help.phraseapp.com/what-is-phraseapp/supported-platforms-and-formats/supported-platforms-and-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.

include_translated_keys

Include translated keys in the locale file. Use in combination with include_empty_translations to obtain only untranslated keys.

include_unverified_translations

if set to false unverified translations are excluded

keep_notranslate_tags

Indicates whether [NOTRANSLATE] tags should be kept.

skip_unverified_translations

Indicates whether the locale file should skip all unverified translations. This parameter is deprecated and should be replaced with include_unverified_translations.

tag

This parameter is deprecated. Please use the “tags” parameter instead

tags

Limit results to keys tagged with a list of comma separated tag names.

use_last_reviewed_version

If set to true the last reviewed version of a translation is used. This is only available if the review workflow (currently in beta) is enabled for the project.

Instance Method Summary collapse

Instance Method Details

#branch=(val) ⇒ Object



2694
2695
2696
# File 'lib/phraseapp-ruby.rb', line 2694

def branch=(val)
  super(val)
end

#convert_emoji=(val) ⇒ Object



2698
2699
2700
2701
2702
2703
2704
2705
2706
# File 'lib/phraseapp-ruby.rb', line 2698

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



2708
2709
2710
# File 'lib/phraseapp-ruby.rb', line 2708

def encoding=(val)
  super(val)
end

#fallback_locale_id=(val) ⇒ Object



2712
2713
2714
# File 'lib/phraseapp-ruby.rb', line 2712

def fallback_locale_id=(val)
  super(val)
end

#file_format=(val) ⇒ Object



2716
2717
2718
# File 'lib/phraseapp-ruby.rb', line 2716

def file_format=(val)
  super(val)
end

#format_options=(val) ⇒ Object



2720
2721
2722
# File 'lib/phraseapp-ruby.rb', line 2720

def format_options=(val)
  super(JSON.load(val))
end

#include_empty_translations=(val) ⇒ Object



2724
2725
2726
2727
2728
2729
2730
2731
2732
# File 'lib/phraseapp-ruby.rb', line 2724

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

#include_translated_keys=(val) ⇒ Object



2734
2735
2736
2737
2738
2739
2740
2741
2742
# File 'lib/phraseapp-ruby.rb', line 2734

def include_translated_keys=(val)
  if val.is_a?(TrueClass)
    super(true)
  elsif val.is_a?(FalseClass)
    return
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#include_unverified_translations=(val) ⇒ Object



2744
2745
2746
2747
2748
2749
2750
2751
2752
# File 'lib/phraseapp-ruby.rb', line 2744

def include_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

#keep_notranslate_tags=(val) ⇒ Object



2754
2755
2756
2757
2758
2759
2760
2761
2762
# File 'lib/phraseapp-ruby.rb', line 2754

def keep_notranslate_tags=(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



2764
2765
2766
2767
2768
2769
2770
2771
2772
# File 'lib/phraseapp-ruby.rb', line 2764

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



2774
2775
2776
# File 'lib/phraseapp-ruby.rb', line 2774

def tag=(val)
  super(val)
end

#tags=(val) ⇒ Object



2778
2779
2780
# File 'lib/phraseapp-ruby.rb', line 2778

def tags=(val)
  super(val)
end

#use_last_reviewed_version=(val) ⇒ Object



2782
2783
2784
2785
2786
2787
2788
2789
2790
# File 'lib/phraseapp-ruby.rb', line 2782

def use_last_reviewed_version=(val)
  if val.is_a?(TrueClass)
    super(true)
  elsif val.is_a?(FalseClass)
    return
  else
    PhraseApp::ParamsHelpers::ParamsValidationError.new("invalid value #{val}")
  end
end

#validateObject



2792
2793
2794
2795
2796
2797
# File 'lib/phraseapp-ruby.rb', line 2792

def validate
  
  if file_format == nil || file_format == "" 
    raise PhraseApp::ParamsHelpers::ParamsValidationError.new("Required parameter \"file_format\" of \"locale_downloadParams\" not set")
  end
end