Add widgets for translating data

This commit is contained in:
Elias Projahn 2024-04-01 16:57:34 +02:00
parent 3c8f5b8c31
commit 783d548bc2
10 changed files with 350 additions and 4 deletions

View file

@ -39,9 +39,9 @@ pub fn connect(file_name: &str) -> Result<SqliteConnection> {
}
/// A single translated string value.
#[derive(Serialize, Deserialize, AsExpression, FromSqlRow, Clone, Debug)]
#[derive(Serialize, Deserialize, AsExpression, FromSqlRow, Clone, Default, Debug)]
#[diesel(sql_type = Text)]
pub struct TranslatedString(HashMap<String, String>);
pub struct TranslatedString(pub HashMap<String, String>);
impl TranslatedString {
/// Get the best translation for the user's current locale.