LP1922975 Build scripts python3 minor fixes
authorBill Erickson <berickxx@gmail.com>
Wed, 16 Mar 2022 19:52:34 +0000 (15:52 -0400)
committerBill Erickson <berickxx@gmail.com>
Wed, 16 Mar 2022 19:52:34 +0000 (15:52 -0400)
Signed-off-by: Bill Erickson <berickxx@gmail.com>

build/i18n/scripts/dojo_resource.py

index 75af700..d272db2 100755 (executable)
@@ -36,6 +36,7 @@ import sys
 import simplejson
 import os.path
 import os
+from builtins import str
 
 class DojoResource (basel10n.BaseL10N):
     """
@@ -65,14 +66,14 @@ class DojoResource (basel10n.BaseL10N):
             print("Reading Dojo resource file %s" % (source))
             raise
 
-        for key, value in bundle.iteritems():
+        for key, value in bundle.items():
             if value in msgids:
-                msgids[unicode(value)].occurrences.append((os.path.basename(source), str(key)))
+                msgids[str(value)].occurrences.append((os.path.basename(source), str(key)))
             else:
                 poe = polib.POEntry()
                 poe.occurrences = [(os.path.basename(source), str(key))]
-                poe.msgid = unicode(value)
-                msgids[unicode(value)] = poe
+                poe.msgid = str(value)
+                msgids[str(value)] = poe
 
         # Now add the POEntries to our POFile
         for poe in msgids.values():