<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,3 +1,5 @@
+-- 0.98
+  Accepted patch from hoelmer: Updated rake task to use I18n yaml format.
 -- 0.97
   Accepted patch from Aitor Garay-Romero: root routes with prefix now doesn't set the locale parameter.
 </diff>
      <filename>ChangeLog</filename>
    </modified>
    <modified>
      <diff>@@ -2,15 +2,14 @@ config_path = File.expand_path(File.join(RAILS_ROOT, 'config'))
 require File.join(config_path, 'environment')
 
 namespace :translate_routes do
-  
+
   desc &quot;Updates yaml translation files for the given languages&quot;
   task :update_yaml, :langs do |task, args|
-    
     segments = ActionController::Routing::Translator.original_static_segments
     
     if args[:langs].is_a?(String)    
       langs = args[:langs] + ' ' + ActionController::Routing::Translator.default_locale            
-      langs.split.each do |lang|        
+      langs.split.uniq.each do |lang|
 
         file_path = File.join(config_path, &quot;routes_#{lang}.yml&quot;);
 
@@ -23,20 +22,17 @@ namespace :translate_routes do
           translations = {}
           f = File.new(file_path, 'w')
         end
-        
+
+        f.write &quot;#{lang}:\n&quot;
         segments.each do |s|
-          translation = translations[s] rescue ''
-          f.write &quot;#{s}: #{translation}\n&quot;
+          translation = translations[lang][s] rescue ''
+          f.write &quot;  #{s}: #{translation}\n&quot;
         end
         f.close
-
       end
 
     else
       puts 'Missing parameters, usage example: rake translate_routes:update_yaml[&quot;fr de es&quot;]'
     end
-
   end
-  
 end
-</diff>
      <filename>tasks/translate_routes_tasks.rake</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c917eff2b60a186c3e388745051dd5fd1d3b12ef</id>
    </parent>
  </parents>
  <author>
    <name>Raul Murciano</name>
    <email>raul@murciano.net</email>
  </author>
  <url>http://github.com/raul/translate_routes/commit/300dc41e1737c3ce71340a521412aa552cd58375</url>
  <id>300dc41e1737c3ce71340a521412aa552cd58375</id>
  <committed-date>2009-02-03T08:58:05-08:00</committed-date>
  <authored-date>2009-02-03T08:58:05-08:00</authored-date>
  <message>Accepted patch from hoelmer: Updated rake task to use I18n yaml format.</message>
  <tree>50245d9b81a61a6f115b4eddad37b99ac0bd81ed</tree>
  <committer>
    <name>Raul Murciano</name>
    <email>raul@murciano.net</email>
  </committer>
</commit>
