mitodl/open-discussions

Do not default to "English" when courses specify no language.

Closed this issue · 2 comments

Steps to Reproduce

  1. View the resource drawer for any non-english course on Prolearn. For example, https://discussions-rc.odl.mit.edu/infinite/search?q=Innovaci%C3%B3n&resource_id=17023&resource_type=course

Expected Behavior

Language should either be correct or not specified.

Actual Behavior

Language is "English"

Screenshot or Screencast

Screenshot 2023-04-20 at 4 25 22 PM

Comments

When language is null, the frontend is defaulting to English

@pdpinch @mbertrand cc @Ferdi : We discussed fixing this by not defaulting to English and displaying nothing if no language is specified—a simple change to make.

This would affect a lot of resource objects. Basically only mitx courses specify a language (See table below).

IMO this is still good to do—defaulting to English can be incorrect and looks silly when the description text is clearly not English. But I wanted to give a heads up that this would change how many things are displayed.

In table below, note that basically only mitx platform has non-null language. OCW has a few, mostly unpublished.

total_published ,total_published_runs ,total ,platform     ,language ,model
           8190 ,                8190 , 8190 ,youtube      ,         ,video
           2687 ,                2687 , 3334 ,ocw          ,         ,course
           1295 ,                1295 , 1295 ,podcast      ,         ,podcastepisode
            180 ,                 191 , 1106 ,mitx         ,en-us    ,course
            112 ,                 186 ,  262 ,see          ,         ,course
            177 ,                 177 ,  290 ,mitpe        ,         ,course
             56 ,                 141 ,  372 ,xpro         ,         ,course
             62 ,                  63 ,   63 ,oll          ,         ,course
             18 ,                  45 ,  198 ,mitx         ,         ,course
             34 ,                  34 ,   62 ,mitxonline   ,         ,course
             30 ,                  30 ,   30 ,podcast      ,         ,podcast
             22 ,                  22 ,   22 ,xpro         ,         ,program
              6 ,                   6 ,    6 ,micromasters ,         ,program
              3 ,                   3 ,    4 ,bootcamps    ,         ,course
              3 ,                   3 ,    9 ,mitx         ,tr       ,course
              2 ,                   2 ,    3 ,mitx         ,ko       ,course
              1 ,                   2 ,    2 ,csail        ,         ,course
              2 ,                   2 ,  710 ,ocw          ,en-US    ,course
              1 ,                   2 ,    2 ,ctl          ,         ,course
              2 ,                   2 ,   12 ,mitx         ,es-es    ,course
              1 ,                   1 ,    1 ,scc          ,         ,course
              0 ,                   0 ,    1 ,ocw          ,fr       ,course
              0 ,                   0 ,    1 ,mitxonline   ,         ,program
              0 ,                   0 ,    1 ,ocw          ,de       ,course
              0 ,                   0 ,    3 ,ocw          ,es       ,course

Thanks @ChristopherChudzicki. This is still the right thing to do. If it becomes an issue that we are missing this data, we'll have to do some research on whether we can retrieve it from the various sources.