style: correct string split style
- Change string split method from single quotes to double quotes. This commit improves code consistency by aligning the string split syntax with the rest of the codebase. No functional changes were made as a result of this update.
This commit is contained in:
parent
926ba18e85
commit
5a82fc9a10
@ -102,7 +102,7 @@ class ApplicationController < ActionController::Base
|
||||
return locale if available_locales.include?(locale)
|
||||
|
||||
# 尝试基础语言匹配(例如:当请求 'zh' 时匹配 'zh-CN')
|
||||
base_language = locale.split('-').first
|
||||
base_language = locale.split("-").first
|
||||
matching_locale = available_locales.find do |available_locale|
|
||||
available_locale.start_with?(base_language)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user