Class: PhraseApp::RequestParams::TranslationKeyParams

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

Overview

TranslationKeyParams

Parameters:

data_type

Type of the key. Can be one of the following: string, number, boolean, number, array.

description

Key description (usually includes contextual information for translators)

localized_format_key

NSStringLocalizedFormatKey attribute. Used in .stringsdict format.

localized_format_string

NSStringLocalizedFormatKey attribute. Used in .stringsdict format.

max_characters_allowed

Max. number of characters translations for this key can have.

name

Key name

name_plural

Plural name for the key (used in some file formats, e.g. Gettext)

original_file

Original file attribute. Used in some formats, e.g. XLIFF.

plural

Indicates whether key supports pluralization

remove_screenshot

Indicates whether the screenshot will be deleted.

screenshot

Screenshot/image for the key.

tags

List of tags separated by comma to be associated with the key.

unformatted

Indicates whether the key should be exported as “unformatted”. Supported by Android XML and other formats.

xml_space_preserve

Indicates whether the key should be exported with “xml:space=preserve”. Supported by several XML-based formats.

Instance Method Summary collapse

Instance Method Details

#data_type=(val) ⇒ Object



695
696
697
# File 'lib/phraseapp-ruby.rb', line 695

def data_type=(val)
  super(val)
end

#description=(val) ⇒ Object



699
700
701
# File 'lib/phraseapp-ruby.rb', line 699

def description=(val)
  super(val)
end

#localized_format_key=(val) ⇒ Object



703
704
705
# File 'lib/phraseapp-ruby.rb', line 703

def localized_format_key=(val)
  super(val)
end

#localized_format_string=(val) ⇒ Object



707
708
709
# File 'lib/phraseapp-ruby.rb', line 707

def localized_format_string=(val)
  super(val)
end

#max_characters_allowed=(val) ⇒ Object



711
712
713
# File 'lib/phraseapp-ruby.rb', line 711

def max_characters_allowed=(val)
  super(val.to_i)
end

#name=(val) ⇒ Object



715
716
717
# File 'lib/phraseapp-ruby.rb', line 715

def name=(val)
  super(val)
end

#name_plural=(val) ⇒ Object



719
720
721
# File 'lib/phraseapp-ruby.rb', line 719

def name_plural=(val)
  super(val)
end

#original_file=(val) ⇒ Object



723
724
725
# File 'lib/phraseapp-ruby.rb', line 723

def original_file=(val)
  super(val)
end

#plural=(val) ⇒ Object



727
728
729
730
731
732
733
734
735
# File 'lib/phraseapp-ruby.rb', line 727

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

#remove_screenshot=(val) ⇒ Object



737
738
739
740
741
742
743
744
745
# File 'lib/phraseapp-ruby.rb', line 737

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

#screenshot=(val) ⇒ Object



747
748
749
# File 'lib/phraseapp-ruby.rb', line 747

def screenshot=(val)
  super(val)
end

#tags=(val) ⇒ Object



751
752
753
# File 'lib/phraseapp-ruby.rb', line 751

def tags=(val)
  super(val)
end

#unformatted=(val) ⇒ Object



755
756
757
758
759
760
761
762
763
# File 'lib/phraseapp-ruby.rb', line 755

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



775
776
777
778
779
780
# File 'lib/phraseapp-ruby.rb', line 775

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

#xml_space_preserve=(val) ⇒ Object



765
766
767
768
769
770
771
772
773
# File 'lib/phraseapp-ruby.rb', line 765

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