亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? translate.java

?? java servlet著名論壇源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號(hào):
/*
 * $Header: /cvsroot/mvnforum/mvnforum/i18n/tool/Translate.java,v 1.3 2004/04/30 03:39:14 drjavanomous Exp $
 * $Revision: 1.3 $
 * $Date: 2004/04/30 03:39:14 $
 *
 * ====================================================================
 *
 * Copyright (C) 2002, 2003 by MyVietnam.net
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or any later version.
 *
 * All copyright notices regarding MyVietnam and MyVietnam CoreLib
 * MUST remain intact in the scripts and source code.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * Correspondence and Marketing Questions can be sent to:
 * info@MyVietnam.net
 *
 * @author: Minh Nguyen  minhnn@MyVietnam.net
 * @author: Mai  Nguyen  mai.nh@MyVietnam.net
 */
/*
 * The Apache Software License, Version 1.1
 *
 * Copyright (c) 2001-2002 The Apache Software Foundation.  All rights
 * reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. The end-user documentation included with the redistribution, if
 *    any, must include the following acknowlegement:
 *       "This product includes software developed by the
 *        Apache Software Foundation (http://www.apache.org/)."
 *    Alternately, this acknowlegement may appear in the software itself,
 *    if and wherever such third-party acknowlegements normally appear.
 *
 * 4. The names "The Jakarta Project", "Ant", and "Apache Software
 *    Foundation" must not be used to endorse or promote products derived
 *    from this software without prior written permission. For written
 *    permission, please contact apache@apache.org.
 *
 * 5. Products derived from this software may not be called "Apache"
 *    nor may "Apache" appear in their names without prior written
 *    permission of the Apache Group.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 * ====================================================================
 *
 * This software consists of voluntary contributions made by many
 * individuals on behalf of the Apache Software Foundation.  For more
 * information on the Apache Software Foundation, please see
 * <http://www.apache.org/>.
 */
//package org.apache.tools.ant.taskdefs.optional.i18n;

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.FileOutputStream;
import java.io.BufferedWriter;
import java.io.OutputStreamWriter;
import java.util.Vector;
import java.util.Hashtable;
import java.util.Locale;
import org.apache.tools.ant.BuildException;
import org.apache.tools.ant.Project;
import org.apache.tools.ant.DirectoryScanner;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.util.FileUtils;
import org.apache.tools.ant.taskdefs.MatchingTask;

/**
 * Translates text embedded in files using Resource Bundle files.
 *
 * @author Magesh Umasankar
 */
public class Translate extends MatchingTask {

    /**
     * Family name of resource bundle
     */
    private String bundle;
    /**
     * Locale specific language of the resource bundle
     */
    private String bundleLanguage;
    /**
     * Locale specific country of the resource bundle
     */
    private String bundleCountry;
    /**
     * Locale specific variant of the resource bundle
     */
    private String bundleVariant;
    /**
     * Destination directory
     */
    private File toDir;
    /**
     * Source file encoding scheme
     */
    private String srcEncoding;
    /**
     * Destination file encoding scheme
     */
    private String destEncoding;
    /**
     * Resource Bundle file encoding scheme, defaults to srcEncoding
     */
    private String bundleEncoding;
    /**
     * Starting token to identify keys
     */
    private String startToken;
    /**
     * Ending token to identify keys
     */
    private String endToken;
    /**
     * Whether or not to create a new destination file.
     * Defaults to <code>false</code>.
     */
    private boolean forceOverwrite;
    /**
     * Vector to hold source file sets.
     */
    private Vector filesets = new Vector();
    /**
     * Holds key value pairs loaded from resource bundle file
     */
    private Hashtable resourceMap = new Hashtable();
    /**
     * Generated locale based on user attributes
     */
    private Locale locale;
    /**
     * Used to resolve file names.
     */
    private FileUtils fileUtils = FileUtils.newFileUtils();
    /**
     * Last Modified Timestamp of resource bundle file being used.
     */
    private long[] bundleLastModified = new long[7];
    /**
     * Last Modified Timestamp of source file being used.
     */
    private long srcLastModified;
    /**
     * Last Modified Timestamp of destination file being used.
     */
    private long destLastModified;
    /**
     * Has at least one file from the bundle been loaded?
     */
    private boolean loaded = false;

    /**
     * Sets Family name of resource bundle; required.
     */
    public void setBundle(String bundle) {
        this.bundle = bundle;
    }

    /**
     * Sets locale specific language of resource bundle; optional.
     */
    public void setBundleLanguage(String bundleLanguage) {
        this.bundleLanguage = bundleLanguage;
    }

    /**
     * Sets locale specific country of resource bundle; optional.
     */
    public void setBundleCountry(String bundleCountry) {
        this.bundleCountry = bundleCountry;
    }

