Class: PhraseApp::RequestParams::TranslationKeyParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::TranslationKeyParams
- Defined in:
- lib/phraseapp-ruby.rb
Overview
TranslationKeyParams
Parameters:
- branch
-
specify the branch to use
- 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. This parameter is deprecated. Please use the Screenshots endpoint instead.
- screenshot
-
Screenshot/image for the key. This parameter is deprecated. Please use the Screenshots endpoint instead.
- 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
- #branch=(val) ⇒ Object
- #data_type=(val) ⇒ Object
- #description=(val) ⇒ Object
- #localized_format_key=(val) ⇒ Object
- #localized_format_string=(val) ⇒ Object
- #max_characters_allowed=(val) ⇒ Object
- #name=(val) ⇒ Object
- #name_plural=(val) ⇒ Object
- #original_file=(val) ⇒ Object
- #plural=(val) ⇒ Object
- #remove_screenshot=(val) ⇒ Object
- #screenshot=(val) ⇒ Object
- #tags=(val) ⇒ Object
- #unformatted=(val) ⇒ Object
- #validate ⇒ Object
- #xml_space_preserve=(val) ⇒ Object
Instance Method Details
#branch=(val) ⇒ Object
900 901 902 |
# File 'lib/phraseapp-ruby.rb', line 900 def branch=(val) super(val) end |
#data_type=(val) ⇒ Object
904 905 906 |
# File 'lib/phraseapp-ruby.rb', line 904 def data_type=(val) super(val) end |
#description=(val) ⇒ Object
908 909 910 |
# File 'lib/phraseapp-ruby.rb', line 908 def description=(val) super(val) end |
#localized_format_key=(val) ⇒ Object
912 913 914 |
# File 'lib/phraseapp-ruby.rb', line 912 def localized_format_key=(val) super(val) end |
#localized_format_string=(val) ⇒ Object
916 917 918 |
# File 'lib/phraseapp-ruby.rb', line 916 def localized_format_string=(val) super(val) end |
#max_characters_allowed=(val) ⇒ Object
920 921 922 |
# File 'lib/phraseapp-ruby.rb', line 920 def max_characters_allowed=(val) super(val.to_i) end |
#name=(val) ⇒ Object
924 925 926 |
# File 'lib/phraseapp-ruby.rb', line 924 def name=(val) super(val) end |
#name_plural=(val) ⇒ Object
928 929 930 |
# File 'lib/phraseapp-ruby.rb', line 928 def name_plural=(val) super(val) end |
#original_file=(val) ⇒ Object
932 933 934 |
# File 'lib/phraseapp-ruby.rb', line 932 def original_file=(val) super(val) end |
#plural=(val) ⇒ Object
936 937 938 939 940 941 942 943 944 |
# File 'lib/phraseapp-ruby.rb', line 936 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
946 947 948 949 950 951 952 953 954 |
# File 'lib/phraseapp-ruby.rb', line 946 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
956 957 958 |
# File 'lib/phraseapp-ruby.rb', line 956 def screenshot=(val) super(val) end |
#tags=(val) ⇒ Object
960 961 962 |
# File 'lib/phraseapp-ruby.rb', line 960 def (val) super(val) end |
#unformatted=(val) ⇒ Object
964 965 966 967 968 969 970 971 972 |
# File 'lib/phraseapp-ruby.rb', line 964 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 |
#validate ⇒ Object
984 985 986 987 988 989 |
# File 'lib/phraseapp-ruby.rb', line 984 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
974 975 976 977 978 979 980 981 982 |
# File 'lib/phraseapp-ruby.rb', line 974 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 |