Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Zander Brown
malamute
Commits
00d026db
Verified
Commit
00d026db
authored
Aug 08, 2021
by
Zander Brown
🔲
Browse files
l10n: try really hard to match a language
parent
e305d373
Pipeline
#305788
passed with stage
in 11 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
templates/lang_redirect.js
View file @
00d026db
...
...
@@ -5,6 +5,7 @@ var languages =
function
lang_redirect
(
base
,
logical_url
)
{
let
lang
=
navigator
.
languages
.
map
(
lang
=>
lang
.
replace
(
'
-
'
,
'
_
'
))
.
concat
(
navigator
.
languages
.
map
(
lang
=>
lang
.
split
(
'
-
'
)[
0
]))
.
filter
(
lang
=>
languages
.
includes
(
lang
))
.
shift
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment