Changeset 846 for trunk/tools/linguist/shared/xliff.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/tools/linguist/shared/xliff.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 54 54 55 55 56 // The string value is historical and reflects the main purpose: Keeping 57 // obsolete entries separate from the magic file message (which both have 58 // no location information, but typically reside at opposite ends of the file). 59 #define MAGIC_OBSOLETE_REFERENCE "Obsolete_PO_entries" 60 56 61 QT_BEGIN_NAMESPACE 57 62 … … 504 509 m_sourceLanguage = atts.value(QLatin1String("source-language")); 505 510 m_sourceLanguage.replace(QLatin1Char('-'), QLatin1Char('_')); 511 if (m_sourceLanguage == QLatin1String("en")) 512 m_sourceLanguage.clear(); 506 513 } else if (localName == QLatin1String("group")) { 507 514 if (atts.value(QLatin1String("restype")) == QLatin1String(restypeContext)) { … … 691 698 return false; 692 699 } 700 if (m_type == TranslatorMessage::Obsolete && m_refs.size() == 1 701 && m_refs.at(0).fileName() == QLatin1String(MAGIC_OBSOLETE_REFERENCE)) 702 m_refs.clear(); 693 703 TranslatorMessage msg(m_context, m_sources[0], 694 704 m_comment, QString(), QString(), -1, … … 760 770 QList<QString> fileOrder; 761 771 foreach (const TranslatorMessage &msg, translator.messages()) { 762 QHash<QString, QList<TranslatorMessage> > &file = messageOrder[msg.fileName()]; 772 QString fn = msg.fileName(); 773 if (fn.isEmpty() && msg.type() == TranslatorMessage::Obsolete) 774 fn = QLatin1String(MAGIC_OBSOLETE_REFERENCE); 775 QHash<QString, QList<TranslatorMessage> > &file = messageOrder[fn]; 763 776 if (file.isEmpty()) 764 fileOrder.append( msg.fileName());777 fileOrder.append(fn); 765 778 QList<TranslatorMessage> &context = file[msg.context()]; 766 779 if (context.isEmpty()) 767 contextOrder[ msg.fileName()].append(msg.context());780 contextOrder[fn].append(msg.context()); 768 781 context.append(msg); 769 782 }
Note:
See TracChangeset
for help on using the changeset viewer.