Commits

timeless committed dcbe949

Qt needs to be spelled with a lowercase t unless talking about QuickTime

  • Participants
  • Parent commits e626e4d

Comments (0)

Files changed (6)

transifex/resources/formats/core.py

 
 class GenericTranslation:
     """
-    Store translations of any kind of I18N type (POT, QT, etc...).
+    Store translations of any kind of I18N type (POT, Qt, etc...).
 
     Parameters:
         source_entity - The original entity found in the source code.

transifex/resources/formats/qt.py

     @need_file
     def parse_file(self, is_source=False, lang_rules=None):
         """
-        Parses QT file and exports all entries as GenericTranslations.
+        Parses Qt file and exports all entries as GenericTranslations.
         """
         fh = open(self.filename, "ru")
         buf = fh.read()

transifex/resources/migrations/0008_escape_ts_special_chars.py

 
     def forwards(self, orm):
         "Unescape all strings that are from Qt files"
-        for r in orm['resources.Resource'].objects.filter(i18n_type=u'QT'):
+        for r in orm['resources.Resource'].objects.filter(i18n_type=u'Qt'):
             template = orm['resources.Template'].objects.get(resource=r)
             for s in orm['resources.SourceEntity'].objects.filter(resource=r):
                 old_hash = s.string_hash
 
     def backwards(self, orm):
         "Escape all strings that belong to Qt files."
-        for r in orm['resources.Resource'].objects.filter(i18n_type=u'QT'):
+        for r in orm['resources.Resource'].objects.filter(i18n_type=u'Qt'):
             template = orm['resources.Template'].objects.get(resource=r)
             for s in orm['resources.SourceEntity'].objects.filter(resource=r):
                 old_hash = s.string_hash

transifex/resources/tests/lib/qt/__init__.py

 from transifex.resources.formats.qt import LinguistHandler
 from transifex.addons.suggestions.models import Suggestion
 
-class QTFile(BaseTestCase):
+class QtFile(BaseTestCase):
     """Suite of tests for the qt lib."""
     def test_qt_parser(self):
         """TS file tests."""
             if s.rule == 5:
                 entities += 1
 
-        # Asserting number of entities - QT file has 43 entries +1 plural.
+        # Asserting number of entities - Qt file has 43 entries +1 plural.
         self.assertEqual(entities, 44)
 
     def test_qt_parser_fi(self):
-        """Tests for fi QT file."""
+        """Tests for fi Qt file."""
         handler = LinguistHandler('%s/fi.ts' %
             os.path.split(__file__)[0])
 
         # '%n FILES PROCESSED.' entity - fi has nplurals=2
         self.assertEqual(nplurals, 2)
 
-        # Asserting number of entities - QT file has 43 entries.
+        # Asserting number of entities - Qt file has 43 entries.
         self.assertEqual(entities, 44)
 
     def test_qt_save2db(self):
-        """Test creating source strings from a QT file works"""
+        """Test creating source strings from a Qt file works"""
         handler = LinguistHandler('%s/en.ts' %
             os.path.split(__file__)[0])
 

transifex/settings/70-translation.conf

                     'mimetype': 'text/x-po',
                     'file-extensions': '.po, .pot'
                 },
-                'QT': {
-                    'description': 'QT Files',
+                'Qt': {
+                    'description': 'Qt Files',
                     'mimetype': 'application/xml',
                     'file-extensions': '.ts'
                 },
 
 I18N_HANDLER_CLASS_BASE = 'resources.formats'
 I18N_HANDLER_CLASS_NAMES = { 'PO': 'pofile.POHandler',
-                             'QT': 'qt.LinguistHandler',
+                             'Qt': 'qt.LinguistHandler',
                              'INI': 'joomla.JoomlaINIHandler'}

transifex/txcommon/fixtures/sample_resources.json

   {
     "fields": {
       "created": "2010-09-01 11:11:21",
-      "i18n_type": "QT",
+      "i18n_type": "Qt",
       "last_update": "2010-09-01 12:18:54",
       "name": "test-qt",
       "project": 1,