From adf957b6324ba06ddeb6c4044ea1f2ce6d93bda9 Mon Sep 17 00:00:00 2001 From: Joe Hewitt Date: Sat, 15 Aug 2009 16:37:47 -0700 Subject: [PATCH] * More localized strings * Fixed: photo captions are incorrectly sized when orientation is flat --- diffstrings.py | 45 +++++++++++------- src/TTPhotoView.m | 2 +- src/TTTableViewController.m | 2 +- .../de.lproj/Localizable.strings | Bin 1725 -> 3432 bytes .../en.lproj/Localizable.strings | Bin 6760 -> 3968 bytes .../es.lproj/Localizable.strings | Bin 3324 -> 3326 bytes .../fr.lproj/Localizable.strings | Bin 4096 -> 4096 bytes .../it.lproj/Localizable.strings | Bin 3306 -> 3336 bytes .../ja.lproj/Localizable.strings | Bin 2744 -> 2750 bytes 9 files changed, 30 insertions(+), 19 deletions(-) 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 35fe66aff43b70f6f6d029dcc26f5e1501d342de..234514207808875de46f3565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`_L0;h@yVv$cX7XgRlaX_PN=02FW%scjl~Qd`@yOBK(vf$V`>%69#w6<5{rv jBbX1UvDo@a@iyVy6noBXqM0^fMxR+SVaWO diff --git a/src/Three20.bundle/en.lproj/Localizable.strings b/src/Three20.bundle/en.lproj/Localizable.strings index c9123ba93555bee04147b8544410bfb1b6ab8488..7e8e14ec5d92483cbf4665f04ce9ca8c52a5ae08 100644 GIT binary patch delta 345 zcmaE1(jd?D|KH>?afQh(ToIE+n1Uw9aY#)z;qjPk!Z>O28cvPLH-xmnVxKsKDf-!4`;>p!`Z8%bI~}@dsK9e5^C``U3U<5Q;ZSozCrpaEyHj{1mWF{L(Sxo-NtTFixpTXp7d^VG> z2v=4I);q(BS z8Z^0tWfqWDn9RZvGI<@Z8`u+ayj=WR4EhXQKnMFm;ABT$VOEIqS2M*=e#WmfnMZKi zWG(JAs1CNtb9gc)D+%R6`A(DHu+^ G=>Y)fC22+g literal 6760 zcmcgw+invv5S{0K#i{}cDnu_5st7`W+B^VFi`4d^kDE)c+oVc1ME!ZnId)u+x9gCI zb+p<|JY#!ijy)Iq>Cd)oNhZfK!ncR-J)VIKr9}Hd#-RL`8|j1A2c;{I_>zAG>Ja}1 z=<^=5E!mb0*_79&-!;Zf!I^-QqwffuOg`gX)Z-Io*uXp~G`ctXPGQ$zfmX3zTC)RV z+1Q|9QKE$d*hWN%8m%w!5-%b+gGAz#$s5_lcO;ki?#hn5#czn5W?wtLZhQ&fF10NRF>#tXCS%av;i`Mci||dc9umwB>rQLsRYx=M(?Zv%YT{Ex$=& zc4nz|o2I3bO7F=KOSqO9b{AuXrp&OqHU?Qg>X~*AeG2&!=o*e&eWvwVxQy=XlSZop zg`$rxAvKj`#u4U=9(?!4M3qe1Sart7v0Bjs!&}sIof@7&SLQ?Jz7rF7G;Vb^)s0A_ z@u5L#ps@24E%6Ym&a9Uq>k#XE({7>NF*7g|wUCQGfbsyY&q!^oP#f)Q@L3lya(Vmf zxvNO-V?NdsE(6*b+b?90viiL5F!K+rSz%=C$-a=X2TOP4V~tdDkLFK?6=(Zm{#31Q z8*aR}*0#C4T<0&ErlrPLJ+|8Qs~l3bgy!tJ#VSoyPG=SBYS3!+xJ=(PS{}h$auW&Y zH#YD5dam^*sDko!+!v@uLnXeY}r&JPILoISJNl z>8tzj!PtK7AbxegXKW64sXJ-Jd#s`dBb3#|#VI?lm8~uH^1^u4oTnVaFJ{oEgWm}r zd-Cu)#Q56YCbiM$I?kKUZl0#To0^a(Db@!(1JqRu8jV#(rNbx_9Ve>#g}gLcoXAh* zleU#g(p?~ltyGd8OqOux?o)WfCEhV=HjnWMY8vK}`d(TyR&J#^54lQ-=l2{H>m5dS zP4&mq2B0T7I?WKRZAv^ zwPOxs3jAuzh{6=Px(nNLpjQ|KoPBO2&yz((7H4#HEv;EQd2-4Xx$eKrXYs*dBmlOD@^rv$jTOglNR`cPgppCM$Fi`{@lf zFBY)Vo}uU|v9;E#_4gKgP*soHCpLF`i>&_F(YXe3m(wl@rKduwuw%$esL9dm(1iK&O@6m NxSAkpc5^#20sxgp6FdL_ delta 59 zcmew-`A2fYKgP*_n8h|5FzsMu%-;N(Ihd6@o56}97YG#?5+{FVRG(bNd1!JFr^;pv Mt|pM0z1)tB0E*xf#{d8T diff --git a/src/Three20.bundle/fr.lproj/Localizable.strings b/src/Three20.bundle/fr.lproj/Localizable.strings index 0d5804f1a6c885130b48505f01dad496b23448f2..67446266275ff7dfe70578392cca8b1590b25fb1 100644 GIT binary patch delta 67 zcmV-J0KETzAb=pSP6Ct03LcZF1QwIZ1T?dl0uTa|=m#{j90kk*lc)rAvm6Mh0+U`2 Z29w?m8k67!43qi`E|cU6>a!*c+5;@|7^?sP delta 59 zcmV-B0L1@*Ab=pSP6D%R0$Ku-YyuXO+y`E>`UK1Zlg0!zvpNW<0+UPvAd@@`>XXdL=obiPe`upCM&qyENnGeT)`NlY7|8Hp{RSFirl(tTvg6eFtYgLlHwBLn1@& m=Ev;4jNBOvRt&j7sKAgoc{-!|9{jU}^HK+Hiw30~doj hgJ^@v29rN98EsBseZe@nj6-E}7CR5)=2;waOaS{78BPEI delta 74 zcmV-Q0JZ+fW14+TFhVejFn%ywFq4yK g0U?tz14^@q1?T~jQ~@5dlm`p}lW+$lv!Dnb0s$2nYybcN