Skip to content

Commit b69ef7d

Browse files
committed
Rename Message to FluentMessage
1 parent ae26c67 commit b69ef7d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

fluent-bundle/src/bundle.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use crate::resource::FluentResource;
2222
use crate::types::FluentValue;
2323

2424
#[derive(Debug, PartialEq)]
25-
pub struct Message<'m> {
25+
pub struct FluentMessage<'m> {
2626
pub value: Option<&'m ast::Pattern<'m>>,
2727
pub attributes: HashMap<&'m str, &'m ast::Pattern<'m>>,
2828
}
@@ -65,7 +65,7 @@ pub struct Message<'m> {
6565
/// Next, call [`add_resource`] one or more times, supplying translations in the FTL syntax. The
6666
/// `FluentBundle` instance is now ready to be used for localization.
6767
///
68-
/// To format a translation, call [`get_message`] to retrieve a [`Message`],
68+
/// To format a translation, call [`get_message`] to retrieve a [`FluentMessage`],
6969
/// and then call [`format_pattern`] on the message value or attribute in order to
7070
/// retrieve the translated string.
7171
///
@@ -84,7 +84,7 @@ pub struct Message<'m> {
8484
///
8585
/// [`add_resource`]: ./struct.FluentBundle.html#method.add_resource
8686
/// [`FluentBundle::new`]: ./struct.FluentBundle.html#method.new
87-
/// [`Message`]: ./struct.Message.html
87+
/// [`FluentMessage`]: ./struct.FluentMessage.html
8888
/// [`get_message`]: ./struct.FluentBundle.html#method.get_message
8989
/// [`format_pattern`]: ./struct.FluentBundle.html#method.format_pattern
9090
/// [`add_resource`]: ./struct.FluentBundle.html#method.add_resource
@@ -260,7 +260,7 @@ impl<R> FluentBundle<R> {
260260
self.get_entry_message(id).is_some()
261261
}
262262

263-
pub fn get_message(&self, id: &str) -> Option<Message>
263+
pub fn get_message(&self, id: &str) -> Option<FluentMessage>
264264
where
265265
R: Borrow<FluentResource>,
266266
{
@@ -275,7 +275,7 @@ impl<R> FluentBundle<R> {
275275
for attr in message.attributes.iter() {
276276
attributes.insert(attr.id.name, &attr.value);
277277
}
278-
Some(Message { value, attributes })
278+
Some(FluentMessage { value, attributes })
279279
}
280280

281281
pub fn format_pattern<'bundle>(

0 commit comments

Comments
 (0)