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

Updates Language Boost #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Updates Language Boost #11

wants to merge 1 commit into from

Conversation

pkamps
Copy link
Member

@pkamps pkamps commented Apr 29, 2019

Upstream pull request:
ezsystems#90

@pkamps
Copy link
Member Author

pkamps commented Apr 29, 2019

To me, it makes sense to only boost the main language. There is not good reason to down-boast (0.8) the 3rd language.

@pkamps
Copy link
Member Author

pkamps commented May 7, 2019

Ready to get merged.

@benkmugo
Copy link
Member

benkmugo commented May 8, 2019

Code looks good and I also wonder why the previous setting was basically demoting the 3rd language.
Should we add a note to the SiteLanguageList setting in the RegionalSettings block to explain that the first language has a default boost? Might be helpful.

https://github.com/mugoweb/ezpublish-legacy/blob/master/settings/site.ini#L918

@peterkeung
Copy link
Member

The proposed new code uses [RegionalSettings]Locale, which brings up the question: why not use the first language in SiteLanguageList instead? For our multi-language sites those values are the same, but are they ever different?

@benkmugo
Copy link
Member

benkmugo commented May 9, 2019

I wouldn't think so. The comment above SiteLanguageList reads like that same assumption to me.
The first language set has the highest priority, which I would expect to match the locale set.

If we go with that (1st Language), perhaps two comments? One above Locale explaining the boost and one more above SiteLanguageList saying the default boosting on those entries is gone, but the first is boosted by default?

@pkamps
Copy link
Member Author

pkamps commented May 14, 2019

In general (not only for ezfind), I think SiteLanguageList is used for the ContentObjectTranslations. RegionalSettings/Locale is probably used for the translation files.

Is the first entry of SiteLanguageList ever different to RegionalSettings/Locale? I cannot come up with a real use case: maybe somebody creates a Texan dialect teng_US translation files. You could set a new locale setting and keep the existing ContentObjectTranslation.

But that question raises a good point: I think it makes more sense to boost the first entry from the SiteLanguageList. Currently it uses the RegionalSettings/Locale setting with the assumption that it will always match.

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.

3 participants