chenejac / VIVOTestMigrationJIRA

0 stars 0 forks source link

VIVO-1959: When no selectable languages are enabled, interface is broken if browser's accept-language does not match an installed language #1848

Closed chenejac closed 3 years ago

chenejac commented 3 years ago

Brian Lowe (Migrated from VIVO-1959) said:

When the default runtime.properties settings are used to configure a monolingual VIVO, HTTP requests with accept-language set to a language not supported by VIVO will result in an interface where all i18n strings are replaced with an error message.

It looks like SelectedLocale.getOverridingLocale() only gets a default if the languages.selectableLocales property in runtime.properties is populated and has produced a nonempty list of selectable locales.  Otherwise (monolingual default VIVO) getOverridingLocale() returns null, which in turn causes the request not to get wrapped in a LocaleSelectionRequestWrapper, so req.getLocale() just returns whatever is in the actual request.

chenejac commented 3 years ago

Brian Lowe said:

Pull request: https://github.com/vivo-project/Vitro/pull/212

chenejac commented 3 years ago

Brian Lowe said:

Resolved in commit [https://github.com/vivo-project/Vitro/commit/6b612316eedf2c1783a1c4b85c08be99cea1b22a]