mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-18 23:16:21 +00:00
Merge branch 'issue-13780' of https://0xacab.org/sutty/sutty into 17.3.alpine.panel.sutty.nl
This commit is contained in:
commit
e813fd6c0d
1 changed files with 5 additions and 2 deletions
|
@ -106,11 +106,14 @@ class Site
|
|||
end
|
||||
|
||||
# Obtiene el idioma y la ruta del post a partir de la ubicación en
|
||||
# el disco
|
||||
# el disco.
|
||||
#
|
||||
# Las rutas vienen en ASCII-9BIT desde Rugged, pero en realidad
|
||||
# son UTF-8
|
||||
#
|
||||
# @return [Array<String>]
|
||||
def locale_and_path_from(path)
|
||||
locale, path = path.split(File::SEPARATOR, 2)
|
||||
locale, path = path.force_encoding('utf-8').split(File::SEPARATOR, 2)
|
||||
|
||||
[
|
||||
locale.sub(LOCALE_FROM_PATH, ''),
|
||||
|
|
Loading…
Reference in a new issue