File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -347,6 +347,7 @@ pub const TAGS: &[&str] = &[
347347 "image" ,
348348 "payment_provider" ,
349349 "telegram" ,
350+ "localized_name" ,
350351] ;
351352
352353pub fn generate_tags (
@@ -379,6 +380,19 @@ pub fn generate_tags(
379380 "name" => {
380381 res. insert ( "name" . into ( ) , element. name ( lang) . into ( ) ) ;
381382 }
383+ "localized_name" => {
384+ let mut localized = Map :: new ( ) ;
385+ for ( key, value) in osm_tags {
386+ if let Some ( lang_code) = key. strip_prefix ( "name:" ) {
387+ if lang_code. len ( ) == 2 && value. is_string ( ) {
388+ localized. insert ( lang_code. to_string ( ) , value. clone ( ) ) ;
389+ }
390+ }
391+ }
392+ if !localized. is_empty ( ) {
393+ res. insert ( "localized_name" . into ( ) , Value :: Object ( localized) ) ;
394+ }
395+ }
382396 "opening_hours" => {
383397 if let Some ( opening_hours) = element. opening_hours ( ) {
384398 res. insert ( "opening_hours" . to_string ( ) , opening_hours. into ( ) ) ;
You can’t perform that action at this time.
0 commit comments