hi. I noticed a couple of bugs on the New Work page :)
I have this config for testing:
const dropdownLanguages = ['en', 'de', 'es', 'fr', 'qmd']
const boldedLanguages = ['en']
const languagesForMultilingualSearch = ['en', 'de']
const modifyFilterDropdown = false
const autofillSearch = 2
const defaultLanguage = 'es'
// new work / new imported work / edit work
const modifyEditorDropdown = true
const defaultWritingLanguage = 'en' // OPTIONAL: add a language to autofill on new works
first, modifyEditorDropdown gets ignored. the if in line #84 uses the wrong config variable:
if (modifyFilterDropdown) {reduceDropdownLangs(); boldDropdownLangs()}
instead of
if (modifyEditorDropdown) {reduceDropdownLangs(); boldDropdownLangs()}
so in my config the New Work page should have a filtered dropdown, but doesn't.
second, defaultWritingLanguage also is ignored. although the function call is
if (pageURL.includes('/works/new')) {autofillBlankDropdown(defaultWritingLanguage)}
the function itself has a typo. the [lang=""] selector uses the defaultLanguage config, instead of the function parameter defaultLang:
// Autofill the dropdown if it is empty and the user selected a default language
function autofillBlankDropdown(defaultLang) {
if (!defaultLang || dropdown.val()) {return}
dropdown.children(`[lang="${defaultLanguage}"]`).attr('selected','selected')
}
therefore it ends up always setting Spanish instead of English in my config.
hi. I noticed a couple of bugs on the New Work page :)
I have this config for testing:
first,
modifyEditorDropdown
gets ignored. theif
in line #84 uses the wrong config variable:instead of
so in my config the New Work page should have a filtered dropdown, but doesn't.
second,
defaultWritingLanguage
also is ignored. although the function call isthe function itself has a typo. the
[lang=""]
selector uses thedefaultLanguage
config, instead of the function parameterdefaultLang
:therefore it ends up always setting Spanish instead of English in my config.