public
Fork of halorgium/mephisto
Description: A mirror of the mephisto code-base
Homepage: http://mephistoblog.com/
Clone URL: git://github.com/technoweenie/mephisto.git
Click here to lend your support to: mephisto and make a donation at www.pledgie.com !
Introduce "lang" parameter for a Site. Used in feed.rxml to specify feed 
language, especially useful for non-english blogs.

Site settings form altered.
yaroslav (author)
Sun May 11 03:59:54 -0700 2008
commit  bc58c2c800ee1bb8e33b4054e8565ce7e19ee8fa
tree    18cdd53682f6d1efdf6803f43aa3f263b10e9289
parent  f80afafc295d5ef9687392074ff696d90beb47f2
...
31
32
33
 
 
 
 
 
34
35
36
...
31
32
33
34
35
36
37
38
39
40
41
0
@@ -31,6 +31,11 @@
0
     <dt><label for="site_timezone">Website Timezone</label></dt>
0
     <dd><%= select_tag 'site_timezone', options_for_select(['UTC'] + TZInfo::Timezone.all.map{|tz| [tz.to_s, tz.name]}.sort, @site.timezone.name), :name => 'site[timezone]' %></dd>
0
     <dt>
0
+ <label for="site_lang">Site language</label>
0
+ <span class="hint">Used to specify language in your site feeds</span>
0
+ </dt>
0
+ <dd><%= f.text_field :lang %></dd>
0
+ <dt>
0
       <label for="site_current_theme_path">Current Theme Path</label>
0
       <span class="hint">This is the path to the current template in /themes/site-<%= site.id %>. Be careful with this setting!</span>
0
     </dt>
...
1
2
3
 
4
5
6
...
1
2
 
3
4
5
6
0
@@ -1,6 +1,6 @@
0
 xml.instruct! :xml, :version=>"1.0", :encoding=>"UTF-8"
0
 
0
-xml.feed "xml:lang" => "en-US", "xmlns" => 'http://www.w3.org/2005/Atom' do
0
+xml.feed "xml:lang" => "#{site.lang || 'en-US'}", "xmlns" => 'http://www.w3.org/2005/Atom' do
0
   xml.title "#{site.title || 'Mephisto'} - #{@section ? @section.name : 'All'}#{' Comments' if @comments && @articles.nil?}"
0
   xml.id "tag:#{request.host},#{Time.now.utc.year}:mephisto#{"/#{@section.path}" if @section}#{ '/comments' if @comments && @articles.nil?}"
0
   xml.generator "Mephisto #{Mephisto::Version::TITLE}", :uri => "http://mephistoblog.com", :version => "#{Mephisto::Version::STRING}"

Comments