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



768
769
770
# File 'lib/phraseapp-ruby.rb', line 768

def data_type=(val)
  super(val)
end

#description=(val) ⇒ Object



772
773
774
# File 'lib/phraseapp-ruby.rb', line 772

def description=(val)
  super(val)
end

#localized_format_key=(val) ⇒ Object



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

def localized_format_key=(val)
  super(val)
end

#localized_format_string=(val) ⇒ Object



780
781
782
# File 'lib/phraseapp-ruby.rb', line 780

def localized_format_string=(val)
  super(val)
end

#max_characters_allowed=(val) ⇒ Object



784
785
786
# File 'lib/phraseapp-ruby.rb', line 784

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

#name=(val) ⇒ Object



788
789
790
# File 'lib/phraseapp-ruby.rb', line 788

def name=(val)
  super(val)
end

#name_plural=(val) ⇒ Object



792
793
794
# File 'lib/phraseapp-ruby.rb', line 792

def name_plural=(val)
  super(val)
end

#original_file=(val) ⇒ Object



796
797
798
# File 'lib/phraseapp-ruby.rb', line 796

def original_file=(val)
  super(val)
end

#plural=(val) ⇒ Object



800
801
802
803
804
805
806
807
808
# File 'lib/phraseapp-ruby.rb', line 800

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



810
811
812
813
814
815
816
817
818
# File 'lib/phraseapp-ruby.rb', line 810

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



820
821
822
# File 'lib/phraseapp-ruby.rb', line 820

def screenshot=(val)
  super(val)
end

#tags=(val) ⇒ Object



824
825
826
# File 'lib/phraseapp-ruby.rb', line 824

def tags=(val)
  super(val)
end

#unformatted=(val) ⇒ Object



828
829
830
831
832
833
834
835
836
# File 'lib/phraseapp-ruby.rb', line 828

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



848
849
850
851
852
853
# File 'lib/phraseapp-ruby.rb', line 848

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



838
839
840
841
842
843
844
845
846
# File 'lib/phraseapp-ruby.rb', line 838

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