@@ -66,22 +66,25 @@ def mergeProjects(projects, sourceLocaleName, focusedLocaleName=None, verbose=Fa
66
66
sourceStrings = project .condenseStringSourceFiles ()
67
67
sourceStrings .save ()
68
68
69
- # for localeName, localizedStrings in project.locales.iteritems():
70
- # if not focusedLocaleName or focusedLocaleName == localeName:
71
- # if localizedStrings.name in translations:
72
- # translation = translations[localizedStrings.name]
73
- # else:
74
- # translation = Translation(localizedStrings.name)
75
- # translation.open(".", "2")
76
- # translations[localizedStrings.name] = translation
77
- #
78
- # if translation.strings:
79
- # if verbose:
80
- # localizedStrings.mergeReport(sourceStrings, translation)
81
- #
82
- # localizedStrings.mergeTranslation(sourceStrings, translation)
83
- # if not dryRun:
84
- # localizedStrings.save()
69
+ for localeName , localizedStrings in project .locales .iteritems ():
70
+ if not focusedLocaleName or focusedLocaleName == localeName :
71
+ if localizedStrings .name in translations :
72
+ translation = translations [localizedStrings .name ]
73
+ else :
74
+ translation = Translation (localizedStrings .name )
75
+ translation .open ("." )
76
+ translations [localizedStrings .name ] = translation
77
+
78
+ if translation .strings :
79
+ if verbose :
80
+ localizedStrings .mergeReport (sourceStrings , translation )
81
+
82
+ localizedStrings .mergeTranslation (sourceStrings , translation )
83
+ if not dryRun :
84
+ localizedStrings .save ()
85
+ else :
86
+ if verbose :
87
+ print "no translation.strings for %s, sad" % localeName
85
88
86
89
###################################################################################################
87
90
0 commit comments