Skip to content

Commit e2ffcca

Browse files
committed
Always use l10n instead of localization
1 parent cd91ef5 commit e2ffcca

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

rust/agama-manager/src/service.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,8 @@ impl MessageHandler<message::GetStatus> for Service {
112112
impl MessageHandler<message::GetSystem> for Service {
113113
/// It returns the information of the underlying system.
114114
async fn handle(&mut self, _message: message::GetSystem) -> Result<SystemInfo, Error> {
115-
let l10n_system = self.l10n.call(l10n::message::GetSystem).await?;
116-
Ok(SystemInfo {
117-
localization: l10n_system,
118-
})
115+
let l10n = self.l10n.call(l10n::message::GetSystem).await?;
116+
Ok(SystemInfo { l10n })
119117
}
120118
}
121119

@@ -126,10 +124,7 @@ impl MessageHandler<message::GetExtendedConfig> for Service {
126124
/// It includes user and default values.
127125
async fn handle(&mut self, _message: message::GetExtendedConfig) -> Result<Config, Error> {
128126
let l10n = self.l10n.call(l10n::message::GetConfig).await?;
129-
Ok(Config {
130-
l10n: Some(l10n),
131-
..Default::default()
132-
})
127+
Ok(Config { l10n: Some(l10n) })
133128
}
134129
}
135130

@@ -178,8 +173,8 @@ impl MessageHandler<message::UpdateConfig> for Service {
178173
impl MessageHandler<message::GetProposal> for Service {
179174
/// It returns the current proposal, if any.
180175
async fn handle(&mut self, _message: message::GetProposal) -> Result<Option<Proposal>, Error> {
181-
let localization = self.l10n.call(l10n::message::GetProposal).await?;
182-
Ok(Some(Proposal { localization }))
176+
let l10n = self.l10n.call(l10n::message::GetProposal).await?;
177+
Ok(Some(Proposal { l10n }))
183178
}
184179
}
185180

rust/agama-utils/src/api/proposal.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ use serde::Serialize;
2424
#[derive(Clone, Debug, Serialize, utoipa::ToSchema)]
2525
pub struct Proposal {
2626
#[serde(skip_serializing_if = "Option::is_none")]
27-
pub localization: Option<l10n::Proposal>,
27+
pub l10n: Option<l10n::Proposal>,
2828
}

rust/agama-utils/src/api/system_info.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ use serde::Serialize;
2323

2424
#[derive(Clone, Debug, Serialize, utoipa::ToSchema)]
2525
pub struct SystemInfo {
26-
pub localization: l10n::SystemInfo,
26+
pub l10n: l10n::SystemInfo,
2727
}

0 commit comments

Comments
 (0)