1//! Defines `Message` struct and its view traits.
2
3mod builder;
4mod flags;
5mod key;
6mod view;
7
8pub use builder::MessageBuilder;
9pub use flags::MessageFlags;
10pub(crate) use key::MessageKey;
11pub use view::{CatalogMessageMutView, MessageMutView, MessageView, SingularPluralMismatchError};
12
13/// Represents a single message entry.
14#[derive(Debug, Default)]
15pub struct Message {
16 /// Developer comments of the message.
17 pub(crate) comments: String,
18 /// Source code location of the message.
19 pub(crate) source: String,
20 /// Flags of the message.
21 pub(crate) flags: MessageFlags,
22 /// `msgctxt` of the message.
23 pub(crate) msgctxt: String,
24 /// `msgid` of the message.
25 pub(crate) msgid: String,
26 /// `msgid_plural` of the plural message.
27 pub(crate) msgid_plural: String,
28 /// `msgstr` of the singular message.
29 pub(crate) msgstr: String,
30 /// vector of all plural forms of translation.
31 pub(crate) msgstr_plural: Vec<String>,
32 /// Whether the message is plural
33 pub(crate) is_plural: bool,
34}
35