Class: PhraseApp::RequestParams::TranslationKeyParams
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- PhraseApp::RequestParams::TranslationKeyParams
- 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
- #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
#data_type=(val) ⇒ Object
450 451 452 |
# File 'lib/phraseapp-ruby.rb', line 450 def data_type=(val) super(val) end |
#description=(val) ⇒ Object
454 455 456 |
# File 'lib/phraseapp-ruby.rb', line 454 def description=(val) super(val) end |
#localized_format_key=(val) ⇒ Object
458 459 460 |
# File 'lib/phraseapp-ruby.rb', line 458 def localized_format_key=(val) super(val) end |
#localized_format_string=(val) ⇒ Object
462 463 464 |
# File 'lib/phraseapp-ruby.rb', line 462 def localized_format_string=(val) super(val) end |
#max_characters_allowed=(val) ⇒ Object
466 467 468 |
# File 'lib/phraseapp-ruby.rb', line 466 def max_characters_allowed=(val) super(val.to_i) end |
#name=(val) ⇒ Object
470 471 472 |
# File 'lib/phraseapp-ruby.rb', line 470 def name=(val) super(val) end |
#name_plural=(val) ⇒ Object
474 475 476 |
# File 'lib/phraseapp-ruby.rb', line 474 def name_plural=(val) super(val) end |
#original_file=(val) ⇒ Object
478 479 480 |
# File 'lib/phraseapp-ruby.rb', line 478 def original_file=(val) super(val) end |
#plural=(val) ⇒ Object
482 483 484 485 486 487 488 489 490 |
# File 'lib/phraseapp-ruby.rb', line 482 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
492 493 494 495 496 497 498 499 500 |
# File 'lib/phraseapp-ruby.rb', line 492 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
502 503 504 |
# File 'lib/phraseapp-ruby.rb', line 502 def screenshot=(val) super(val) end |
#tags=(val) ⇒ Object
506 507 508 |
# File 'lib/phraseapp-ruby.rb', line 506 def (val) super(val) end |
#unformatted=(val) ⇒ Object
510 511 512 513 514 515 516 517 518 |
# File 'lib/phraseapp-ruby.rb', line 510 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
530 531 532 533 534 535 |
# File 'lib/phraseapp-ruby.rb', line 530 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
520 521 522 523 524 525 526 527 528 |
# File 'lib/phraseapp-ruby.rb', line 520 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 |