/[smeserver]/builds_bin/update_templates
ViewVC logotype

Diff of /builds_bin/update_templates

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.11 by slords, Tue Mar 2 21:16:48 2010 UTC Revision 1.12 by slords, Tue Mar 2 22:08:55 2010 UTC
# Line 97  do Line 97  do
97      > /var/lib/pootle/tmp/compendium-$lang.po      > /var/lib/pootle/tmp/compendium-$lang.po
98    
99      # Use compendium to migrate each project to new template      # Use compendium to migrate each project to new template
100      for proj in $(ls -d /var/lib/pootle/po/{sme,contribs}[0-9]/$lang 2> /dev/null | sed 's@.*/\([^/]\+\)/[^/]\+$@\1@')      for ver in $(ls -d /var/lib/pootle/po/{sme,contribs}[0-9]/$lang 2> /dev/null | sed 's@.*/\([^/]\+\)/[^/]\+$@\1@')
101      do      do
102          mkdir -p /var/lib/pootle/tmp/$proj/$lang          mkdir -p /var/lib/pootle/tmp/$ver/$lang
103          pomigrate2 -F -C=/var/lib/pootle/tmp/compendium-$lang.po -q --locale=$lang \          pomigrate2 -F -C=/var/lib/pootle/tmp/compendium-$lang.po -q --locale=$lang \
104          /var/lib/pootle/po/$proj/$lang /var/lib/pootle/tmp/$proj/$lang /var/lib/pootle/po/$proj/templates > /dev/null          /var/lib/pootle/po/$ver/$lang /var/lib/pootle/tmp/$ver/$lang /var/lib/pootle/po/$ver/templates > /dev/null
105    
106          # Ensure language is correct          # Ensure language is correct
107          sed -i "/msgid \"en-us\"/{N;s@msgstr \"[^\"]*\"@msgstr \"$lang\"@}" /var/lib/pootle/tmp/$proj/$lang/* 2> /dev/null          sed -i "/msgid \"en-us\"/{N;s@msgstr \"[^\"]*\"@msgstr \"$lang\"@}" /var/lib/pootle/tmp/$ver/$lang/* 2> /dev/null
108    
109          # Generate translation memory for panels          # Generate translation memory for panels
110          updatetm --progress none -c 4 -i /var/lib/pootle/tmp/$proj/$lang -t /var/lib/pootle/tmp/compendium-$lang.po -o /var/lib/pootle/tmp/$proj/$lang          updatetm --progress none -c 4 -i /var/lib/pootle/tmp/$ver/$lang -t /var/lib/pootle/tmp/compendium-$lang.po -o /var/lib/pootle/tmp/$ver/$lang
     done  
 done  
111    
112  # Set package name/version in new po files          find /var/lib/pootle/tmp/$ver/$lang -type f | while read pkg
113  for ver in 7 8          do
114  do              # Set package name/version in new po files
115      find /var/lib/pootle/tmp/sme$ver/ -name '*.po' -printf "sed -i 's@Id-Version:[^\\\\]*@Id-Version: SME Server $ver (%f)@' %p\n" | sh              [ "${pkg%%.po}" != "$pkg" ] && sed -i "/Id-Version:/{s@\(Version:\)[^\\]*@\1 SME $ver ($(basename $pkg))@;s@sme@Server @;s@contribs@Contribs @;}" $pkg
116      find /var/lib/pootle/tmp/contribs$ver/ -name '*.po' -printf "sed -i 's@Id-Version:[^\\\\]*@Id-Version: SME Contribs $ver (%f)@' %p\n" | sh  
117  done              # Move files that have changed
118                diffmv $pkg $(echo $pkg | sed 's@/tmp/@/po/@')
119  # Move files that have changed          done
120  for chk in $(find /var/lib/pootle/tmp/{sme,contribs}[0-9]/ -type f)      done
 do  
     diffmv $chk $(echo $chk | sed 's@/tmp/@/po/@')  
121  done  done
122    
123  # Copy po files so we can create error reports  # Copy po files so we can create error reports


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed