Bugzilla Simplified Noon Language Pack Generation

Source: Internet
Author: User

Environment for Cent OS 6+bugzilla4.4.6

Official only Traditional Chinese language pack, on the Internet to see a conversion with Perl, download down. Finally did a variety of problems, and eventually did not generate, so he wrote a bash script

You just need to modify RootDir to


#!/bin/bash

function Myls () {

dirs=$ (LS $2/$1)

For child in $dirs

Do

If test-d $2/$1/$child; then

Myls $child $2/$1

Else

Echo $2/$1/$child

Iconv-f utf8-t BIG5 $2/$1/$child > $2/$1/$child. Big5

Iconv-f big5-t GB2312 $2/$1/$child. Big5 > $2/$1/$child. GB

Iconv-f gb2312-t UTF8 $2/$1/$child. GB > $2/$1/$child. UTF

Rm-f $2/$1/$child

Rm-f $2/$1/$child. Big5

Rm-f $2/$1/$child. GB

MV $2/$1/$child. UTF $2/$1/$child

Fi

Done

}

Rootdir=/home/admin/test/bugzilla-tw/template

CD $rootdir

If test-d $rootdir/zh-cn;then

echo ZH-CN exist

Else

Cp-r ZH-TW ZH-CN

Fi

Myls ZH-CN $rootdir

Attachment is tar.bz2, because the upload can not support this format, so changed to Tar.bz2.rar,windows can be directly opened with WinRAR, Linux renamed to TAR.BZ2

This article is from the "All the Way North" blog, please be sure to keep this source http://janan.blog.51cto.com/7466674/1571699

Bugzilla Simplified Noon Language Pack Generation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.