Files
deb-python-pyvmomi/docs/vmodl/LocalizableMessage.rst
Shawn Hartsock 15f7be9a52 pyVmomi reStructured Text Documentation
This external documentation for pyVmomi was generated using Googly Docs
(aka Google Standard Documentation) which renders very cleanly in
GitHub. Internal documentation for a class should be done in Sphinx
format because tools like pyCharm and Eclipse can use that documentation
as a hint for code completion.

Note: External docs as Googly Docs, internal docs as Sphinx.

Closes bug#15
2014-06-17 14:07:42 -04:00

2.2 KiB

vmodl.LocalizableMessage

Message data which is intended to be displayed according to the locale of a client.A LocalizableMessage contains both a formatted, localized version of the text and the data needed to perform localization in conjunction with localization catalogs.Clients of the VIM API may use vim.SessionManager.setLocale() to cause the server to emit a localized message , or may perform client-side localization based on message catalogs provided by the server.
  • If the substition variable is a string, no further lookup is required.
  • arg
  • = [("address" = "127.0.0.1")]
  • CATALOG(locmsg,
  • key
  • ) = "IP address is {address}"
  • ==
  • message
  • = "IP address is 127.0.0.1"
  • If the substitution variable is an integer, value is a lookup key.
  • arg
  • = [("1" = "button.cancel"), ("2" = "msg.revert")]
  • CATALOG(locmsg,
  • key
  • ) = "Select '{1}' to {2}"
  • CATALOG(locmsg, button.cancel) = "Cancel"
  • CATALOG(locmsg, msg.revert) = "revert"
  • ==
  • message
  • = "Select 'Cancel' to revert"
  • If the variable contains '@', value is a label lookup in another catalog, where {name.@CATALOG.prefix} looks up prefix.
  • arg
  • [name].label in CATALOG.
  • arg
  • = [("field" = "queued")]
  • CATALOG(locmsg,
  • key
  • ) = "State is {field.@enum.TaskInfo.State}"
  • CATALOG(enum, TaskInfo.State.queued.label) is "Queued"
  • ==
  • message
  • = "State is Queued"
extends

vmodl.DynamicData

since

vSphere API 4.0

Attributes:

key (str):

Unique key identifying the message in the localized message catalog.

arg (vmodl.KeyAnyValue, optional):

Substitution arguments for variables in the localized message.

message (str, optional):

Message in session locale. Use vim.SessionManager.setLocale() to change the session locale.