Task #2127
closed
Non-existent extensions.libreoffice.org/locale pages
Added by Muhammet Kara over 7 years ago.
Updated over 7 years ago.
Description
Links to the extensions website from the LibreOffice Start Center refers to localized versions of the extensions web site (like http://extensions.libreoffice.org/tr for Turkish UI), but there is no localized version of the web site. So user sees a message titled as "This page does not seem to exist…".
Samuel Mehrbrodt suggested to open a ticket for infra, so that some redirects can be put in place to resolve this issue. You can refer to this patch for details: https://gerrit.libreoffice.org/#/c/31951/
Files
- Status changed from New to In Progress
- Assignee set to Guilhem Moulin
Is the full list of locale available somewhere? We can't use a naive
regex `^/[a-zA-Z_\-]+$` as the redirection shouldn't apply to
[[https://extensions.libreoffice.org/events]] for instance. However
dumping the recent access logs (last 2 months) to
sed nr 's,\S+ \S+ \S+ \[[^\]+\] "GET /([a-zA-Z_\]+) .*,\1,p' | sort -u
it looks like all locale candidates match "^/[a-z]{2}(-[a-z]{2})?$", is
that correct? Using such regex won't lead to false positives either, if
I read the log right.
sorry, you weren't in cc when I described exactly that: a regex to match the locales used in LO.
So a [a-z]{2} , a [a-z]{2}-[a-z]{2} and a few manual ones, for ca-valencia and kmr-latn or vec for venetian for example.
I'll attach a superset of the langauges (AKA all known to pootle, not all are used in LO). Pootle uses _, while LO uses - as delimiter (having both in the regex is fine with me)
If you wish, you can also make it a hardcoded list of langs, but that would blow up the vhost definition without giving much benefit.
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
Thanks for the list, cloph. I don't see much benefit in spelling out every single one, either. There are enough locales that don't fit the pattern ;-) In the end I added a 303 redirection for everything matching
^/(?:[a-z]{2}(?:[\-_][a-z]{2})?|anp|ast|bar|brx|ca-valencia|dgo|dsb|fur|gbm|gug|hsb|kab|kmr-Latn|kok|mai|mni|nah|nqo|nso|pap_CW|sah|sat|sid|szl|vec)$
Also available in: Atom
PDF