    /**
     * Sets locale specific variant of resource bundle; optional.
     */
    public void setBundleVariant(String bundleVariant) {
        this.bundleVariant = bundleVariant;
    }

    /**
     * Sets Destination directory; required.
     */
    public void setToDir(File toDir) {
        this.toDir = toDir;
    }

    /**
     * Sets starting token to identify keys; required.
     */
    public void setStartToken(String startToken) {
        this.startToken = startToken;
    }

    /**
     * Sets ending token to identify keys; required.
     */
    public void setEndToken(String endToken) {
        this.endToken = endToken;
    }

    /**
     * Sets source file encoding scheme; optional,
     * defaults to encoding of local system.
     */
    public void setSrcEncoding(String srcEncoding) {
        this.srcEncoding = srcEncoding;
    }

    /**
     * Sets destination file encoding scheme; optional.  Defaults to source file
     * encoding
     */
    public void setDestEncoding(String destEncoding) {
        this.destEncoding = destEncoding;
    }

    /**
     * Sets Resource Bundle file encoding scheme; optional.  Defaults to source file
     * encoding
     */
    public void setBundleEncoding(String bundleEncoding) {
        this.bundleEncoding = bundleEncoding;
    }

    /**
     * Whether or not to overwrite existing file irrespective of
     * whether it is newer than the source file as well as the
     * resource bundle file.
     * Defaults to false.
     */
    public void setForceOverwrite(boolean forceOverwrite) {
        this.forceOverwrite = forceOverwrite;
    }

    /**
     * Adds a set of files to translate as a nested fileset element.
     */
    public void addFileset(FileSet set) {
        filesets.addElement(set);
    }

