Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

remove all sources and update README

  • Loading branch information...
commit ed72c5661935805503b72ac5352523d4e7617462 1 parent cc67213
@diederich diederich authored
Showing with 14 additions and 21,417 deletions.
  1. +14 −171 README.mdown
  2. +0 −183 Three20.xcworkspace/contents.xcworkspacedata
  3. +0 −189 Three20.xcworkspace/xcshareddata/xcschemes/Samples.xcscheme
  4. +0 −285 Three20.xcworkspace/xcshareddata/xcschemes/UnitTests.xcscheme
  5. +0 −17 config.template
  6. +0 −656 diffstrings.py
  7. 0  extensions/ignoreme
  8. +0 −3  project.dev
  9. +0 −28 samples/Core/TTCoreDemo/Classes/AppDelegate.h
  10. +0 −50 samples/Core/TTCoreDemo/Classes/AppDelegate.m
  11. +0 −22 samples/Core/TTCoreDemo/Classes/PlaygroundViewController.h
  12. +0 −200 samples/Core/TTCoreDemo/Classes/PlaygroundViewController.m
  13. +0 −23 samples/Core/TTCoreDemo/Configurations/App.xcconfig
  14. +0 −18 samples/Core/TTCoreDemo/Configurations/Project.xcconfig
  15. +0 −17 samples/Core/TTCoreDemo/Configurations/RelPath.xcconfig
  16. +0 −22 samples/Core/TTCoreDemo/Configurations/UnitTests.xcconfig
  17. +0 −9 samples/Core/TTCoreDemo/Headers/TTCoreDemo_Prefix.pch
  18. +0 −43 samples/Core/TTCoreDemo/README.mdown
  19. +0 −28 samples/Core/TTCoreDemo/TTCoreDemo-Info.plist
  20. +0 −365 samples/Core/TTCoreDemo/TTCoreDemo.xcodeproj/project.pbxproj
  21. +0 −22 samples/Core/TTCoreDemo/main.m
  22. +0 −28 samples/Network/TTNetworkDemo/Classes/AppDelegate.h
  23. +0 −49 samples/Network/TTNetworkDemo/Classes/AppDelegate.m
  24. +0 −25 samples/Network/TTNetworkDemo/Classes/PlaygroundViewController.h
  25. +0 −166 samples/Network/TTNetworkDemo/Classes/PlaygroundViewController.m
  26. +0 −23 samples/Network/TTNetworkDemo/Configurations/App.xcconfig
  27. +0 −20 samples/Network/TTNetworkDemo/Configurations/Project.xcconfig
  28. +0 −17 samples/Network/TTNetworkDemo/Configurations/RelPath.xcconfig
  29. +0 −22 samples/Network/TTNetworkDemo/Configurations/UnitTests.xcconfig
  30. +0 −9 samples/Network/TTNetworkDemo/Headers/TTNetworkDemo_Prefix.pch
  31. +0 −15 samples/Network/TTNetworkDemo/README.mdown
  32. +0 −28 samples/Network/TTNetworkDemo/TTNetworkDemo-Info.plist
  33. +0 −420 samples/Network/TTNetworkDemo/TTNetworkDemo.xcodeproj/project.pbxproj
  34. +0 −22 samples/Network/TTNetworkDemo/main.m
  35. BIN  samples/Resources/Default-Landscape.png
  36. BIN  samples/Resources/Default-Landscape.psd
  37. BIN  samples/Resources/Default-Portrait.png
  38. BIN  samples/Resources/Default-Portrait.psd
  39. BIN  samples/Resources/Default.png
  40. BIN  samples/Resources/Default.psd
  41. BIN  samples/Resources/Default@2x.png
  42. BIN  samples/Resources/Default@2x.psd
  43. BIN  samples/Resources/Icon.png
  44. BIN  samples/Resources/Icon.psd
  45. BIN  samples/Resources/Icon@2x.png
  46. BIN  samples/Resources/Icon@2x.psd
  47. +0 −21 samples/Style/TTCSSStyleSheets/Classes/AppDelegate.h
  48. +0 −59 samples/Style/TTCSSStyleSheets/Classes/AppDelegate.m
  49. +0 −17 samples/Style/TTCSSStyleSheets/Classes/Atlas.h
  50. +0 −19 samples/Style/TTCSSStyleSheets/Classes/Atlas.m
  51. +0 −18 samples/Style/TTCSSStyleSheets/Classes/SampleCSSStyleSheet.h
  52. +0 −36 samples/Style/TTCSSStyleSheets/Classes/SampleCSSStyleSheet.m
  53. +0 −22 samples/Style/TTCSSStyleSheets/Classes/StyleSheetViewController.h
  54. +0 −113 samples/Style/TTCSSStyleSheets/Classes/StyleSheetViewController.m
  55. +0 −23 samples/Style/TTCSSStyleSheets/Configurations/App.xcconfig
  56. +0 −18 samples/Style/TTCSSStyleSheets/Configurations/Project.xcconfig
  57. +0 −17 samples/Style/TTCSSStyleSheets/Configurations/RelPath.xcconfig
  58. +0 −23 samples/Style/TTCSSStyleSheets/Configurations/UnitTests.xcconfig
  59. +0 −11 samples/Style/TTCSSStyleSheets/Headers/TTCSSStyleSheets_Prefix.pch
  60. +0 −58 samples/Style/TTCSSStyleSheets/Resources/stylesheet.css
  61. +0 −28 samples/Style/TTCSSStyleSheets/TTCSSStyleSheets-Info.plist
  62. +0 −814 samples/Style/TTCSSStyleSheets/TTCSSStyleSheets.xcodeproj/project.pbxproj
  63. +0 −22 samples/Style/TTCSSStyleSheets/main.m
  64. +0 −21 samples/Style/TTStyleCatalog/Classes/AppDelegate.h
  65. +0 −61 samples/Style/TTStyleCatalog/Classes/AppDelegate.m
  66. +0 −17 samples/Style/TTStyleCatalog/Classes/Atlas.h
  67. +0 −19 samples/Style/TTStyleCatalog/Classes/Atlas.m
  68. +0 −21 samples/Style/TTStyleCatalog/Classes/MainMenuViewController.h
  69. +0 −157 samples/Style/TTStyleCatalog/Classes/MainMenuViewController.m
  70. +0 −23 samples/Style/TTStyleCatalog/Classes/StyleView.h
  71. +0 −58 samples/Style/TTStyleCatalog/Classes/StyleView.m
  72. +0 −26 samples/Style/TTStyleCatalog/Classes/StyleViewController.h
  73. +0 −185 samples/Style/TTStyleCatalog/Classes/StyleViewController.m
  74. +0 −23 samples/Style/TTStyleCatalog/Configurations/App.xcconfig
  75. +0 −18 samples/Style/TTStyleCatalog/Configurations/Project.xcconfig
  76. +0 −17 samples/Style/TTStyleCatalog/Configurations/RelPath.xcconfig
  77. +0 −22 samples/Style/TTStyleCatalog/Configurations/UnitTests.xcconfig
  78. +0 −10 samples/Style/TTStyleCatalog/Headers/TTStyleCatalog_Prefix.pch
  79. +0 −28 samples/Style/TTStyleCatalog/TTStyleCatalog-Info.plist
  80. +0 −763 samples/Style/TTStyleCatalog/TTStyleCatalog.xcodeproj/project.pbxproj
  81. +0 −22 samples/Style/TTStyleCatalog/main.m
  82. +0 −5 samples/TTCatalog/Classes/ActivityTestController.h
  83. +0 −93 samples/TTCatalog/Classes/ActivityTestController.m
  84. +0 −6 samples/TTCatalog/Classes/AppDelegate.h
  85. +0 −196 samples/TTCatalog/Classes/AppDelegate.m
  86. +0 −7 samples/TTCatalog/Classes/ButtonTestController.h
  87. +0 −182 samples/TTCatalog/Classes/ButtonTestController.m
  88. +0 −4 samples/TTCatalog/Classes/CatalogController.h
  89. +0 −62 samples/TTCatalog/Classes/CatalogController.m
  90. +0 −10 samples/TTCatalog/Classes/DownloadProgressTestController.h
  91. +0 −142 samples/TTCatalog/Classes/DownloadProgressTestController.m
  92. +0 −10 samples/TTCatalog/Classes/DownloadTestModel.h
  93. +0 −34 samples/TTCatalog/Classes/DownloadTestModel.m
  94. +0 −8 samples/TTCatalog/Classes/ImageTest1Controller.h
  95. +0 −30 samples/TTCatalog/Classes/ImageTest1Controller.m
  96. +0 −7 samples/TTCatalog/Classes/LauncherViewTestController.h
  97. +0 −103 samples/TTCatalog/Classes/LauncherViewTestController.m
  98. +0 −11 samples/TTCatalog/Classes/MessageTestController.h
  99. +0 −145 samples/TTCatalog/Classes/MessageTestController.m
  100. +0 −46 samples/TTCatalog/Classes/MockDataSource.h
  101. +0 −577 samples/TTCatalog/Classes/MockDataSource.m
  102. +0 −44 samples/TTCatalog/Classes/MockPhotoSource.h
  103. +0 −192 samples/TTCatalog/Classes/MockPhotoSource.m
  104. +0 −4 samples/TTCatalog/Classes/PhotoTest1Controller.h
  105. +0 −107 samples/TTCatalog/Classes/PhotoTest1Controller.m
  106. +0 −6 samples/TTCatalog/Classes/PhotoTest2Controller.h
  107. +0 −279 samples/TTCatalog/Classes/PhotoTest2Controller.m
  108. +0 −9 samples/TTCatalog/Classes/ScrollViewTestController.h
  109. +0 −116 samples/TTCatalog/Classes/ScrollViewTestController.m
  110. +0 −18 samples/TTCatalog/Classes/SearchTestController.h
  111. +0 −52 samples/TTCatalog/Classes/SearchTestController.m
  112. +0 −5 samples/TTCatalog/Classes/SplitCatalogController.h
  113. +0 −89 samples/TTCatalog/Classes/SplitCatalogController.m
  114. +0 −4 samples/TTCatalog/Classes/StyleTestController.h
  115. +0 −184 samples/TTCatalog/Classes/StyleTestController.m
  116. +0 −4 samples/TTCatalog/Classes/StyledTextTableTestController.h
  117. +0 −52 samples/TTCatalog/Classes/StyledTextTableTestController.m
  118. +0 −4 samples/TTCatalog/Classes/StyledTextTestController.h
  119. +0 −122 samples/TTCatalog/Classes/StyledTextTestController.m
  120. +0 −9 samples/TTCatalog/Classes/TabBarTestController.h
  121. +0 −66 samples/TTCatalog/Classes/TabBarTestController.m
  122. +0 −5 samples/TTCatalog/Classes/TableControlsTestController.h
  123. +0 −55 samples/TTCatalog/Classes/TableControlsTestController.m
  124. +0 −5 samples/TTCatalog/Classes/TableDragRefreshController.h
  125. +0 −36 samples/TTCatalog/Classes/TableDragRefreshController.m
  126. +0 −5 samples/TTCatalog/Classes/TableImageTestController.h
  127. +0 −61 samples/TTCatalog/Classes/TableImageTestController.m
  128. +0 −5 samples/TTCatalog/Classes/TableItemTestController.h
  129. +0 −90 samples/TTCatalog/Classes/TableItemTestController.m
  130. +0 −4 samples/TTCatalog/Classes/TableTestController.h
  131. +0 −89 samples/TTCatalog/Classes/TableTestController.m
  132. +0 −26 samples/TTCatalog/Classes/TableWithBannerController.h
  133. +0 −78 samples/TTCatalog/Classes/TableWithBannerController.m
  134. +0 −26 samples/TTCatalog/Classes/TableWithShadowController.h
  135. +0 −52 samples/TTCatalog/Classes/TableWithShadowController.m
  136. +0 −7 samples/TTCatalog/Classes/YouTubeTestController.h
  137. +0 −42 samples/TTCatalog/Classes/YouTubeTestController.m
  138. +0 −23 samples/TTCatalog/Configurations/App.xcconfig
  139. +0 −18 samples/TTCatalog/Configurations/Project.xcconfig
  140. +0 −17 samples/TTCatalog/Configurations/RelPath.xcconfig
  141. +0 −22 samples/TTCatalog/Configurations/UnitTests.xcconfig
  142. +0 −9 samples/TTCatalog/Headers/TTCatalog_Prefix.pch
  143. +0 −28 samples/TTCatalog/TTCatalog-Info.plist
  144. +0 −1,146 samples/TTCatalog/TTCatalog.xcodeproj/project.pbxproj
  145. BIN  samples/TTCatalog/defaultMusic.png
  146. BIN  samples/TTCatalog/defaultPerson.png
  147. +0 −9 samples/TTCatalog/main.m
  148. BIN  samples/TTCatalog/mask.png
  149. BIN  samples/TTCatalog/person.jpg
  150. BIN  samples/TTCatalog/smiley.png
  151. BIN  samples/TTCatalog/tableIcon.png
  152. +0 −20 samples/TTFacebook/Atlas.h
  153. +0 −21 samples/TTFacebook/Atlas.m
  154. +0 −24 samples/TTFacebook/Classes/AppDelegate.h
  155. +0 −67 samples/TTFacebook/Classes/AppDelegate.m
  156. +0 −29 samples/TTFacebook/Classes/TTFacebookPost.h
  157. +0 −42 samples/TTFacebook/Classes/TTFacebookPost.m
  158. +0 −28 samples/TTFacebook/Classes/TTFacebookSearchFeedDataSource.h
  159. +0 −96 samples/TTFacebook/Classes/TTFacebookSearchFeedDataSource.m
  160. +0 −31 samples/TTFacebook/Classes/TTFacebookSearchFeedModel.h
  161. +0 −113 samples/TTFacebook/Classes/TTFacebookSearchFeedModel.m
  162. +0 −24 samples/TTFacebook/Classes/TTFacebookSearchFeedViewController.h
  163. +0 −59 samples/TTFacebook/Classes/TTFacebookSearchFeedViewController.m
  164. +0 −23 samples/TTFacebook/Configurations/App.xcconfig
  165. +0 −18 samples/TTFacebook/Configurations/Project.xcconfig
  166. +0 −17 samples/TTFacebook/Configurations/RelPath.xcconfig
  167. +0 −22 samples/TTFacebook/Configurations/UnitTests.xcconfig
  168. +0 −11 samples/TTFacebook/Headers/TTFacebook_Prefix.pch
  169. +0 −28 samples/TTFacebook/Resources/stylesheet.css
  170. +0 −28 samples/TTFacebook/TTFacebook-Info.plist
  171. +0 −931 samples/TTFacebook/TTFacebook.xcodeproj/project.pbxproj
  172. +0 −22 samples/TTFacebook/main.m
  173. +0 −6 samples/TTNavigatorDemo/Classes/AppDelegate.h
  174. +0 −89 samples/TTNavigatorDemo/Classes/AppDelegate.m
  175. +0 −20 samples/TTNavigatorDemo/Classes/ContentController.h
  176. +0 −136 samples/TTNavigatorDemo/Classes/ContentController.m
  177. +0 −18 samples/TTNavigatorDemo/Classes/MenuController.h
  178. +0 −130 samples/TTNavigatorDemo/Classes/MenuController.m
  179. +0 −6 samples/TTNavigatorDemo/Classes/TabBarController.h
  180. +0 −17 samples/TTNavigatorDemo/Classes/TabBarController.m
  181. +0 −23 samples/TTNavigatorDemo/Configurations/App.xcconfig
  182. +0 −18 samples/TTNavigatorDemo/Configurations/Project.xcconfig
  183. +0 −17 samples/TTNavigatorDemo/Configurations/RelPath.xcconfig
  184. +0 −22 samples/TTNavigatorDemo/Configurations/UnitTests.xcconfig
  185. +0 −9 samples/TTNavigatorDemo/Headers/TTNavigatorDemo_Prefix.pch
  186. +0 −28 samples/TTNavigatorDemo/Info.plist
  187. +0 −719 samples/TTNavigatorDemo/TTNavigatorDemo.xcodeproj/project.pbxproj
  188. +0 −9 samples/TTNavigatorDemo/main.m
  189. BIN  samples/TTNavigatorDemo/tab.png
  190. +0 −25 samples/TTTwitter/Classes/AppDelegate.h
  191. +0 −57 samples/TTTwitter/Classes/AppDelegate.m
  192. +0 −19 samples/TTTwitter/Classes/Atlas.h
  193. +0 −19 samples/TTTwitter/Classes/Atlas.m
  194. +0 −28 samples/TTTwitter/Classes/TTTwitterSearchFeedDataSource.h
  195. +0 −108 samples/TTTwitter/Classes/TTTwitterSearchFeedDataSource.m
  196. +0 −38 samples/TTTwitter/Classes/TTTwitterSearchFeedModel.h
  197. +0 −129 samples/TTTwitter/Classes/TTTwitterSearchFeedModel.m
  198. +0 −24 samples/TTTwitter/Classes/TTTwitterSearchFeedViewController.h
  199. +0 −53 samples/TTTwitter/Classes/TTTwitterSearchFeedViewController.m
  200. +0 −29 samples/TTTwitter/Classes/TTTwitterTweet.h
  201. +0 −41 samples/TTTwitter/Classes/TTTwitterTweet.m
  202. +0 −23 samples/TTTwitter/Configurations/App.xcconfig
  203. +0 −18 samples/TTTwitter/Configurations/Project.xcconfig
  204. +0 −17 samples/TTTwitter/Configurations/RelPath.xcconfig
  205. +0 −22 samples/TTTwitter/Configurations/UnitTests.xcconfig
  206. +0 −10 samples/TTTwitter/Headers/TTTwitter_Prefix.pch
  207. BIN  samples/TTTwitter/Icon.png
  208. +0 −60 samples/TTTwitter/README.mdown
  209. +0 −28 samples/TTTwitter/TTTwitter-Info.plist
  210. +0 −856 samples/TTTwitter/TTTwitter.xcodeproj/project.pbxproj
  211. +0 −22 samples/TTTwitter/main.m
  212. +0 −23 samples/UI/TTNibDemo/Classes/DemoMessageController.h
  213. +0 −50 samples/UI/TTNibDemo/Classes/DemoMessageController.m
  214. +0 −541 samples/UI/TTNibDemo/Classes/DemoMessageController.xib
  215. +0 −24 samples/UI/TTNibDemo/Classes/DemoPostController.h
  216. +0 −41 samples/UI/TTNibDemo/Classes/DemoPostController.m
  217. +0 −496 samples/UI/TTNibDemo/Classes/DemoPostController.xib
  218. +0 −25 samples/UI/TTNibDemo/Classes/DemoTableViewController.h
  219. +0 −94 samples/UI/TTNibDemo/Classes/DemoTableViewController.m
  220. +0 −21 samples/UI/TTNibDemo/Classes/DemoViewController.h
  221. +0 −34 samples/UI/TTNibDemo/Classes/DemoViewController.m
  222. +0 −563 samples/UI/TTNibDemo/Classes/DemoViewController.xib
  223. +0 −26 samples/UI/TTNibDemo/Classes/NibDemoAppDelegate.h
  224. +0 −112 samples/UI/TTNibDemo/Classes/NibDemoAppDelegate.m
  225. +0 −20 samples/UI/TTNibDemo/Classes/RootViewController.h
  226. +0 −67 samples/UI/TTNibDemo/Classes/RootViewController.m
  227. +0 −21 samples/UI/TTNibDemo/Classes/StyleSheet.h
  228. +0 −74 samples/UI/TTNibDemo/Classes/StyleSheet.m
  229. +0 −23 samples/UI/TTNibDemo/Configurations/App.xcconfig
  230. +0 −18 samples/UI/TTNibDemo/Configurations/Project.xcconfig
  231. +0 −17 samples/UI/TTNibDemo/Configurations/RelPath.xcconfig
  232. +0 −22 samples/UI/TTNibDemo/Configurations/UnitTests.xcconfig
  233. +0 −543 samples/UI/TTNibDemo/DemoTableViewController.xib
  234. +0 −543 samples/UI/TTNibDemo/FooterTableViewController.xib
  235. +0 −15 samples/UI/TTNibDemo/Headers/TTNibDemo_Prefix.pch
  236. +0 −268 samples/UI/TTNibDemo/MainWindow.xib
  237. +0 −17 samples/UI/TTNibDemo/README.mdown
  238. +0 −30 samples/UI/TTNibDemo/TTNibDemo-Info.plist
  239. +0 −836 samples/UI/TTNibDemo/TTNibDemo.xcodeproj/project.pbxproj
  240. BIN  samples/UI/TTNibDemo/blueArrow.png
  241. +0 −24 samples/UI/TTNibDemo/main.m
  242. +0 −38 samples/common/Configurations/App.xcconfig
  243. +0 −17 samples/common/Configurations/Libraries.xcconfig
  244. +0 −17 samples/common/Configurations/Paths.xcconfig
  245. +0 −17 samples/common/Configurations/Project.xcconfig
  246. +0 −18 samples/common/Configurations/UnitTests.xcconfig
  247. BIN  src/Three20.bundle/cs.lproj/Localizable.strings
  248. BIN  src/Three20.bundle/de.lproj/Localizable.strings
  249. BIN  src/Three20.bundle/en.lproj/Localizable.strings
  250. BIN  src/Three20.bundle/es.lproj/Localizable.strings
  251. BIN  src/Three20.bundle/fr.lproj/Localizable.strings
  252. BIN  src/Three20.bundle/he.lproj/Localizable.strings
  253. BIN  src/Three20.bundle/images/backIcon.png
  254. BIN  src/Three20.bundle/images/backIcon@2x.png
  255. BIN  src/Three20.bundle/images/blackArrow.png
  256. BIN  src/Three20.bundle/images/blueArrow.png
  257. BIN  src/Three20.bundle/images/blueArrow@2x.png
  258. BIN  src/Three20.bundle/images/closeButton.png
  259. BIN  src/Three20.bundle/images/empty.png
  260. BIN  src/Three20.bundle/images/error.png
  261. BIN  src/Three20.bundle/images/forwardIcon.png
  262. BIN  src/Three20.bundle/images/forwardIcon@2x.png
  263. BIN  src/Three20.bundle/images/nextIcon.png
  264. BIN  src/Three20.bundle/images/nextIcon@2x.png
  265. BIN  src/Three20.bundle/images/overflowLeft.png
  266. BIN  src/Three20.bundle/images/overflowRight.png
  267. BIN  src/Three20.bundle/images/photoDefault.png
  268. BIN  src/Three20.bundle/images/photoDefault@2x.png
  269. BIN  src/Three20.bundle/images/previousIcon.png
  270. BIN  src/Three20.bundle/images/previousIcon@2x.png
  271. BIN  src/Three20.bundle/images/reloadButton.png
  272. BIN  src/Three20.bundle/images/reloadButton@2x.png
  273. BIN  src/Three20.bundle/images/reloadButtonActive.png
  274. BIN  src/Three20.bundle/images/reloadButtonActive@2x.png
  275. BIN  src/Three20.bundle/images/searchIcon.png
  276. BIN  src/Three20.bundle/images/whiteArrow.png
  277. BIN  src/Three20.bundle/it.lproj/Localizable.strings
  278. BIN  src/Three20.bundle/ja.lproj/Localizable.strings
  279. BIN  src/Three20.bundle/ko.lproj/Localizable.strings
  280. BIN  src/Three20.bundle/nl.lproj/Localizable.strings
  281. BIN  src/Three20.bundle/pt.lproj/Localizable.strings
  282. BIN  src/Three20.bundle/ru.lproj/Localizable.strings
  283. BIN  src/Three20.bundle/tr.lproj/Localizable.strings
  284. BIN  src/Three20.bundle/zh_cn.lproj/Localizable.strings
  285. BIN  src/Three20.bundle/zh_tw.lproj/Localizable.strings
  286. +0 −21 src/Three20/Configurations/Library.xcconfig
  287. +0 −17 src/Three20/Configurations/Project.xcconfig
  288. +0 −23 src/Three20/Configurations/UnitTests.xcconfig
  289. +0 −37 src/Three20/Headers/Three20+Additions.h
  290. +0 −33 src/Three20/Headers/Three20.h
  291. +0 −9 src/Three20/Headers/Three20_Prefix.pch
  292. +0 −19 src/Three20/Source/Three20.m
  293. +0 −877 src/Three20/Three20.xcodeproj/project.pbxproj
  294. +0 −42 src/Three20/UnitTests/BasicTests.m
  295. +0 −20 src/Three20/UnitTests/Resources/PropertyLists/UnitTests-Info.plist
  296. +0 −22 src/Three20Core/Configurations/Library.xcconfig
  297. +0 −17 src/Three20Core/Configurations/Project.xcconfig
  298. +0 −24 src/Three20Core/Configurations/UnitTests.xcconfig
  299. +0 −57 src/Three20Core/Headers/NSArrayAdditions.h
  300. +0 −50 src/Three20Core/Headers/NSDataAdditions.h
