+ -
当前位置:首页 → 问答吧 → 从Alfresco 3.4.c 中提取英文语言包

从Alfresco 3.4.c 中提取英文语言包

时间:2011-01-26

来源:互联网

在Ubuntu 10.10下运行,从已安装的Alfresco 3.4.c中提取英文语言包
  1. #!/bin/bash

  2. #defind the root of Alfresco
  3. root_dir=/opt/alfresco-3.4.c

  4. #defind the destination
  5. dest_dir=./alfresco
  6. #if dest_dir is existed, remove it and create a new one
  7. #Caution, every thing below the folder will be erased!!!
  8. if [ -e $dest_dir ]
  9. then
  10.         rm -r $dest_dir
  11. fi
  12. mkdir $dest_dir

  13. #find out all the Italian translation files, include "_it_IT" string
  14. for it_file in $(find $root_dir -name "*_it_IT*")
  15. do
  16.         it_dir=$(dirname $it_file)
  17.         it_dir=${it_dir//$root_dir/$dest_dir}
  18.         if ! [ -e $it_dir ]
  19.         then
  20.                 mkdir -p $it_dir
  21.         fi       

  22.         us_file=${it_file//_it_IT/}
  23.        
  24.         if ! [ -e $us_file ]
  25.         then
  26.                 us_file=${it_file//_it_IT/en_US}
  27.         fi

  28.         if ! [ -e $us_file ]
  29.         then       
  30.                 us_file=$it_file
  31.         fi       
  32.         cp $us_file $it_dir
  33.         let "i=$i+1"
  34. done
  35. tar -cf alfresco.tar $dest_dir
  36. echo $i
复制代码

作者: 堆码狂人   发布时间: 2011-01-26

老大,汉化成功了?

作者: 极北之北   发布时间: 2011-02-22

热门下载

更多