Fixed jquery json language extraction and updated to the latest Twine #5

Merged
biodranik merged 14 commits from fixes into organicmaps 2022-12-22 11:59:49 +00:00
Showing only changes of commit 50e7eb95cc - Show all commits

View file

@ -18,7 +18,7 @@ module Twine
}
# Regional dialect fallbacks to generic language (for example: 'es-MX' to 'es' instead of default 'en').
if language.match(/([a-zA-Z])-[a-zA-Z]+/)
if language.match(/([a-zA-Z]{2})-[a-zA-Z]+/)
generic_language = language.gsub(/([a-zA-Z])-[a-zA-Z]+/, '\1')
end