root/modules/branches/2.4/mk_i18n_structure

Revision 5781, 0.7 kB (checked in by p_lindheimer, 4 years ago)

add mk_i18n_strucutre utility to help add translation files

  • Property svn:executable set to *
Line 
1 #!/bin/bash
2 #
3 # Helper utility to create directory structure add a bunch of translation files for the modules
4 #
5 # usage looks like:
6 #
7 # ./mk_i18n_structure ru_RU /tmp/Russian
8 #
9 # where ru_RU would be the language, and /tmp/Russian whould be where all the files
10 # have been placed
11
12 for i in *; do
13   echo $i:
14   if [ -d $i ] && [ -a ${2}/${i}.mo ] && [ -a ${2}/${i}.po ]; then
15     if [ ! -d ${i}/i18n ]; then
16       svn mkdir ${i}/i18n
17     fi
18     if [ ! -d ${i}/i18n/$1 ]; then
19       svn mkdir ${i}/i18n/$1
20       svn mkdir ${i}/i18n/$1/LC_MESSAGES
21     fi
22     cp $2/$i.mo $i/i18n/$1/LC_MESSAGES/
23     cp $2/$i.po $i/i18n/$1/LC_MESSAGES/
24     svn add $i/i18n/$1/LC_MESSAGES/$i.mo
25     svn add $i/i18n/$1/LC_MESSAGES/$i.po
26   fi
27 done
Note: See TracBrowser for help on using the browser.