Skip to content

Commit 72b2f7a

Browse files
committed
Merge pull request railsbridge#370 from rails-taiwan/enable-zh-tw-locale
zh-tw subdomain
2 parents 366c860 + b5afda6 commit 72b2f7a

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

app.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class InstallFest < Sinatra::Application # todo: use Sinatra::Base instead, wi
2626

2727
# Set available locales in Array of Strings; this is also used when
2828
# checking availability in dynamic locale assignment, they must be strings.
29-
AVAILABLE_LOCALES = %w(en es)
29+
AVAILABLE_LOCALES = %w(en es zh-tw)
3030

3131
configure do
3232
I18n::Backend::Simple.include(I18n::Backend::Fallbacks)
@@ -41,7 +41,7 @@ class InstallFest < Sinatra::Application # todo: use Sinatra::Base instead, wi
4141
def initialize
4242
super
4343
@here = File.expand_path(File.dirname(__FILE__))
44-
@default_sites = {en: "docs", es: "hola"}
44+
@default_sites = {en: "docs", es: "hola", :"zh-tw" => "nihao" }
4545
end
4646

4747
attr_reader :here

lib/flags.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def self.css_path
1313

1414
def initialize *args
1515
super
16-
@locales = ["us", "es"]
16+
@locales = ["us", "es", "zh-tw"]
1717
end
1818

1919
def content

public/flags/ZH-TW.png

279 Bytes
Loading

sites/zh-tw/nihao/nihao.step

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
message "世界你好!"

spec/site_syntax_spec.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def app
1212
@app ||= InstallFest.new
1313
end
1414

15-
['en', 'es'].each do |locale|
15+
['en', 'es', 'zh-tw'].each do |locale|
1616
describe "in locale '#{locale}'" do
1717
Site.all(locale).each do |site|
1818
describe "#{site.name} pages..." do

0 commit comments

Comments
 (0)