forked from 1b-agent/opencadstudio-upstream
feat(locale): add Fluent translations
Default to the platform language with persisted overrides across native and web builds. Refs #630
This commit is contained in:
1 parent
e102887000
commit
b90b3e3ecf
26 files changed
+1581
-112
No files matched your search
@@ -4323,6 +4323,22 @@ impl OpenCADStudio {
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::LanguageChanged(language) => {
|
||||
if self.language == language {
|
||||
return Task::none();
|
||||
}
|
||||
match crate::i18n::set_language(language) {
|
||||
Ok(()) => {
|
||||
self.language = language;
|
||||
self.persist_settings_if_changed();
|
||||
}
|
||||
Err(error) => self
|
||||
.command_line
|
||||
.push_error(&format!("Unable to change UI language: {error}")),
|
||||
}
|
||||
Task::none()
|
||||
}
|
||||
|
||||
Message::AboutOpen => {
|
||||
self.active_modal = Some(super::ModalKind::About);
|
||||
Task::none()
|
||||
|
||||
Reference in new issue
Block a user