Class: PhraseApp::RequestParams::LocaleParams

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

Overview

LocaleParams

Parameters:

autotranslate

If set, translations for this locale will be fetched automatically, right after creation.

branch

specify the branch to use

code

Locale ISO code

default

Indicates whether locale is the default locale. If set to true, the previous default locale the project is no longer the default locale.

main

Indicates whether locale is a main locale. Main locales are part of the <a href=“phraseapp.com/docs/guides/working-with-phraseapp/verification-proofreading” target=“_blank”>Verification System</a> feature and only available in <a href=“phraseapp.com/pricing” target=“_blank”>Control Package</a>.

name

Locale name

rtl

Indicates whether locale is a RTL (Right-to-Left) locale.

source_locale_id

Source locale. Can be the name or public id of the locale. Preferred is the public id.

unverify_new_translations

Indicates that new translations for this locale should be marked as unverified. Part of the <a href=“phraseapp.com/docs/guides/working-with-phraseapp/verification-proofreading” target=“_blank”>Advanced Workflows</a> feature and only available in <a href=“phraseapp.com/pricing” target=“_blank”>Control Package</a>.

unverify_updated_translations

Indicates that updated translations for this locale should be marked as unverified. Part of the <a href=“phraseapp.com/docs/guides/working-with-phraseapp/verification-proofreading” target=“_blank”>Advanced Workflows</a> feature and only available in <a href=“phraseapp.com/pricing” target=“_blank”>Control Package</a>.

Instance Method Summary collapse

Instance Method Details

#autotranslate=(val) ⇒ Object



884
885
886
887
888
889
890
891
892
# File 'lib/phraseapp-ruby.rb', line 884

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

#branch=(val) ⇒ Object



894
895
896
# File 'lib/phraseapp-ruby.rb', line 894

def branch=(val)
  super(val)
end

#code=(val) ⇒ Object



898
899
900
# File 'lib/phraseapp-ruby.rb', line 898

def code=(val)
  super(val)
end

#default=(val) ⇒ Object



902
903
904
905
906
907
908
909
910
# File 'lib/phraseapp-ruby.rb', line 902

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

#main=(val) ⇒ Object



912
913
914
915
916
917
918
919
920
# File 'lib/phraseapp-ruby.rb', line 912

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

#name=(val) ⇒ Object



922
923
924
# File 'lib/phraseapp-ruby.rb', line 922

def name=(val)
  super(val)
end

#rtl=(val) ⇒ Object



926
927
928
929
930
931
932
933
934
# File 'lib/phraseapp-ruby.rb', line 926

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

#source_locale_id=(val) ⇒ Object



936
937
938
# File 'lib/phraseapp-ruby.rb', line 936

def source_locale_id=(val)
  super(val)
end

#unverify_new_translations=(val) ⇒ Object



940
941
942
943
944
945
946
947
948
# File 'lib/phraseapp-ruby.rb', line 940

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

#unverify_updated_translations=(val) ⇒ Object



950
951
952
953
954
955
956
957
958
# File 'lib/phraseapp-ruby.rb', line 950

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

#validateObject



960
961
962
963
964
965
966
967
968
# File 'lib/phraseapp-ruby.rb', line 960

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