In langSelector the updateSelectLangInput inside the initLocale reactive was causing a clash with the parmesan package and therefore blocking modals from opening. In particular, modals from shinypanels::showModalMultipleId (example to reproduce this problem can be found in inst/examples/ex07-translate_with_parmesan) were not opening. The temporary fix was to remove this updateSelectLangInput which means that shi18ny only works with language parameters from the URL, but not with the language dropdown.
The following code snippet shows the reactives initLocale and currentLocale how they are working right now, with the old code commented out. Uncomment the commented sections to reproduce issue.
initLocale <- reactive({
selected <- queryLang() %||% config$defaultLang
message("selected2 ", selected," config ", config$defaultLang)
message(showSelector)
if(showSelector){
shinyjs::show("langContainer")
}
message("config_av_langs",config$availableLangs)
# uncomment the following to reproduce problem
# updateSelectLangInput(session, 'langInner',
# langs = config$availableLangs,
# selected = selected)
message("selected3", selected, " config ", config$defaultLang)
selected
})
currentLocale <- reactive({
initLocale()
newLocale <- queryLang() # comment out this to reproduce problem
# newLocale <- input$langInner # uncomment this to reproduce problem
message("initLocale: ", initLocale())
message("input3 ", newLocale, " is null ",is.null(newLocale))
newLocale
})
In
langSelectortheupdateSelectLangInputinside theinitLocalereactive was causing a clash with theparmesanpackage and therefore blocking modals from opening. In particular, modals fromshinypanels::showModalMultipleId(example to reproduce this problem can be found ininst/examples/ex07-translate_with_parmesan) were not opening. The temporary fix was to remove thisupdateSelectLangInputwhich means thatshi18nyonly works with language parameters from the URL, but not with the language dropdown.The following code snippet shows the reactives
initLocaleandcurrentLocalehow they are working right now, with the old code commented out. Uncomment the commented sections to reproduce issue.