From 5866540dd8d754d8e7198976bc0c8a62d8b12f43 Mon Sep 17 00:00:00 2001 From: Thomas Reynolds Date: Tue, 17 Apr 2012 10:59:58 -0700 Subject: [PATCH] Sort default i18n filenames --- middleman-core/lib/middleman-core/core_extensions/i18n.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/middleman-core/lib/middleman-core/core_extensions/i18n.rb b/middleman-core/lib/middleman-core/core_extensions/i18n.rb index c5f5c511..843a1361 100644 --- a/middleman-core/lib/middleman-core/core_extensions/i18n.rb +++ b/middleman-core/lib/middleman-core/core_extensions/i18n.rb @@ -62,9 +62,9 @@ module Middleman::CoreExtensions::I18n def langs @options[:langs] || begin - Dir[File.join(@app.root, @app.locales_dir, "*.yml")].map do |file| - File.basename(file).gsub(".yml", "").to_sym - end + Dir[File.join(@app.root, @app.locales_dir, "*.yml")].map { |file| + File.basename(file).gsub(".yml", "") + }.sort.map(&:to_sym) end end