feat(i18n): add i18n on server side
- remove the hardcoded list of locales in favor of a discovry on start time
- server will stop on badly formatted locale .json
- add server.* entries for serer side translation
server side translation will be used for templating and email
note: no json in some embded html (like in /magic), amount of work was similar
This commit is contained in:
@@ -340,6 +340,15 @@ impl I18nService for StubI18nService {
|
||||
Ok(String::new())
|
||||
}
|
||||
|
||||
async fn translate_args(
|
||||
&self,
|
||||
_key: &str,
|
||||
_locale: Locale,
|
||||
_args: &[(&str, &str)],
|
||||
) -> I18nResult<String> {
|
||||
Ok(String::new())
|
||||
}
|
||||
|
||||
async fn load_translations(&self, _locale: Locale) -> I18nResult<()> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user