Commit a6178cf3b727efe1dc6988b5e8a7ed292343e9d7

Authored by Antonio Terceiro
1 parent e01744f2

remove obsolete script

plugin translations have already been moved to the plugin sub-trees
Showing 1 changed file with 0 additions and 34 deletions   Show diff stats
script/move-translations-to-plugins.rb
@@ -1,34 +0,0 @@ @@ -1,34 +0,0 @@
1 -languages = Dir.glob('po/*').reject { |f| f =~ /pot$/ }.map { |f| File.basename(f) }  
2 -  
3 -core_files = `grep '#:' po/noosfero.pot | cut -d ':' -f 2 | sed 's/^\s*//' | grep -v '^plugins' | sort -u`.split.map { |f| [ '-N', f] }.flatten  
4 -  
5 -languages.each do |lang|  
6 -  
7 - lang_plugins_po = "tmp/#{lang}_plugins.po"  
8 - system('msggrep', '-v', *core_files, '--output-file', lang_plugins_po, "po/#{lang}/noosfero.po")  
9 -  
10 - Dir.glob('plugins/*').each do |plugindir|  
11 - plugin = File.basename(plugindir)  
12 - po = File.join(plugindir, 'po', lang, plugin + '.po')  
13 -  
14 - files = []  
15 - Dir.glob("#{plugindir}/**/*.{rb,html.erb}").each do |f|  
16 - files << '-N' << f  
17 - end  
18 -  
19 - system('mkdir', '-p', File.dirname(po))  
20 - system('msggrep', *files, '--output-file', po, lang_plugins_po)  
21 -  
22 - if system("msgfmt --statistics -o /dev/null #{po} 2>&1 | grep -q '^0 translated message'")  
23 - # empty .po  
24 - system('rm', '-f', po)  
25 - puts "[#{lang}] #{plugin}: PO file empty, deleted"  
26 - else  
27 - puts "[#{lang}] #{plugin}"  
28 - end  
29 -  
30 - end  
31 -  
32 - system('rm', '-f', lang_plugins_po)  
33 - system('find plugins/*/po -type d -empty -delete')  
34 -end