Struct translate_storage::Unit [] [src]

pub struct Unit { /* fields omitted */ }

Elementary unit of translation.

A translation unit contains:

  • One source string, the original message.
  • At most one target string, the translated message.
  • Optional context string that disambiguates the original.
  • A status. This indicates whether the unit is usable in the software.

Additionally, it can also contain: - Notes, from developer or translator. - References back into the source where the unit is used. - Previous source and context if the target is automatic suggestion from fuzzy matching. - Obsolete flag, indicating the unit is not currently in use.

Methods

impl Unit
[src]

Get the context string.

Get the source string.

Get the target string.

Get the previous context (in fuzzy units).

Get the previous source (in fuzzy units).

Get the notes/comments.

Get locations.

Get the state.

Returns whether the unit should be used in application.

Returns whether the unit is obsolete.

Trait Implementations

impl Clone for Unit
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Unit
[src]

Formats the value using the given formatter.

impl Default for Unit
[src]

Returns the "default value" for a type. Read more