i18n/mki18n.py
branchpython3
changeset 3750 f62625418bff
parent 2452 2f2b2152580f
child 3752 9f6f46dbe3ae
--- a/i18n/mki18n.py	Mon Mar 27 10:19:14 2023 +0200
+++ b/i18n/mki18n.py	Fri Oct 28 12:39:15 2022 +0800
@@ -79,8 +79,8 @@
 # -------------
 #
 
-from __future__ import absolute_import
-from __future__ import print_function
+
+
 import os
 import sys
 import re
@@ -229,7 +229,7 @@
 
     languageDict = getSupportedLanguageDict(applicationName)
 
-    for langCode in languageDict.keys():
+    for langCode in list(languageDict.keys()):
         if langCode == 'en':
             pass
         else:
@@ -254,7 +254,7 @@
 
     languageDict = getSupportedLanguageDict(applicationName)
 
-    for langCode in languageDict.keys():
+    for langCode in list(languageDict.keys()):
         if langCode == 'en':
             pass
         else:
@@ -308,7 +308,7 @@
 
     languageDict = getSupportedLanguageDict(applicationName)
 
-    for langCode in languageDict.keys():
+    for langCode in list(languageDict.keys()):
         if (langCode == 'en') and (forceEnglish == 0):
             pass
         else:
@@ -414,7 +414,7 @@
     # translate the path separators
     directory = unixpath(directory)
     # build a list of all directory elements
-    aList = filter(lambda x: len(x) > 0, directory.split('/'))
+    aList = [x for x in directory.split('/') if len(x) > 0]
     theLen = len(aList)
     # if the first element is a Windows-style disk drive
     # concatenate it with the first directory