File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ pub enum NoteCard {
10
10
impl NoteCard {
11
11
pub fn prefix_for_locale ( & self , locale : Locale ) -> & str {
12
12
match ( self , locale) {
13
+ ( Self :: Callout , Locale :: De ) => "Aufruf:" ,
14
+ ( Self :: Warning , Locale :: De ) => "Warnung:" ,
15
+ ( Self :: Note , Locale :: De ) => "Hinweis:" ,
13
16
( Self :: Callout , Locale :: EnUs ) => "Callout:" ,
14
17
( Self :: Warning , Locale :: EnUs ) => "Warning:" ,
15
18
( Self :: Note , Locale :: EnUs ) => "Note:" ,
Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ pub enum Native {
13
13
#[ default]
14
14
#[ serde( rename = "English (US)" ) ]
15
15
EnUS ,
16
+ #[ serde( rename = "Deutsch" ) ]
17
+ De ,
16
18
#[ serde( rename = r#"Español"# ) ]
17
19
Es ,
18
20
#[ serde( rename = r#"Français"# ) ]
@@ -35,6 +37,7 @@ impl From<Locale> for Native {
35
37
fn from ( value : Locale ) -> Self {
36
38
match value {
37
39
Locale :: EnUs => Self :: EnUS ,
40
+ Locale :: De => Self :: De ,
38
41
Locale :: Es => Self :: Es ,
39
42
Locale :: Fr => Self :: Fr ,
40
43
Locale :: Ja => Self :: Ja ,
@@ -64,6 +67,8 @@ pub enum Locale {
64
67
#[ default]
65
68
#[ serde( rename = "en-US" ) ]
66
69
EnUs ,
70
+ #[ serde( rename = "de" ) ]
71
+ De ,
67
72
#[ serde( rename = "es" ) ]
68
73
Es ,
69
74
#[ serde( rename = "fr" ) ]
@@ -111,6 +116,7 @@ impl Locale {
111
116
pub const fn as_url_str ( & self ) -> & str {
112
117
match * self {
113
118
Self :: EnUs => "en-US" ,
119
+ Self :: De => "de" ,
114
120
Self :: Es => "es" ,
115
121
Self :: Fr => "fr" ,
116
122
Self :: Ja => "ja" ,
@@ -142,6 +148,7 @@ impl FromStr for Locale {
142
148
fn from_str ( s : & str ) -> Result < Self , Self :: Err > {
143
149
match s {
144
150
"en-US" | "en-us" => Ok ( Self :: EnUs ) ,
151
+ "de" => Ok ( Self :: De ) ,
145
152
"es" => Ok ( Self :: Es ) ,
146
153
"fr" => Ok ( Self :: Fr ) ,
147
154
"ja" => Ok ( Self :: Ja ) ,
You can’t perform that action at this time.
0 commit comments