Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin / Languages and translations #5923

Closed
wants to merge 41 commits into from

Conversation

fxprunayre
Copy link
Member

@fxprunayre fxprunayre commented Aug 18, 2021

Add a new panel for managing database languages and translations.

image

For end user, it is recommended to remove unused languages to keep admin form as simple as possible.

image

Other fix:

  • API / Languages / Fix PUT and DELETE operation following JPA migration
  • API / Languages / Don't allow deletion of the last language - we need at least one.
  • API / Languages / Add operation to retrieve application languages

Björn Höfling and others added 27 commits August 13, 2021 14:54
* web/src/main/webResources/WEB-INF/data/config/index/records.json: Add fields langfre and anyfre with french analyzer.
records.json: Add properties lang... for different languages.
copy_to to these properties.
* Remove schema for french only.
* Add asciifolding in french for better support of accents
* Update doc
* Dispatch keywords in proper full text lang field.
* If records are in one language, the record language is used by default (and no options are proposed to users)
* if records are in various languages, the following options are available:

Languages are ordered by frequency in records. Languages proposed does not take into account templates.
Language detection is made on the list of record's languages. The more languages you have, the more the language detection precision decrease.

Catalogue administrator can define the language strategy to use by default in UI configuration:
* queryBase: to adjust query

* searchOptions.language: to display language options
* languageStrategy

Language strategies:
* searchInUILanguage: search in UI languages eg. full text field is any.langfre if French
* searchInAllLanguages: search using any.* fields (no analysis is done, more records are returned)
*  searchInDetectedLanguage: restrict the search to the language detected based on user search. If language detection fails, search in all languages.
* forceALanguage: depending on user selection, force a language.
Instead of configuring all the settings available for the user configuration,
only define the settings you want to change and apply that to the default configuration.

* Keep configuration as simple as possible
* Correct merge of settings by working on settings path instead of fuzzy merge (which was not combining well arrays or objects)
* Make migration easier

2 tabs are available to:
* configure using the classic form
* or configure directly in the JSON

On the JSON form, user can:
* Reset configuration to the minimum ie. `{}`
* Set the configuration to the complete config with all options (not
  recommanded).
* Compare current config and the default and remove all options that are common.

To populate the configuration, user can choose among the set of all options computed from the default config.

JSON form also has basic autocomplete and basic snippets enabled.

* Update ace library
* Underscore replaced by lodash (to manipulate object by full path) https://github.com/lodash/lodash/wiki/Migrating
Those that can be initialized with and SQL scripts. Also fix PUT operation after JPA migration.
For end user, it is recommended to remove unused languages to keep admin form as simple as possible.
@fxprunayre fxprunayre added this to the 4.0.6 milestone Aug 18, 2021
@MichelGabriel
Copy link
Contributor

Just a small thing, this would be a nice icon for it: https://fontawesome.com/v4.7/icon/language

(at least if it's available in the Font Awesome version GN is using)

@fxprunayre
Copy link
Member Author

fxprunayre commented Aug 19, 2021

(at least if it's available in the Font Awesome version GN is using)

I don't see it https://fontawesome.com/v3.2/icons/ (we are using old versions of a number of libs ...). If you think something match better in 3.2 ?

@MichelGabriel
Copy link
Contributor

No, can't really think of one in 3.2.

@jahow jahow modified the milestones: 4.0.6, 4.0.7 Feb 2, 2022
@fxprunayre
Copy link
Member Author

Added with #6188

@fxprunayre fxprunayre closed this Mar 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants