Leptos updated to 0.5

This commit is contained in:
2023-09-15 13:55:01 +02:00
parent 9dd0993204
commit bbad2bb183
18 changed files with 234 additions and 281 deletions
+2 -2
View File
@@ -5,9 +5,9 @@ use crate::locales::catalogues::get_dictionary;
mod catalogues;
pub fn trl(cx: Scope, phrase: &str) -> impl Fn() -> String {
pub fn trl(phrase: &str) -> impl Fn() -> String {
let mut translated = phrase;
if let Some(dict) = get_dictionary(cx) {
if let Some(dict) = get_dictionary() {
if let Some(p) = dict.get(phrase.to_string().as_str()) {
translated = *p;
}