Ignore:
Timestamp:
Feb 11, 2010, 11:19:06 PM (15 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.6.1 sources.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/tools/linguist/shared/xliff.cpp

    r2 r561  
    22**
    33** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
    4 ** Contact: Qt Software Information ([email protected])
     4** All rights reserved.
     5** Contact: Nokia Corporation ([email protected])
    56**
    67** This file is part of the Qt Linguist of the Qt Toolkit.
     
    2122** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
    2223**
    23 ** In addition, as a special exception, Nokia gives you certain
    24 ** additional rights. These rights are described in the Nokia Qt LGPL
    25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
    26 ** package.
     24** In addition, as a special exception, Nokia gives you certain additional
     25** rights.  These rights are described in the Nokia Qt LGPL Exception
     26** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
    2727**
    2828** GNU General Public License Usage
     
    3434** met: http://www.gnu.org/copyleft/gpl.html.
    3535**
    36 ** If you are unsure which license is appropriate for your use, please
    37 ** contact the sales department at qt-sales@nokia.com.
     36** If you
     37** @nokia.com.
    3838** $QT_END_LICENSE$
    3939**
     
    244244}
    245245
    246 static void writeTransUnits(QTextStream &ts, const TranslatorMessage &msg, const QRegExp &drops, int indent,
    247                             const Translator &translator, ConversionData &cd, bool *ok)
     246static void writeTransUnits(QTextStream &ts, const TranslatorMessage &msg, const QRegExp &drops, int indent)
    248247{
    249248    static int msgid;
    250249    QString msgidstr = !msg.id().isEmpty() ? msg.id() : QString::fromAscii("_msg%1").arg(++msgid);
    251250
    252     QStringList translns = translator.normalizedTranslations(msg, cd, ok);
     251    QStringList translns = );
    253252    QHash<QString, QString>::const_iterator it;
    254253    QString pluralStr;
     
    304303        if (transit != transend) {
    305304            translation = *transit;
     305
     306
    306307            ++transit;
    307308            puttrans = true;
     
    348349}
    349350
    350 static void writeMessage(QTextStream &ts, const TranslatorMessage &msg, const QRegExp &drops, int indent,
    351                          const Translator &translator, ConversionData &cd, bool *ok)
     351static void writeMessage(QTextStream &ts, const TranslatorMessage &msg, const QRegExp &drops, int indent)
    352352{
    353353    if (msg.isPlural()) {
     
    363363        writeComment(ts, msg, drops, indent);
    364364
    365         writeTransUnits(ts, msg, drops, indent, translator, cd, ok);
     365        writeTransUnits(ts, msg, drops, indent);
    366366        --indent;
    367367        writeIndent(ts, indent);
    368368        ts << "</group>\n";
    369369    } else {
    370         writeTransUnits(ts, msg, drops, indent, translator, cd, ok);
     370        writeTransUnits(ts, msg, drops, indent);
    371371    }
    372372}
     
    501501        m_fileName = atts.value(QLatin1String("original"));
    502502        m_language = atts.value(QLatin1String("target-language"));
     503
    503504        m_sourceLanguage = atts.value(QLatin1String("source-language"));
     505
    504506    } else if (localName == QLatin1String("group")) {
    505507        if (atts.value(QLatin1String("restype")) == QLatin1String(restypeContext)) {
     
    599601        }
    600602    } else if (localName == QLatin1String("target")) {
    601         if (popContext(XC_restype_translation))
     603        if (popContext(XC_restype_translation)) {
     604            accum.replace(QChar(Translator::TextVariantSeparator),
     605                          QChar(Translator::BinaryVariantSeparator));
    602606            m_translations.append(accum);
     607
    603608    } else if (localName == QLatin1String("context-group")) {
    604609        if (popContext(XC_context_group)) {
     
    771776    ++indent;
    772777    writeExtras(ts, indent, translator.extras(), drops);
     778
     779
     780
     781
     782
     783
     784
    773785    foreach (const QString &fn, fileOrder) {
    774786        writeIndent(ts, indent);
    775787        ts << "<file original=\"" << fn << "\""
    776788            << " datatype=\"" << dataType(messageOrder[fn].begin()->first()) << "\""
    777             << " source-language=\""
    778                 << (translator.sourceLanguageCode().isEmpty() ?
    779                     QByteArray("en") : translator.sourceLanguageCode().toLatin1()) << "\""
    780             << " target-language=\"" << translator.languageCode() << "\""
     789            << " source-language=\"" << sourceLanguageCode.toLatin1() << "\""
     790            << " target-language=\"" << languageCode.toLatin1() << "\""
    781791            << "><body>\n";
    782792        ++indent;
     
    791801
    792802            foreach (const TranslatorMessage &msg, messageOrder[fn][ctx])
    793                 writeMessage(ts, msg, drops, indent, translator, cd, &ok);
     803                writeMessage(ts, msg, drops, indent);
    794804
    795805            if (!ctx.isEmpty()) {
Note: See TracChangeset for help on using the changeset viewer.