diff --git a/diffstrings.py b/diffstrings.py index 9366699e51..c1478f24d4 100755 --- a/diffstrings.py +++ b/diffstrings.py @@ -64,23 +64,24 @@ def mergeProjects(projects, sourceLocaleName, focusedLocaleName=None, verbose=Fa for project in projects: sourceStrings = project.condenseStringSourceFiles() - - for localeName, localizedStrings in project.locales.iteritems(): - if not focusedLocaleName or focusedLocaleName == localeName: - if localizedStrings.name in translations: - translation = translations[localizedStrings.name] - else: - translation = Translation(localizedStrings.name) - translation.open(".", "2") - translations[localizedStrings.name] = translation + sourceStrings.save() - if translation.strings: - if verbose: - localizedStrings.mergeReport(sourceStrings, translation) - - localizedStrings.mergeTranslation(sourceStrings, translation) - if not dryRun: - localizedStrings.save() + # for localeName, localizedStrings in project.locales.iteritems(): + # if not focusedLocaleName or focusedLocaleName == localeName: + # if localizedStrings.name in translations: + # translation = translations[localizedStrings.name] + # else: + # translation = Translation(localizedStrings.name) + # translation.open(".", "2") + # translations[localizedStrings.name] = translation + # + # if translation.strings: + # if verbose: + # localizedStrings.mergeReport(sourceStrings, translation) + # + # localizedStrings.mergeTranslation(sourceStrings, translation) + # if not dryRun: + # localizedStrings.save() ################################################################################################### @@ -99,6 +100,10 @@ def condenseStringSourceFiles(self): """ Copies all strings from all sources files into a single file.""" sourceStrings = LocalizableStrings(self.sourceLocaleName) + sourceStrings.path = self.__findSourceStringsPath() + if not sourceStrings.path: + sourceStrings.path = os.path.join(self.sourceLocalePath, "Localizable.strings") + for sourceFile in self.stringSourceFiles: sourceStrings.update(sourceFile) return sourceStrings @@ -194,7 +199,13 @@ def __iterateSourceStrings(self): filePath = os.path.join(buildPath, fileName) strings.open(filePath) yield strings - + + def __findSourceStringsPath(self): + for name in os.listdir(self.sourceLocalePath): + m = reStringsFileName.match(name) + if m: + return os.path.join(self.sourceLocalePath, name) + def __findSourceStrings(self): for name in os.listdir(self.sourceLocalePath): m = reStringsFileName.match(name) diff --git a/src/TTPhotoView.m b/src/TTPhotoView.m index 6813449c20..c62ae9972f 100644 --- a/src/TTPhotoView.m +++ b/src/TTPhotoView.m @@ -123,7 +123,7 @@ - (void)layoutSubviews { UIDeviceOrientation orientation = TTDeviceOrientation(); CGFloat marginRight = 0, marginLeft = 0, marginBottom = 0; - if (UIInterfaceOrientationIsPortrait(orientation)) { + if (!UIInterfaceOrientationIsLandscape(orientation)) { marginBottom = TT_ROW_HEIGHT; } else if (orientation == UIDeviceOrientationLandscapeLeft) { marginLeft = TTBarsHeight(); diff --git a/src/TTTableViewController.m b/src/TTTableViewController.m index 119b95e75b..b745072dd9 100644 --- a/src/TTTableViewController.m +++ b/src/TTTableViewController.m @@ -224,7 +224,7 @@ - (void)restoreView:(NSDictionary*)state { - (void)keyboardDidAppear:(BOOL)animated withBounds:(CGRect)bounds { [super keyboardDidAppear:animated withBounds:bounds]; - self.tableView.frame = [self.tableView frameWithKeyboardSubtracted:0]; + self.tableView.frame = TTRectContract(self.tableView.frame, 0, bounds.size.height); [self.tableView scrollFirstResponderIntoView]; [self layoutOverlayView]; [self layoutBannerView]; diff --git a/src/Three20.bundle/de.lproj/Localizable.strings b/src/Three20.bundle/de.lproj/Localizable.strings index 35fe66aff4..2345142078 100644 Binary files a/src/Three20.bundle/de.lproj/Localizable.strings and b/src/Three20.bundle/de.lproj/Localizable.strings differ diff --git a/src/Three20.bundle/en.lproj/Localizable.strings b/src/Three20.bundle/en.lproj/Localizable.strings index c9123ba935..7e8e14ec5d 100644 Binary files a/src/Three20.bundle/en.lproj/Localizable.strings and b/src/Three20.bundle/en.lproj/Localizable.strings differ diff --git a/src/Three20.bundle/es.lproj/Localizable.strings b/src/Three20.bundle/es.lproj/Localizable.strings index 030572f770..c703fa3e25 100644 Binary files a/src/Three20.bundle/es.lproj/Localizable.strings and b/src/Three20.bundle/es.lproj/Localizable.strings differ diff --git a/src/Three20.bundle/fr.lproj/Localizable.strings b/src/Three20.bundle/fr.lproj/Localizable.strings index 0d5804f1a6..6744626627 100644 Binary files a/src/Three20.bundle/fr.lproj/Localizable.strings and b/src/Three20.bundle/fr.lproj/Localizable.strings differ diff --git a/src/Three20.bundle/it.lproj/Localizable.strings b/src/Three20.bundle/it.lproj/Localizable.strings index 5820a15022..b894bb0fd3 100644 Binary files a/src/Three20.bundle/it.lproj/Localizable.strings and b/src/Three20.bundle/it.lproj/Localizable.strings differ diff --git a/src/Three20.bundle/ja.lproj/Localizable.strings b/src/Three20.bundle/ja.lproj/Localizable.strings index 48de826795..efffe10297 100644 Binary files a/src/Three20.bundle/ja.lproj/Localizable.strings and b/src/Three20.bundle/ja.lproj/Localizable.strings differ