    /**
     * Check attributes values, load resource map and translate
     */
    public void execute() throws BuildException {
        if (bundle == null) {
            throw new BuildException("The bundle attribute must be set.",
									getLocation());
                                     
        }

        if (startToken == null) {
            throw new BuildException("The starttoken attribute must be set.",
									getLocation());
        }

        if (startToken.length() != 1) {
            throw new BuildException(
                "The starttoken attribute must be a single character.",
                                    getLocation());
        }
        			
        if (endToken == null) {
            throw new BuildException("The endtoken attribute must be set.",
                                     getLocation());
        }

        if (endToken.length() != 1) {
            throw new BuildException(
                "The endtoken attribute must be a single character.",
                                         getLocation());
        }

        if (bundleLanguage == null) {
            Locale l = Locale.getDefault();
            bundleLanguage  = l.getLanguage();
        }

        if (bundleCountry == null) {
            bundleCountry = Locale.getDefault().getCountry();
        }

        locale = new Locale(bundleLanguage, bundleCountry);

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲国产欧美在线人成| 天堂一区二区在线| 欧美剧情片在线观看| 久久99久久久久久久久久久| 国产精品不卡在线| 欧美大片在线观看| 在线国产电影不卡| 国产99精品国产| 美女视频免费一区| 亚洲国产美女搞黄色| 亚洲国产精品99久久久久久久久| 在线电影院国产精品| 色综合久久久网| 国产成人福利片| 久久精品久久99精品久久| 亚洲国产视频直播| 亚洲视频中文字幕| 中文字幕的久久| 久久久一区二区| 日韩欧美亚洲一区二区| 欧美色电影在线| 92国产精品观看| 99久久伊人精品| 国产iv一区二区三区| 国产裸体歌舞团一区二区| 日韩高清不卡一区| 午夜天堂影视香蕉久久| 亚洲va韩国va欧美va精品| 亚洲精品视频在线观看免费 | 色综合天天综合在线视频| 国产精品一区二区在线观看不卡 | 成人网在线免费视频| 国产一区二区三区在线观看精品 | 久久女同性恋中文字幕| 欧美一区二区在线视频| 欧美精品三级在线观看| 欧美美女网站色| 欧美午夜免费电影| 欧美二区在线观看| 在线不卡一区二区| 911精品产国品一二三产区| 欧美三片在线视频观看| 欧美色精品在线视频| 欧美顶级少妇做爰| 欧美一区二区啪啪| 精品捆绑美女sm三区| 久久亚洲捆绑美女| 国产欧美一区二区精品秋霞影院 | 一区二区三区四区在线免费观看| 亚洲色大成网站www久久九九| 亚洲蜜臀av乱码久久精品| 一卡二卡欧美日韩| 视频一区视频二区中文字幕| 日本在线不卡一区| 国产精品亚洲一区二区三区妖精| 国产成人在线观看| 91亚洲国产成人精品一区二区三| 在线视频国产一区| 日韩一区二区视频在线观看| 精品国产成人在线影院| 亚洲国产精品激情在线观看| 中文字幕一区二区三区蜜月| 亚洲愉拍自拍另类高清精品| 日韩国产高清影视| 国产伦精一区二区三区| 波多野洁衣一区| 欧美日韩精品一区二区三区蜜桃 | 精品电影一区二区| 国产精品三级久久久久三级| 亚洲欧美一区二区久久| 午夜精品久久久久久久99樱桃| 日韩vs国产vs欧美| 国产精品亚洲人在线观看| 一本大道久久a久久综合| 911精品产国品一二三产区| 国产日韩欧美高清| 一区二区三区日本| 国产美女精品人人做人人爽| 99re热视频这里只精品| 日韩午夜精品电影| 国产精品大尺度| 丝袜美腿亚洲色图| 99久久精品免费看| 日韩欧美色综合网站| 国产精品理论在线观看| 青青草97国产精品免费观看 | 日韩一区二区免费高清| 国产精品国产成人国产三级| 日日欢夜夜爽一区| 本田岬高潮一区二区三区| 欧美理论电影在线| 最新成人av在线| 久久成人免费日本黄色| 91成人在线免费观看| 国产欧美精品区一区二区三区| 亚洲第一成年网| 成人av在线影院| 精品日韩欧美一区二区| 亚洲福利视频一区| 91视频国产资源| 亚洲国产高清aⅴ视频| 麻豆成人久久精品二区三区红| 91女神在线视频| 国产日韩欧美综合在线| 免费三级欧美电影| 欧美日韩aaaaaa| 亚洲精品国久久99热| 高清视频一区二区| 精品国产3级a| 美女视频黄久久| 在线不卡免费欧美| 亚洲国产精品一区二区www在线 | 国产超碰在线一区| 欧美mv和日韩mv国产网站| 天堂影院一区二区| 欧美日韩亚州综合| 一区二区在线看| 99久久99精品久久久久久| 国产欧美日韩不卡免费| 久久成人精品无人区| 56国语精品自产拍在线观看| 亚洲国产综合色| 色噜噜久久综合| 亚洲精品国产a| 色综合久久久久综合体| 亚洲蜜臀av乱码久久精品| 99久久综合色| 亚洲精品欧美综合四区| 99久久综合国产精品| 成人免费一区二区三区视频| 成人精品视频.| 国产精品理论片在线观看| 国产成人综合在线| 国产精品午夜春色av| 国产69精品久久久久777| 2021中文字幕一区亚洲| 国产在线播精品第三| 欧美精品一区二区精品网| 蜜臀久久久99精品久久久久久| 91精品免费观看| 美女网站色91| 久久久不卡网国产精品一区| 国产精品123| 国产精品热久久久久夜色精品三区| 懂色av一区二区三区免费观看| 国产午夜精品一区二区| av男人天堂一区| 一区二区三区四区乱视频| 欧美日韩精品系列| 蜜臀av性久久久久蜜臀aⅴ| 久久你懂得1024| av在线不卡免费看| 一级日本不卡的影视| 91精品国产一区二区三区| 久久99日本精品| 亚洲色图一区二区| 欧美日韩国产在线播放网站| 美女国产一区二区三区| 国产三级久久久| 欧美综合一区二区| 麻豆精品一二三| 国产偷国产偷精品高清尤物| 91蜜桃在线免费视频| 亚洲国产aⅴ天堂久久| 欧美一级片在线看| 粉嫩aⅴ一区二区三区四区五区| 一区二区三区在线视频观看58 | 欧美精品一卡二卡| 国产美女精品在线| 一区二区三区日本| 久久色在线视频| 欧美性一二三区| 国产在线精品免费av| 亚洲男同1069视频| 精品剧情在线观看| 91黄色在线观看| 久久国产麻豆精品| 一区二区三区不卡在线观看| 日韩欧美黄色影院| 色综合久久66| 黑人巨大精品欧美黑白配亚洲| 亚洲免费观看高清| 国产亚洲女人久久久久毛片| 欧美日韩国产高清一区二区三区| 国产成人av一区二区| 丝袜美腿亚洲综合| 亚洲免费三区一区二区| 精品国产精品一区二区夜夜嗨| 欧美在线free| 成人午夜激情片| 韩国午夜理伦三级不卡影院| 亚洲图片自拍偷拍| 亚洲日本一区二区三区| 337p粉嫩大胆色噜噜噜噜亚洲| 欧美日韩精品一区二区天天拍小说 | 香蕉加勒比综合久久| 国产精品久久久久久妇女6080| 欧美大片免费久久精品三p| 欧美三区在线视频| 一本一道综合狠狠老|