Commit 24169eb8f612b27657c29b9e4036d2dfae035dbb
1 parent
c1e978f6
Exists in
master
and in
29 other branches
Do not update PO files during upgrades
Showing
2 changed files
with
14 additions
and
1 deletions
Show diff stats
lib/tasks/doc.rake
... | ... | @@ -97,5 +97,18 @@ namespace :noosfero do |
97 | 97 | end |
98 | 98 | |
99 | 99 | task :rebuild => [:clean, :build] |
100 | + | |
101 | + task :translate => english_xhtml do | |
102 | + languages = Noosfero.locales.keys - ['en'] | |
103 | + languages.each do |lang| | |
104 | + po = "po/#{lang}/noosfero-doc.po" | |
105 | + if File.exists?(po) | |
106 | + Dir['doc/noosfero/**/*.en.xhtml'].each do |doc| | |
107 | + target = doc.sub('.en.xhtml', ".#{lang}.xhtml") | |
108 | + sh "po4a-translate -f xhtml -M utf8 -m #{doc} -p #{po} -L utf8 -l #{target}" | |
109 | + end | |
110 | + end | |
111 | + end | |
112 | + end | |
100 | 113 | end |
101 | 114 | end | ... | ... |
lib/tasks/translation.rake