Sorry, we could not display the entire diff because too many files (1,248) changed.
View
185 README.mdown
@@ -1,182 +1,25 @@
Three20
=======
-Three20 is a collection of iPhone UI classes, like a photo viewer, and general
-utilities, like an HTTP disk cache. Three20 is derived from the
-[Facebook iPhone app][], which is one of the most downloaded iPhone apps ever.
+Support of Three20 has been discontinued.
-[![](http://farm4.static.flickr.com/3447/3378092101_40a62a04b2_m.jpg)](http://farm4.static.flickr.com/3447/3378092101_b064d8e339_o.jpg)
-[![](http://farm4.static.flickr.com/3432/3378117315_846547cfba_m.jpg)](http://farm4.static.flickr.com/3432/3378117315_3bf905bdb6_o.jpg)
-[![](http://farm4.static.flickr.com/3462/3378171111_ec1208541d_m.jpg)](http://farm4.static.flickr.com/3462/3378171111_666173111d_o.jpg)
-[![](http://farm4.static.flickr.com/3646/3378998444_d0534d337f_m.jpg)](http://farm4.static.flickr.com/3646/3378998444_8d3b1eeef8_o.jpg)
-[![](http://farm4.static.flickr.com/3552/3378940896_7b23cca98e_m.jpg)](http://farm4.static.flickr.com/3552/3378940896_8ccb5ea1c8_o.jpg)
-[![](http://farm4.static.flickr.com/3382/3425636810_483f1b65a6_m.jpg)](http://farm4.static.flickr.com/3382/3425636810_b0a578bb22_o.jpg)
-Community
-=========
+What now?
+------
-If you would like to ask any questions regarding Three20, please check out any of the following:
+If you updated to this revision by accident (e.g. a git pull), you might want to switch back to the
+version you had before (`git checkout cc672132ab`).
-* [Three20.info][]
-* [Three20 Mailing List][]
-* [Three20 Tagged Questions on StackOverflow][]
+Three20 still compiles and seems to work on iOS6, so there's no immediate need to remove everything now.
+Still, as the library is not maintained anymore, it might be a good time to replace it.
-Documentation
-==============================
+Lots of Three20's helpers are not needed anymore, as they are now present right in iOS.
+For other parts there are some really good replacement available.
+If you're searching for a full replacement, [NimbusKit][http://nimbuskit.info] might help, they even provide a [migration guide][http://wiki.nimbuskit.info/Three20-Migration-Guide].
-You can access Three20 API documentation in several ways:
+Links
+------
-1. Online: http://facebook.github.com/three20/api
-1. Within Xcode:
- 1. Open your Xcode Preferences (`⌘,`) and switch to Documentation tab.
- 1. Click the `+` button
- 1. Add the Three20 doc set feed: `feed://facebook.github.com/three20/api/com.facebook.Three20.atom`
-1. Generate the documentation from the project repository with the `src/scripts/docs.py` script
+[Three20 Mailing List][http://groups.google.com/group/three20/]
-Adding Three20 to your project
-==============================
-
-Three20 is compiled as static libraries. It use Xcode's "dependent project" facilities.
-There are two methods of adding Three20 to your project.
-
-The first is with the [TTModule Python Script][].
-
-The Second option is to add it to your project manually. Here is how:
-**Estimated time:** 5 minutes.
-
-1. Clone the three20 git repository: `git clone git://github.com/facebook/three20.git`. Make sure
- you store the repository in a permanent place because Xcode will need to reference the files
- every time you compile your project.
-
-2. Locate the "Three20.xcodeproj" file under "`three20/src/Three20/`". Drag Three20.xcodeproj and
- drop it onto the root of your Xcode project's "Groups and Files" sidebar. A dialog will
- appear -- make sure "Copy items" is unchecked and "Reference Type" is "Relative to Project"
- before clicking "Add".
-
-3. Open the Three20 Xcode Project that you just added to your app and expand the "Dependencies"
- group. Select all of the projects listed there and drag them to your app as well. You should
- now have the following list of Three20 projects added to your app:
- * Three20Core
- * Three20Network
- * Three20Style
- * Three20UICommon
- * Three20UINavigator
- * Three20UI
- * Three20
-
-4. Now you need to link the Three20 static libraries to your project. Select your Project Target.
- Under the "Build Phases" tab you will see "Link Binary With Libaries" section. Click on the
- "+" button, select "libThree20.a" and each of the other files, and select "Add". This will link
- each part of the Three20 framework to you app.
-
-5. Now you need to add Three20 as a dependency of your project, so Xcode compiles it whenever
- you compile your project. Expand the "Targets" section of the sidebar and double-click your
- application's target. Under the "General" tab you will see a "Direct Dependencies" section.
- Click the "+" button, select "Three20" and each of the other libs, and click "Add Target".
- You do *not* need to add the `UnitTests` target for each lib.
-
-6. Now you need to add the bundle of images and strings to your app. Locate "Three20.bundle" under
- "three20/src" and drag and drop it into your project. A dialog will appear -- make sure
- "Create Folder References" is selected, "Copy items" is unchecked, and "Reference Type" is
- "Relative to Project" before clicking "Add".
-
-7. Now you need to add the Core Animation framework to your project. Right click on the
- "Frameworks" group in your project (or equivalent) and select Add > Existing Frameworks.
- Then locate QuartzCore.framework and add it to the project.
-
-8. Finally, we need to tell your project where to find the Three20 headers. Open your
- "Project Settings" and go to the "Build" tab. Look for "Header Search Paths" and double-click
- it. Add these two "$(BUILT_PRODUCTS_DIR)/../three20" and "$(BUILT_PRODUCTS_DIR)/../../three20"
-
-9. While you are in Project Settings, go to "Other Linker Flags" under the "Linker" section, and
- add "-ObjC" and "-all_load" to the list of flags.
-
-10. You're ready to go. Just #import "Three20/Three20.h" anywhere you want to use Three20 classes
- in your project.
-
-An Overview of Three20
-======================
-
-Photo Viewer
-------------
-
-[TTPhotoViewController][] emulates Apple's Photos app with all of its flick n' pinch delight.
-You can supply your own "photo sources", which works similiarly to the data sources used by
-UITableView. Unlike Apple's Photos app, it isn't limited to photos stored locally. Your
-photos can be loaded from the network, and long lists of photos can be loaded incrementally.
-
-Message composer
-----------------
-
-[TTMessageController][] emulates the message composer in Apple's Mail app. You can customize it
-to send any kind of message you want. Include your own set of message fields, or use the
-standard "To:" and "Subject:". Recipient names can be autocompleted from a data source that
-you provide.
-
-Web image views
------------------------
-
-[TTImageView][] makes it as easy to display an image as it is in HTML. Just supply the URL
-of the image, and TTImageView loads it and displays it efficiently. TTImageView also works
-with the HTTP cache described below to avoid hitting the network when possible.
-
-Internet-aware table view controllers
----------------------------------------
-
-[TTTableViewController][] and [TTTableViewDataSource][] help you to build tables which load
-their content from the Internet. Rather than just assuming you have all the data ready to go,
-like UITableView does by default, TTTableViewController lets you communicate when your data is
-loading, and when there is an error or nothing to display. It also helps you to add a "More"
-button to load the next page of data, and optionally supports reloading the data by shaking the
-device.
-
-Better text fields
-------------------
-
-[TTTextEditor][] is a UITextView which can grow in height automatically as you type. I use
-this for entering messages in Facebook Chat, and it behaves similarly to the editor in Apple's
-SMS app.
-
-[TTPickerTextField][] is a type-ahead UITextField. As you type it searches a data source, and
-it adds bubbles into the flow of text when you choose a type-ahead option. I use this in
-TTMessageController for selecting the names of message recipients.
-
-HTTP disk cache
---------------
-
-[TTURLRequest][] is a replacement for NSURLRequest which supports a disk cache (NSURLRequest
-can only cache in RAM). It has some other nice features too. HTTP posts are as easy as
-supplying a dictionary of parameters. The TTURL loading system can also be suspended and
-resumed at any time, which is a great performance helper. Network threads often fight with
-the UI thread, so you can suspend the network any time your app is momentarily graphically
-intensive.
-
-URL-based Navigation
---------------------
-
-[TTNavigator][] is for those grizzled old web developers like myself who want to
-organize their app by "pages" which can be displayed by visiting a URL.
-
-Your view controllers can simply register URL patterns that they handle, and when those URLs
-are visited the controllers will be created and displayed. You can also register generic
-actions that are called when a URL is visited.
-
-TTNavigator also persists and restores the full path of navigation controllers and modal
-view controllers, so your users can quit the app and come back exactly where they left off.
-
-Learn more at [Three20.info][]
-
-[Facebook iPhone app]: http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=284882215&mt=8
-[Three20.info]: http://Three20.info
-[Three20 Mailing List]: http://groups.google.com/group/three20/
-[Three20 Tagged Questions on StackOverflow]: http://stackoverflow.com/questions/tagged/three20
-[TTPhotoViewController]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTPhotoViewController.h
-[TTMessageController]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTMessageController.h
-[TTImageView]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTImageView.h
-[TTTableViewController]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTTableViewController.h
-[TTTableViewDataSource]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTTableViewDataSource.h
-[TTURLRequest]: http://github.com/facebook/three20/blob/master/src/Three20Network/Headers/TTURLRequest.h
-[TTTextEditor]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTTextEditor.h
-[TTPickerTextField]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTPickerTextField.h
-[TTNavigator]: http://github.com/facebook/three20/blob/master/src/Three20UI/Headers/TTNavigator.h
-[TTModule Python Script]: http://three20.info/article/2010-10-06-Adding-Three20-To-Your-Project
+[Three20 Tagged Questions on StackOverflow][http://stackoverflow.com/questions/tagged/three20]
View
183 Three20.xcworkspace/contents.xcworkspacedata
@@ -1,183 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Workspace
- version = "1.0">
- <Group
- location = "container:"
- name = "src">
- <Group
- location = "group:src/common"
- name = "common">
- <Group
- location = "group:Configurations"
- name = "Configurations">
- <FileRef
- location = "group:Libraries.xcconfig">
- </FileRef>
- <FileRef
- location = "group:Library.xcconfig">
- </FileRef>
- <FileRef
- location = "group:Paths.xcconfig">
- </FileRef>
- <FileRef
- location = "group:Project.xcconfig">
- </FileRef>
- <FileRef
- location = "group:UnitTests.xcconfig">
- </FileRef>
- </Group>
- </Group>
- <Group
- location = "group:src/scripts"
- name = "scripts">
- <FileRef
- location = "group:Build.command">
- </FileRef>
- <FileRef
- location = "group:Clean.command">
- </FileRef>
- <FileRef
- location = "group:docs.py">
- </FileRef>
- <FileRef
- location = "group:lint">
- </FileRef>
- <FileRef
- location = "group:Paths.py">
- </FileRef>
- <FileRef
- location = "group:Paths.pyc">
- </FileRef>
- <FileRef
- location = "group:Pbxproj.html">
- </FileRef>
- <FileRef
- location = "group:Pbxproj.py">
- </FileRef>
- <FileRef
- location = "group:Pbxproj.pyc">
- </FileRef>
- <FileRef
- location = "group:Protect.command">
- </FileRef>
- <FileRef
- location = "group:ttmodule.py">
- </FileRef>
- </Group>
- <FileRef
- location = "group:src/Three20Core/Three20Core.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:src/Three20Network/Three20Network.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:src/Three20Style/Three20Style.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:src/Three20UICommon/Three20UICommon.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:src/Three20UINavigator/Three20UINavigator.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:src/Three20UI/Three20UI.xcodeproj">
- </FileRef>
- <Group
- location = "container:"
- name = "extensions">
- <FileRef
- location = "group:src/extThree20CSSStyle/extThree20CSSStyle.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:src/extThree20JSON/extThree20JSON.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:src/extThree20XML/extThree20XML.xcodeproj">
- </FileRef>
- </Group>
- </Group>
- <Group
- location = "container:"
- name = "Samples">
- <Group
- location = "group:samples/common"
- name = "common">
- <Group
- location = "group:Configurations"
- name = "Configurations">
- <FileRef
- location = "group:App.xcconfig">
- </FileRef>
- <FileRef
- location = "group:Libraries.xcconfig">
- </FileRef>
- <FileRef
- location = "group:Paths.xcconfig">
- </FileRef>
- <FileRef
- location = "group:Project.xcconfig">
- </FileRef>
- <FileRef
- location = "group:UnitTests.xcconfig">
- </FileRef>
- </Group>
- </Group>
- <FileRef
- location = "group:samples/TTCatalog/TTCatalog.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:samples/Core/TTCoreDemo/TTCoreDemo.xcodeproj">
- </FileRef>
- <Group
- location = "container:"
- name = "Network">
- <FileRef
- location = "group:samples/Network/TTNetworkDemo/TTNetworkDemo.xcodeproj">
- </FileRef>
- </Group>
- <Group
- location = "container:"
- name = "Style">
- <FileRef
- location = "group:samples/Style/TTCSSStyleSheets/TTCSSStyleSheets.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:samples/Style/TTStyleCatalog/TTStyleCatalog.xcodeproj">
- </FileRef>
- </Group>
- <Group
- location = "container:"
- name = "UI">
- <FileRef
- location = "group:samples/UI/TTNibDemo/TTNibDemo.xcodeproj">
- </FileRef>
- </Group>
- <FileRef
- location = "group:samples/TTFacebook/TTFacebook.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:samples/TTNavigatorDemo/TTNavigatorDemo.xcodeproj">
- </FileRef>
- <FileRef
- location = "group:samples/TTTwitter/TTTwitter.xcodeproj">
- </FileRef>
- </Group>
- <FileRef
- location = "group:AUTHORS">
- </FileRef>
- <FileRef
- location = "group:config.template">
- </FileRef>
- <FileRef
- location = "group:diffstrings.py">
- </FileRef>
- <FileRef
- location = "group:LICENSE">
- </FileRef>
- <FileRef
- location = "group:project.dev">
- </FileRef>
- <FileRef
- location = "group:README.mdown">
- </FileRef>
-</Workspace>
View
189 Three20.xcworkspace/xcshareddata/xcschemes/Samples.xcscheme
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "0450"
- version = "1.3">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES">
- <BuildActionEntries>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTCSSStyleSheets.app"
- BlueprintName = "TTCSSStyleSheets"
- ReferencedContainer = "container:samples/Style/TTCSSStyleSheets/TTCSSStyleSheets.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTCatalog.app"
- BlueprintName = "TTCatalog"
- ReferencedContainer = "container:samples/TTCatalog/TTCatalog.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTCoreDemo.app"
- BlueprintName = "TTCoreDemo"
- ReferencedContainer = "container:samples/Core/TTCoreDemo/TTCoreDemo.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTFacebook.app"
- BlueprintName = "TTFacebook"
- ReferencedContainer = "container:samples/TTFacebook/TTFacebook.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTNavigatorDemo.app"
- BlueprintName = "TTNavigatorDemo"
- ReferencedContainer = "container:samples/TTNavigatorDemo/TTNavigatorDemo.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTNetworkDemo.app"
- BlueprintName = "TTNetworkDemo"
- ReferencedContainer = "container:samples/Network/TTNetworkDemo/TTNetworkDemo.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTNibDemo.app"
- BlueprintName = "TTNibDemo"
- ReferencedContainer = "container:samples/UI/TTNibDemo/TTNibDemo.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTStyleCatalog.app"
- BlueprintName = "TTStyleCatalog"
- ReferencedContainer = "container:samples/Style/TTStyleCatalog/TTStyleCatalog.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "YES"
- buildForArchiving = "YES"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTTwitter.app"
- BlueprintName = "TTTwitter"
- ReferencedContainer = "container:samples/TTTwitter/TTTwitter.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- </BuildActionEntries>
- </BuildAction>
- <TestAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
- shouldUseLaunchSchemeArgsEnv = "YES"
- buildConfiguration = "Debug">
- <Testables>
- </Testables>
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTCatalog.app"
- BlueprintName = "TTCatalog"
- ReferencedContainer = "container:samples/TTCatalog/TTCatalog.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- </TestAction>
- <LaunchAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
- launchStyle = "0"
- useCustomWorkingDirectory = "NO"
- buildConfiguration = "Debug"
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- allowLocationSimulation = "YES">
- <MacroExpansion>
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "1D6058900D05DD3D006BFB54"
- BuildableName = "TTCatalog.app"
- BlueprintName = "TTCatalog"
- ReferencedContainer = "container:samples/TTCatalog/TTCatalog.xcodeproj">
- </BuildableReference>
- </MacroExpansion>
- <AdditionalOptions>
- </AdditionalOptions>
- </LaunchAction>
- <ProfileAction
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- buildConfiguration = "Release"
- debugDocumentVersioning = "YES">
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
View
285 Three20.xcworkspace/xcshareddata/xcschemes/UnitTests.xcscheme
@@ -1,285 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Scheme
- LastUpgradeVersion = "0450"
- version = "1.3">
- <BuildAction
- parallelizeBuildables = "YES"
- buildImplicitDependencies = "YES">
- <BuildActionEntries>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "NO"
- buildForArchiving = "NO"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "Three20UnitTests.octest"
- BlueprintName = "Three20UnitTests"
- ReferencedContainer = "container:src/Three20/Three20.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "NO"
- buildForArchiving = "NO"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "CoreUnitTests.octest"
- BlueprintName = "Three20CoreUnitTests"
- ReferencedContainer = "container:src/Three20Core/Three20Core.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "NO"
- buildForArchiving = "NO"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "NetworkUnitTests.octest"
- BlueprintName = "Three20NetworkUnitTests"
- ReferencedContainer = "container:src/Three20Network/Three20Network.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "NO"
- buildForArchiving = "NO"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "StyleUnitTests.octest"
- BlueprintName = "Three20StyleUnitTests"
- ReferencedContainer = "container:src/Three20Style/Three20Style.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "NO"
- buildForArchiving = "NO"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "UIUnitTests.octest"
- BlueprintName = "Three20UIUnitTests"
- ReferencedContainer = "container:src/Three20UI/Three20UI.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "NO"
- buildForArchiving = "NO"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "UICommonUnitTests.octest"
- BlueprintName = "Three20UICommonUnitTests"
- ReferencedContainer = "container:src/Three20UICommon/Three20UICommon.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "NO"
- buildForArchiving = "NO"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "UINavigatorUnitTests.octest"
- BlueprintName = "Three20UINavigatorUnitTests"
- ReferencedContainer = "container:src/Three20UINavigator/Three20UINavigator.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "NO"
- buildForProfiling = "NO"
- buildForArchiving = "NO"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "extCSSStyleUnitTests.octest"
- BlueprintName = "extThree20CSSStyleUnitTests"
- ReferencedContainer = "container:src/extThree20CSSStyle/extThree20CSSStyle.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "NO"
- buildForArchiving = "NO"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "extJSONUnitTests+SBJSON.octest"
- BlueprintName = "extThree20JSONUnitTests+SBJSON"
- ReferencedContainer = "container:src/extThree20JSON/extThree20JSON.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- <BuildActionEntry
- buildForTesting = "YES"
- buildForRunning = "YES"
- buildForProfiling = "NO"
- buildForArchiving = "NO"
- buildForAnalyzing = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "extXMLUnitTests.octest"
- BlueprintName = "extThree20XMLUnitTests"
- ReferencedContainer = "container:src/extThree20XML/extThree20XML.xcodeproj">
- </BuildableReference>
- </BuildActionEntry>
- </BuildActionEntries>
- </BuildAction>
- <TestAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
- shouldUseLaunchSchemeArgsEnv = "YES"
- buildConfiguration = "Debug">
- <Testables>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "CoreUnitTests.octest"
- BlueprintName = "Three20CoreUnitTests"
- ReferencedContainer = "container:src/Three20Core/Three20Core.xcodeproj">
- </BuildableReference>
- </TestableReference>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "NetworkUnitTests.octest"
- BlueprintName = "Three20NetworkUnitTests"
- ReferencedContainer = "container:src/Three20Network/Three20Network.xcodeproj">
- </BuildableReference>
- </TestableReference>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "StyleUnitTests.octest"
- BlueprintName = "Three20StyleUnitTests"
- ReferencedContainer = "container:src/Three20Style/Three20Style.xcodeproj">
- </BuildableReference>
- </TestableReference>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "UICommonUnitTests.octest"
- BlueprintName = "Three20UICommonUnitTests"
- ReferencedContainer = "container:src/Three20UICommon/Three20UICommon.xcodeproj">
- </BuildableReference>
- </TestableReference>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "UINavigatorUnitTests.octest"
- BlueprintName = "Three20UINavigatorUnitTests"
- ReferencedContainer = "container:src/Three20UINavigator/Three20UINavigator.xcodeproj">
- </BuildableReference>
- </TestableReference>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "UIUnitTests.octest"
- BlueprintName = "Three20UIUnitTests"
- ReferencedContainer = "container:src/Three20UI/Three20UI.xcodeproj">
- </BuildableReference>
- </TestableReference>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "Three20UnitTests.octest"
- BlueprintName = "Three20UnitTests"
- ReferencedContainer = "container:src/Three20/Three20.xcodeproj">
- </BuildableReference>
- </TestableReference>
- <TestableReference
- skipped = "YES">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "extCSSStyleUnitTests.octest"
- BlueprintName = "extThree20CSSStyleUnitTests"
- ReferencedContainer = "container:src/extThree20CSSStyle/extThree20CSSStyle.xcodeproj">
- </BuildableReference>
- </TestableReference>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "extJSONUnitTests+SBJSON.octest"
- BlueprintName = "extThree20JSONUnitTests+SBJSON"
- ReferencedContainer = "container:src/extThree20JSON/extThree20JSON.xcodeproj">
- </BuildableReference>
- </TestableReference>
- <TestableReference
- skipped = "NO">
- <BuildableReference
- BuildableIdentifier = "primary"
- BlueprintIdentifier = "EB9E6C6110B6A8F800DE563C"
- BuildableName = "extXMLUnitTests.octest"
- BlueprintName = "extThree20XMLUnitTests"
- ReferencedContainer = "container:src/extThree20XML/extThree20XML.xcodeproj">
- </BuildableReference>
- </TestableReference>
- </Testables>
- </TestAction>
- <LaunchAction
- selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
- selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
- launchStyle = "0"
- useCustomWorkingDirectory = "NO"
- buildConfiguration = "Debug"
- ignoresPersistentStateOnLaunch = "NO"
- debugDocumentVersioning = "YES"
- allowLocationSimulation = "YES">
- <AdditionalOptions>
- </AdditionalOptions>
- </LaunchAction>
- <ProfileAction
- shouldUseLaunchSchemeArgsEnv = "YES"
- savedToolIdentifier = ""
- useCustomWorkingDirectory = "NO"
- buildConfiguration = "Release"
- debugDocumentVersioning = "YES">
- </ProfileAction>
- <AnalyzeAction
- buildConfiguration = "Debug">
- </AnalyzeAction>
- <ArchiveAction
- buildConfiguration = "Release"
- revealArchiveInOrganizer = "YES">
- </ArchiveAction>
-</Scheme>
View
17 config.template
@@ -1,17 +0,0 @@
-;
-; This Three20 config file is used by various scripts in the Three20 ecosystem to
-; change configuration settings.
-;
-; NOTICE: This is just a template. Changes to this file will not be noticed by scripts.
-; To configure Three20, copy this file and rename it to "config" in the same folder.
-;
-; This file represents the assumed "defaults" when the config file does not exist.
-;
-
-; The Three20 lint tool validates source code for the Three20 style guidelines to ensure a
-; consistent style across the code base.
-[lint]
-
-; By default, Three20 will run the linter on all Three20 projects. If you are hacking on
-; Three20 and don't really care about stylistic consistency, set this to false.
-enabled_for_projects = true
View
656 diffstrings.py
@@ -1,656 +0,0 @@
-#!/usr/bin/env python
-
-usage = """usage: %prog [options] path1 path2 ...
-
-diffstrings compares your primary locale with all your other locales to help you determine which new strings need to be translated. It outputs XML files which can be translated, and then merged back into your strings files.
-
-The path arguments supplied to this script should be the path containing your source files. The file system will be searched to find the .lproj directories containing the Localizable.strings files that the script will read and write.
-"""
-
-import os.path, codecs, optparse, re, datetime
-from xml.sax.saxutils import escape
-from xml.dom import minidom
-
-###################################################################################################
-
-global xmlFormat
-xmlFormat = {}
-
-reLprojFileName = re.compile(r'(.+?)\.lproj')
-reStringsFileName = re.compile(r'(.+?)\.strings')
-reComment = re.compile(r'/\*(.*?)\*/')
-reString = re.compile(r'\s*"((\\.|.)+?)"\s*=\s*"(.+?)";')
-reVariable = re.compile(r'%(@|d|f|lld|\d+\.?f|\d+\.\d+f|\d+d)')
-reEnumeratedVariable = re.compile('(%?\d+\$)')
-
-defaultComment = "No comment provided by engineer."
-
-###################################################################################################
-
-def generateProjects(projects):
- for project in projects:
- project.generateStrings()
-
-def diffProjects(projects, sourceLocaleName, focusedLocaleName=None, verbose=False, dryRun=False):
- compiledStrings = {}
- sourceMap = {}
- for project in projects:
- project.compileStrings(compiledStrings, focusedLocaleName)
- project.compileSourceMap(sourceMap)
-
- if sourceLocaleName not in compiledStrings:
- print "WARNING: No '%s' locale found!" % sourceLocaleName
- else:
- sourceStrings = compiledStrings[sourceLocaleName]
-
- if verbose:
- print "\n", "=" * 80
- print "* %s has %d total strings." \
- % (sourceLocaleName, len(sourceStrings.strings))
- print "=" * 80
-
- for localeName, localizedStrings in compiledStrings.iteritems():
- if localizedStrings != sourceStrings:
- sourceStrings.diffReport(localizedStrings)
-
- for localeName, localizedStrings in compiledStrings.iteritems():
- if localizedStrings != sourceStrings:
- translation = sourceStrings.diff(localizedStrings)
- if not dryRun:
- translation.save(".", sourceMap=sourceMap)
-
-def mergeProjects(projects, sourceLocaleName, focusedLocaleName=None, verbose=False, dryRun=False):
- translations = {}
-
- for project in projects:
- sourceStrings = project.condenseStringSourceFiles()
- sourceStrings.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(".")
- translations[localizedStrings.name] = translation
-
- if translation.strings:
- if verbose:
- localizedStrings.mergeReport(sourceStrings, translation)
-
- localizedStrings.mergeTranslation(sourceStrings, translation)
- if not dryRun:
- localizedStrings.save()
- else:
- if verbose:
- print "no translation.strings for %s, sad" % localeName
-
-###################################################################################################
-
-class XcodeProject(object):
- def __init__(self, path, sourceLocaleName):
- self.path = path
- self.sourceLocaleName = sourceLocaleName
- self.sourceLocalePath = self.__findStringsFile(sourceLocaleName, self.path)
- self.stringSourceFiles = list(self.__iterateSourceStrings())
-
- self.locales = {}
- for localeName, localizedStrings in self.__iterateLocalizableStrings():
- self.locales[localeName] = localizedStrings
-
- 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
-
- def compileStrings(self, compiledStrings, focusedLocaleName=None):
- """ Copies all strings in a dictionary for each locale."""
-
- if not self.sourceLocaleName in compiledStrings:
- compiledStrings[self.sourceLocaleName] = LocalizableStrings(self.sourceLocaleName)
- compiledStringsFile = compiledStrings[self.sourceLocaleName]
-
- for sourceStrings in self.stringSourceFiles:
- compiledStringsFile.update(sourceStrings)
-
- if focusedLocaleName:
- locales = {focusedLocaleName: self.locales[focusedLocaleName]}
- else:
- locales = self.locales
-
- for localeName, sourceStrings in locales.iteritems():
- if not localeName in compiledStrings:
- compiledStringsFile = LocalizableStrings(localeName)
- compiledStrings[localeName] = compiledStringsFile
- else:
- compiledStringsFile = compiledStrings[localeName]
-
- compiledStringsFile.update(sourceStrings)
-
- def compileSourceMap(self, sourceMap):
- for sourceStrings in self.stringSourceFiles:
- for source in sourceStrings.strings:
- if not source in sourceMap:
- sourceMap[source] = []
-
- name,ext = os.path.splitext(os.path.basename(sourceStrings.path))
- sourceMap[source].append(name)
-
- def generateStrings(self):
- buildPath = None
-
- cwd = os.getcwd()
- os.chdir(self.path)
-
- extras = ""
- if os.path.isdir(os.path.join(self.path, "Three20.xcodeproj")):
- extras = " -s TTLocalizedString"
-
- for fileName in os.listdir(self.path):
- name,ext = os.path.splitext(fileName)
- if ext == ".m":
- if not buildPath:
- buildPath = self.__makeBuildPath()
- if not os.path.isdir(buildPath):
- os.makedirs(buildPath)
-
- command = "genstrings %s -o %s%s" % (fileName, buildPath, extras)
- print " %s" % command
- os.system(command)
-
- resultPath = os.path.join(buildPath, "Localizable.strings")
- if os.path.isfile(resultPath):
- renamedPath = os.path.join(buildPath, "%s.strings" % name)
- os.rename(resultPath, renamedPath)
-
- os.chdir(cwd)
-
- def __findStringsFile(self, localeName, searchPath):
- dirName = "%s.lproj" % localeName
- localeDirPath = os.path.join(searchPath, dirName)
- if os.path.isdir(localeDirPath):
- return localeDirPath
-
- for name in os.listdir(searchPath):
- path = os.path.join(searchPath, name)
- if os.path.isdir(path):
- localeDirPath = self.__findStringsFile(localeName, path)
- if localeDirPath:
- return localeDirPath
-
- return None
-
- def __iterateSourceStrings(self):
- buildPath = self.__makeBuildPath()
- if not os.path.exists(buildPath):
- for path in self.__findSourceStrings():
- yield path
- else:
- for fileName in os.listdir(buildPath):
- name,ext = os.path.splitext(fileName)
- if ext == ".strings":
- strings = LocalizableStrings(self.sourceLocaleName)
-
- 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)
- if m:
- strings = LocalizableStrings(self.sourceLocaleName)
-
- filePath = os.path.join(self.sourceLocalePath, name)
- strings.open(filePath)
- yield strings
-
- def __iterateLocalizableStrings(self):
- dirPath = os.path.dirname(self.sourceLocalePath)
- for dirName in os.listdir(dirPath):
- m = reLprojFileName.match(dirName)
- if m:
- localeName = m.groups()[0]
- if localeName != self.sourceLocaleName:
- strings = LocalizableStrings(localeName)
-
- localeDirPath = os.path.join(dirPath, dirName)
- for name in os.listdir(localeDirPath):
- m = reStringsFileName.match(name)
- if m:
- filePath = os.path.abspath(os.path.join(localeDirPath, name))
- strings.open(filePath)
- break
-
- yield localeName, strings
-
- def __makeBuildPath(self):
- return os.path.join(self.path, "build", "i18n")
-
-###################################################################################################
-
-class LocalizableStrings(object):
- def __init__(self, name):
- self.name = name
- self.path = None
- self.strings = {}
- self.comments = {}
-
- def open(self, path):
- if os.path.isfile(path):
- self.path = path
- self.__parse()
-
- def save(self, path=None, suffix=""):
- text = self.generate()
- if text:
- if path:
- filePath = self.__makePath(path, suffix)
- else:
- filePath = self.path
-
- print "***** Saving %s" % filePath
- f = codecs.open(filePath, 'w', 'utf-16')
- f.write(text)
- f.close()
-
- def generate(self):
- lines = []
-
- # This may not sort non-English strings sensibly, but the order itself
- # doesn't matter - this is just so that the strings come out in some
- # consistent order every time. (Less efficient, but oh well.)
- for source in sorted(self.strings.keys()):
- if source in self.comments:
- comment = self.comments[source]
- lines.append("/* %s */" % comment)
- lines.append('"%s" = "%s";\n' % (source, self.strings[source]))
-
- return "\n".join(lines)
-
- def mergeTranslation(self, sourceStrings, translation):
- for source in sourceStrings.strings:
- sourceEnum = enumerateStringVariables(source)
- if sourceEnum in translation.strings:
- targetEnum = translation.strings[sourceEnum]
- target = denumerateStringVariables(targetEnum)
- self.strings[source] = target
-
- def update(self, other):
- self.strings.update(other.strings)
- self.comments.update(other.comments)
-
- def diff(self, localizedStrings):
- translation = Translation(localizedStrings.name)
-
- for source, target in self.strings.iteritems():
- sourceEnum = enumerateStringVariables(source)
-
- if source in localizedStrings.strings:
- target = localizedStrings.strings[source]
- translation.translated[sourceEnum] = True
-
- targetEnum = enumerateStringVariables(target)
- translation.strings[sourceEnum] = targetEnum
-
- if source in self.comments:
- translation.comments[sourceEnum] = self.comments[source]
-
- return translation
-
- def diffReport(self, localizedStrings):
- name = localizedStrings.name
- newStrings = list(self.__compare(localizedStrings))
- obsoleteStrings = list(localizedStrings.__compare(self))
- troubleStrings = list(self.__compareSizes(localizedStrings))
-
- print "\n", "=" * 80
-
- if not len(newStrings):
- if len(obsoleteStrings):
- print "%s is fully translated, but has %s obsolete strings" \
- % (name, len(obsoleteStrings))
- else:
- print "%s is fully translated" % name
- else:
- existingCount = len(self.strings) - len(newStrings)
- if len(obsoleteStrings):
- print "%s has %s new strings, %s translated, and %s obsolete."\
- % (name, len(newStrings), existingCount, len(obsoleteStrings))
- else:
- print "%s has %s new strings, with %s already translated."\
- % (name, len(newStrings), existingCount)
- print "=" * 80
-
- if len(newStrings):
- print "\n---- %s NEW STRINGS ---\n" % name
- print "\n".join(newStrings)
-
- if len(obsoleteStrings):
- print "\n---- %s OBSOLETE STRINGS ---\n" % name
- print "\n".join(obsoleteStrings)
-
- if len(troubleStrings):
- print "\n---- %s TROUBLE STRINGS ---\n" % name
-
- for source, diff in sorted(troubleStrings, lambda a,b: cmp(b[1], a[1])):
- print "%3d. %s " % (diff, codecs.encode(source, 'utf-8'))
- print " %s " % codecs.encode(localizedStrings.strings[source], 'utf-8')
-
- print "\n"
-
- def mergeReport(self, sourceStrings, translation):
- name = self.name
- updatedStrings = []
- ignoredStrings = []
-
- for source in sourceStrings.strings:
- sourceEnum = enumerateStringVariables(source)
- if sourceEnum in translation.strings:
- targetEnum = translation.strings[sourceEnum]
- target = denumerateStringVariables(targetEnum)
- if source not in self.strings or target != self.strings[source]:
- updatedStrings.append(source)
- else:
- ignoredStrings.append(source)
-
- print "\n", "=" * 80
- print self.path
- print "%d newly translated strings and %d untranslated strings" \
- % (len(updatedStrings), len(ignoredStrings))
- print "=" * 80
-
- if len(updatedStrings):
- print "\n---- %s NEWLY TRANSLATED STRINGS ---\n" % name
- print "\n".join(updatedStrings)
-
- if len(ignoredStrings):
- print "\n---- %s UNTRANSLATED STRINGS ---\n" % name
- print "\n".join(ignoredStrings)
-
- def __makePath(self, path=".", suffix=""):
- fileName = "Localizable%s.strings" % (suffix)
- return os.path.abspath(os.path.join(path, fileName))
-
- def __parse(self):
- lastIdentical = False
- lastComment = None
- for line in openWithProperEncoding(self.path):
- m = reString.search(line)
- if m:
- source = m.groups()[0]
- target = m.groups()[2]
- self.strings[source] = target
- if lastComment:
- self.comments[source] = lastComment
- lastComment = None
- if lastIdentical:
- lastIdentical = False
- else:
- m = reComment.search(line)
- if m:
- comment = m.groups()[0].strip()
- if comment != defaultComment:
- lastComment = comment
-
- def __compare(self, other, compareStrings=False):
- for source, target in self.strings.iteritems():
- if source in other.strings:
- target = other.strings[source]
- if compareStrings and target == source:
- yield source
- else:
- yield source
-
- def __compareSizes(self, other):
- for source, target in self.strings.iteritems():
- if source in other.strings:
- target = other.strings[source]
- ratio = float(len(target)) / len(source)
- diff = len(target) - len(source)
- if ratio > 1.3 and diff > 5:
- yield (source, diff)
-
-###################################################################################################
-
-class Translation(object):
- def __init__(self, name):
- self.name = name
- self.path = None
- self.strings = {}
- self.translated = {}
- self.comments = {}
-
- def open(self, path=".", suffix=""):
- filePath = self.__makePath(path, suffix)
- if os.path.isfile(filePath):
- self.__parse(filePath)
-
- def save(self, path=None, suffix="", sourceMap=None):
- text = self.generate(sourceMap)
- if text:
- if path:
- filePath = self.__makePath(path, suffix)
- else:
- filePath = self.path
-
- print "***** Saving %s" % filePath
- #print codecs.encode(text, 'utf-8')
-
- f = codecs.open(filePath, 'w', 'utf-16')
- f.write(text)
- f.close()
-
- def generate(self, sourceMap=None):
- lines = []
-
- global xmlFormat
- prefix = xmlFormat['prefix']
-
- lines.append('<?xml version="1.0" encoding="utf-16"?>')
- lines.append('<%sexternal>' % prefix)
- lines.append(' <meta>')
- if xmlFormat['appName']:
- lines.append(' <appName>%s</appName>' % xmlFormat['appName'])
- lines.append(' <date>%s</date>' % datetime.datetime.now().strftime('%Y%m%d'))
- lines.append(' <locale>%s</locale>' % self.name)
- lines.append(' </meta>')
-
- for sourceFileName, sourceFileStrings in self.__invertSourceMap(sourceMap):
- lines.append(" <!-- %s -->" % sourceFileName)
- for source in sourceFileStrings:
- target = self.strings[source]
-
- lines.append(" <entry>")
- lines.append(" <%ssource>%s</%ssource>" % (prefix, escape(source), prefix))
-
- if source in self.translated:
- lines.append(" <%sxtarget>%s</%sxtarget>" % (prefix, escape(target), prefix))
- else:
- lines.append(" <%starget>%s</%starget>" % (prefix, escape(target), prefix))
-
- if source in self.comments:
- lines.append(" <%sdescription>%s</%sdescription>"
- % (prefix, escape(self.comments[source]), prefix))
-
- lines.append(" </entry>")
-
- lines.append('</%sexternal>' % prefix)
-
- return "\n".join(lines)
-
- def __makePath(self, path=".", suffix=""):
- fileName = "%s%s.xml" % (self.name, suffix)
- return os.path.abspath(os.path.join(path, fileName))
-
- def __parse(self, filePath):
- self.path = filePath
-
- global xmlFormat
- prefix = xmlFormat['prefix']
-
- document = minidom.parse(filePath)
- for entry in document.documentElement.childNodes:
- if entry.nodeType == 1:
- source = None
- target = None
- translated = False
-
- sources = entry.getElementsByTagName("%ssource" % prefix)
- if len(sources):
- source = sources[0]
- source = source.childNodes[0].data
-
- targets = entry.getElementsByTagName("%sxtarget" % prefix)
- if not len(targets):
- targets = entry.getElementsByTagName("%starget" % prefix)
- translated = True
-
- if len(targets):
- target = targets[0]
- target = target.childNodes[0].data
-
- if source and target:
- self.strings[source] = target
- if translated:
- self.translated[source] = True
-
- def __invertSourceMap(self, sourceMap):
- sourceFileMap = {}
-
- for sourceEnum in self.strings:
- source = denumerateStringVariables(sourceEnum)
- if source in sourceMap:
- sourcePaths = sourceMap[source]
- for sourcePath in sourcePaths:
- if sourcePath not in sourceFileMap:
- sourceFileMap[sourcePath] = []
- sourceFileMap[sourcePath].append(sourceEnum)
- break
-
- for sourceName, sourceFileStrings in sourceFileMap.iteritems():
- sourceFileStrings.sort()
-
- keys = sourceFileMap.keys()
- keys.sort()
-
- for key in keys:
- yield key, sourceFileMap[key]
-
-###################################################################################################
-## Helpers
-
-def openProjects(projectDirPaths, sourceLocaleName):
- for projectDirPath in projectDirPaths:
- yield XcodeProject(projectDirPath, sourceLocaleName)
-
-def openWithProperEncoding(path):
- if not os.path.isfile(path):
- return []
-
- try:
- f = codecs.open(path, 'r', 'utf-16')
- lines = f.read().splitlines()
- f.close()
- except UnicodeError,exc:
- f = codecs.open(path, 'r', 'utf-8')
- lines = f.read().splitlines()
- f.close()
-
- return lines
-
-def enumerateStringVariables(s):
- i = 1
- for var in reVariable.findall(s):
- s = s.replace("%%%s" % var, "%%%d$%s" % (i, var), 1)
- i += 1
- return s
-
-def denumerateStringVariables(s):
- for var in reEnumeratedVariable.findall(s):
- s = s.replace(var, "%")
- return s
-
-###################################################################################################
-## Main
-
-def parseOptions():
- parser = optparse.OptionParser(usage)
- parser.set_defaults(locale="en", focus=None, build=False, merge=False, diff=False,
- verbose=False, dryrun=False, appName="", prefix="")
-
- parser.add_option("-l", "--locale", dest="locale", type="str",
- help = "The name of your source locale. The default is 'en'.")
-
- parser.add_option("-f", "--focus", dest="focus", type="str",
- help = "The name of the locale to operate on, excluding all others.")
-
- parser.add_option("-v", "--verbose", dest="verbose", action="store_true",
- help = "Verbose reporting of activity.")
-
- parser.add_option("-r", "--dryrun", dest="dryrun", action="store_true",
- help = "Print the output of files instead of saving them.")
-
- parser.add_option("-b", "--build", dest="build", action="store_true",
- help = "Runs genstrings on each source file in each project.")
-
- parser.add_option("-d", "--diff", dest="diff", action="store_true",
- help="Generates a diff of each locale against the source locale. Each locale's diff will be stored in a file in the working directory named <locale>.xml.")
-
- parser.add_option("-m", "--merge", dest="merge", action="store_true",
- help="Merges strings from the <locale>.xml file in the working directory back into the Localized.strings files in each locale.")
-
- parser.add_option("-p", "--prefix", dest="prefix", type="str",
- help="The prefix to use on the xml tags.")
-
- parser.add_option("-a", "--appname", dest="appName", type="str",
- help="The name of the application to include in the xml metadata.")
-
- options, arguments = parser.parse_args()
- paths = ["."] if not len(arguments) else arguments
- if not options.merge:
- options.diff = True
-
- return options, paths
-
-def main():
- options, projectPaths = parseOptions()
- projectPaths = [os.path.abspath(os.path.expanduser(path)) for path in projectPaths]
-
- global xmlFormat
- xmlFormat['prefix'] = options.prefix
- xmlFormat['appName'] = options.appName
-
- projects = list(openProjects(projectPaths, options.locale))
-
- if options.build:
- print "******* Generating strings *******"
- generateProjects(projects)
- print ""
-
- if options.merge:
- print "******* Merging *******"
- mergeProjects(projects, options.locale, options.focus, options.verbose, options.dryrun)
- print ""
-
- if options.diff:
- print "******* Diffing *******"
- diffProjects(projects, options.locale, options.focus, options.verbose, options.dryrun)
- print ""
-
-if __name__ == "__main__":
- main()
View
0  extensions/ignoreme
No changes.
View
3  project.dev
@@ -1,3 +0,0 @@
-
-name = "Three20"
-description = "Three20 iPhone library"
View
28 samples/Core/TTCoreDemo/Classes/AppDelegate.h
@@ -1,28 +0,0 @@
-//
-// Copyright 2009-2011 Facebook
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-@class PlaygroundViewController;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////
-@interface AppDelegate : NSObject <UIApplicationDelegate> {
- UIWindow* _window;
- PlaygroundViewController* _controller;
-}
-
-@end
-
View
50 samples/Core/TTCoreDemo/Classes/AppDelegate.m
@@ -1,50 +0,0 @@
-//
-// Copyright 2009-2011 Facebook
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-#import "AppDelegate.h"
-
-// View Controllers
-#import "PlaygroundViewController.h"
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////
-@implementation AppDelegate
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-- (void)applicationDidFinishLaunching:(UIApplication*)application {
- _window = [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 320, 480)];
- _window.backgroundColor = [UIColor whiteColor];
-
- _controller = [[PlaygroundViewController alloc] init];
- [_window addSubview:_controller.view];
-
- [_window makeKeyAndVisible];
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-- (void) dealloc {
- TT_RELEASE_SAFELY(_window);
- TT_RELEASE_SAFELY(_controller);
-
- [super dealloc];
-}
-
-
-@end
View
22 samples/Core/TTCoreDemo/Classes/PlaygroundViewController.h
@@ -1,22 +0,0 @@
-//
-// Copyright 2009-2011 Facebook
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-
-@interface PlaygroundViewController : UIViewController {
- UIScrollView* _scrollView;
-}
-
-@end
View
200 samples/Core/TTCoreDemo/Classes/PlaygroundViewController.m
@@ -1,200 +0,0 @@
-//
-// Copyright 2009-2011 Facebook
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-#import "PlaygroundViewController.h"
-
-#import <Three20Core/NSDataAdditions.h>
-
-static const CGFloat kFramePadding = 10;
-static const CGFloat kElementSpacing = 5;
-static const CGFloat kGroupSpacing = 10;
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////////////////////////////
-@implementation PlaygroundViewController
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-- (CGFloat) addHeader:(NSString*)text yOffset:(CGFloat)yOffset {
- UILabel* label = [[UILabel alloc] initWithFrame:CGRectZero];
- label.text = text;
- label.font = [UIFont systemFontOfSize:20];
- label.numberOfLines = 0;
-
- CGRect frame = label.frame;
- frame.origin.x = kFramePadding;
- frame.origin.y = yOffset;
- frame.size.width = 320 - kFramePadding * 2;
- frame.size.height = [text sizeWithFont:label.font
- constrainedToSize:CGSizeMake(frame.size.width, 10000)].height;
- label.frame = frame;
-
- [_scrollView addSubview:label];
-
- yOffset += label.frame.size.height + kElementSpacing;
-
- TT_RELEASE_SAFELY(label);
-
- return yOffset;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-- (CGFloat) addText:(NSString*)text yOffset:(CGFloat)yOffset {
- UILabel* label = [[UILabel alloc] initWithFrame:CGRectZero];
- label.text = text;
- label.numberOfLines = 0;
-
- CGRect frame = label.frame;
- frame.origin.x = kFramePadding;
- frame.origin.y = yOffset;
- frame.size.width = 320 - kFramePadding * 2;
- frame.size.height = [text sizeWithFont:label.font
- constrainedToSize:CGSizeMake(frame.size.width, 10000)].height;
- label.frame = frame;
-
- [_scrollView addSubview:label];
-
- yOffset += label.frame.size.height + kElementSpacing;
-
- TT_RELEASE_SAFELY(label);
-
- return yOffset;
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-- (void) loadView {
- [super loadView];
-
- _scrollView = [[UIScrollView alloc] initWithFrame:self.view.bounds];
- _scrollView.autoresizingMask =
- UIViewAutoresizingFlexibleWidth
- | UIViewAutoresizingFlexibleHeight;
-
- [self.view addSubview:_scrollView];
-
- CGFloat yOffset = kFramePadding;
-
- yOffset = [self addHeader:NSLocalizedString(@"TTDebug", @"") yOffset:yOffset];
-
- {
- UIButton* button = [UIButton buttonWithType:UIButtonTypeRoundedRect];
- [button setTitle:NSLocalizedString(@"Debug test", @"") forState:UIControlStateNormal];
- [button addTarget: self
- action: @selector(debugTestAction)
- forControlEvents: UIControlEventTouchUpInside];
- [button sizeToFit];
-
- CGRect frame = button.frame;
- frame.origin.x = kFramePadding;
- frame.origin.y = yOffset;
- button.frame = frame;
-
- [_scrollView addSubview:button];
-
- yOffset += frame.size.height;
- }
-
- yOffset += kGroupSpacing;
-
- yOffset = [self addHeader:NSLocalizedString(@"TTGlobalCoreLocale", @"") yOffset:yOffset];
- yOffset = [self addText:[NSString stringWithFormat:NSLocalizedString(@"Current locale: %@", @""),
- [TTCurrentLocale()
- displayNameForKey:NSLocaleIdentifier
- value:[TTCurrentLocale() localeIdentifier]]]
- yOffset:yOffset];
- yOffset += kGroupSpacing;
-
- yOffset = [self addHeader:NSLocalizedString(@"TTGlobalCorePaths", @"") yOffset:yOffset];
- yOffset = [self addText:[NSString stringWithFormat:NSLocalizedString(@"Bundle path: %@", @""),
- TTPathForBundleResource(@"Icon.png")]
- yOffset:yOffset];
- yOffset = [self addText:[NSString stringWithFormat:NSLocalizedString(@"Document path: %@", @""),
- TTPathForDocumentsResource(@"document.pdf")]
- yOffset:yOffset];
- yOffset += kGroupSpacing;
-
- yOffset = [self addHeader:NSLocalizedString(@"NSDataAdditions", @"") yOffset:yOffset];
- yOffset = [self addText:[NSString stringWithFormat:NSLocalizedString(@"MD5 Hash of \"Three20\": %@", @""),
- [[@"Three20" dataUsingEncoding:NSUTF8StringEncoding] md5Hash]]
- yOffset:yOffset];
- yOffset += kGroupSpacing;
-
- [_scrollView setContentSize:CGSizeMake(320, yOffset)];
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-- (void) viewDidUnload {
- [super viewDidUnload];
-
- TT_RELEASE_SAFELY(_scrollView);
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-- (void) viewDidAppear:(BOOL)animated {
- [super viewDidAppear:animated];
-
- [_scrollView flashScrollIndicators];
-}
-
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-- (void) debugTestAction {
-#ifdef DEBUG
- NSLog(@"Three20 debug logging is currently...ON");
-#else
- NSLog(@"Three20 debug logging is currently...OFF");
-#endif
-
- // This will print the current method name.
- TTDPRINTMETHODNAME();
-
- TTDPRINT(@"Showing TTDPRINT.");
- TTDPRINT(@"-----------------");
- TTDPRINT(@"Showing TTD log levels <= %d", TTMAXLOGLEVEL);
- TTDERROR(@"This is TTDERROR, level %d.", TTLOGLEVEL_ERROR);
- TTDWARNING(@"This is TTDWARNING, level %d.", TTLOGLEVEL_WARNING);
- TTDINFO(@"This is TTDINFO, level %d.", TTLOGLEVEL_INFO);
-
- TTDPRINT(@"");
- TTDPRINT(@"Showing TTDCONDITIONLOG.");
- TTDPRINT(@"------------------------");
- TTDCONDITIONLOG(true, @"This will always display because the condition is \"true\"");
- TTDCONDITIONLOG(false, @"This will never display because the condition is \"false\"");
- TTDCONDITIONLOG(rand()%2, @"This will randomly display because the condition is \"rand()%2\"");
-
- TTDPRINT(@"");
- TTDPRINT(@"Showing TTDASSERT.");
- TTDPRINT(@"------------------");
- // Should do nothing at all.
- TTDASSERT(true);
-
- // This will jump you into the debugger in the simulator.
- // Note that this isn't a crash! Simply the equivalent of setting
- // a breakpoint in the debugger, but programmatically. These TTDASSERTs
- // will be completely stripped away from your final product, assuming
- // you don't declare the DEBUG preprocessor macro (and you shouldn't in
- // your final product).
- TTDASSERT(false);
-}
-
-
-@end
View
23 samples/Core/TTCoreDemo/Configurations/App.xcconfig
@@ -1,23 +0,0 @@
-//
-// Copyright 2009-2011 Facebook
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-#include "../../common/Configurations/App.xcconfig"
-#include "../../common/Configurations/Libraries.xcconfig"
-#include "RelPath.xcconfig"
-
-BASE_PRODUCT_NAME = TTCoreDemo
-PRODUCT_NAME = $(BASE_PRODUCT_NAME)
-BUILD_LIBRARY_VERSION = 1.0
View
18 samples/Core/TTCoreDemo/Configurations/Project.xcconfig
@@ -1,18 +0,0 @@
-//
-// Copyright 2009-2011 Facebook
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-#include "../../common/Configurations/Project.xcconfig"
-#include "RelPath.xcconfig"
View
17 samples/Core/TTCoreDemo/Configurations/RelPath.xcconfig
@@ -1,17 +0,0 @@
-//
-// Copyright 2009-2011 Facebook
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-REPO_ROOT_PATH = $(SRCROOT)/../../..
View
22 samples/Core/TTCoreDemo/Configurations/UnitTests.xcconfig
@@ -1,22 +0,0 @@
-//
-// Copyright 2009-2011 Facebook
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,