mirror of
https://github.com/johrpan/musicus.git
synced 2025-10-29 05:07:23 +01:00
Add widgets for translating data
This commit is contained in:
parent
3c8f5b8c31
commit
783d548bc2
10 changed files with 350 additions and 4 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue