├── LocalizationManager.app └── Contents │ ├── Info.plist │ ├── MacOS │ └── LocalizationManager │ ├── PkgInfo │ ├── Resources │ ├── Base.lproj │ │ └── MainMenu.nib │ └── MasterViewController.nib │ └── _CodeSignature │ └── CodeResources ├── LocalizationManager.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── LocalizationManager.xccheckout └── xcuserdata │ └── francescacorsini.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── LocalizationManager.xcscheme │ └── xcschememanagement.plist ├── LocalizationManager ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ └── MainMenu.xib ├── Helper │ ├── IRTextFieldDrag.h │ ├── IRTextFieldDrag.m │ ├── NSScrollView+MultiLine.h │ ├── NSScrollView+MultiLine.m │ ├── StringsHandler.h │ └── StringsHandler.m ├── Info.plist ├── MasterViewController.h ├── MasterViewController.m ├── MasterViewController.xib └── main.m ├── README.md └── screen.png /LocalizationManager.app/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildMachineOSBuild 6 | 14D136 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | LocalizationManager 11 | CFBundleIdentifier 12 | wurth.LocalizationManager 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | LocalizationManager 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | DTCompiler 26 | com.apple.compilers.llvm.clang.1_0 27 | DTPlatformBuild 28 | 6D1002 29 | DTPlatformVersion 30 | GM 31 | DTSDKBuild 32 | 14D125 33 | DTSDKName 34 | macosx10.10 35 | DTXcode 36 | 0631 37 | DTXcodeBuild 38 | 6D1002 39 | LSMinimumSystemVersion 40 | 10.9 41 | NSHumanReadableCopyright 42 | Copyright © 2015 Francesca Corsini. All rights reserved. 43 | NSMainNibFile 44 | MainMenu 45 | NSPrincipalClass 46 | NSApplication 47 | 48 | 49 | -------------------------------------------------------------------------------- /LocalizationManager.app/Contents/MacOS/LocalizationManager: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LigeiaRowena/LocalizationManager/51c0978ef4e50e9fff507684589663aa61bde09d/LocalizationManager.app/Contents/MacOS/LocalizationManager -------------------------------------------------------------------------------- /LocalizationManager.app/Contents/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /LocalizationManager.app/Contents/Resources/Base.lproj/MainMenu.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LigeiaRowena/LocalizationManager/51c0978ef4e50e9fff507684589663aa61bde09d/LocalizationManager.app/Contents/Resources/Base.lproj/MainMenu.nib -------------------------------------------------------------------------------- /LocalizationManager.app/Contents/Resources/MasterViewController.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LigeiaRowena/LocalizationManager/51c0978ef4e50e9fff507684589663aa61bde09d/LocalizationManager.app/Contents/Resources/MasterViewController.nib -------------------------------------------------------------------------------- /LocalizationManager.app/Contents/_CodeSignature/CodeResources: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | files 6 | 7 | Resources/Base.lproj/MainMenu.nib 8 | 9 | hash 10 | 11 | zl/fk871xruLPRa9zKhAcvmki0Q= 12 | 13 | optional 14 | 15 | 16 | Resources/MasterViewController.nib 17 | 18 | tmV2tqbfbECTn39vGTLdFBb+NKE= 19 | 20 | 21 | files2 22 | 23 | Resources/Base.lproj/MainMenu.nib 24 | 25 | hash 26 | 27 | zl/fk871xruLPRa9zKhAcvmki0Q= 28 | 29 | optional 30 | 31 | 32 | Resources/MasterViewController.nib 33 | 34 | tmV2tqbfbECTn39vGTLdFBb+NKE= 35 | 36 | 37 | rules 38 | 39 | ^Resources/ 40 | 41 | ^Resources/.*\.lproj/ 42 | 43 | optional 44 | 45 | weight 46 | 1000 47 | 48 | ^Resources/.*\.lproj/locversion.plist$ 49 | 50 | omit 51 | 52 | weight 53 | 1100 54 | 55 | ^version.plist$ 56 | 57 | 58 | rules2 59 | 60 | .*\.dSYM($|/) 61 | 62 | weight 63 | 11 64 | 65 | ^(.*/)?\.DS_Store$ 66 | 67 | omit 68 | 69 | weight 70 | 2000 71 | 72 | ^(Frameworks|SharedFrameworks|PlugIns|Plug-ins|XPCServices|Helpers|MacOS|Library/(Automator|Spotlight|LoginItems))/ 73 | 74 | nested 75 | 76 | weight 77 | 10 78 | 79 | ^.* 80 | 81 | ^Info\.plist$ 82 | 83 | omit 84 | 85 | weight 86 | 20 87 | 88 | ^PkgInfo$ 89 | 90 | omit 91 | 92 | weight 93 | 20 94 | 95 | ^Resources/ 96 | 97 | weight 98 | 20 99 | 100 | ^Resources/.*\.lproj/ 101 | 102 | optional 103 | 104 | weight 105 | 1000 106 | 107 | ^Resources/.*\.lproj/locversion.plist$ 108 | 109 | omit 110 | 111 | weight 112 | 1100 113 | 114 | ^[^/]+$ 115 | 116 | nested 117 | 118 | weight 119 | 10 120 | 121 | ^embedded\.provisionprofile$ 122 | 123 | weight 124 | 20 125 | 126 | ^version\.plist$ 127 | 128 | weight 129 | 20 130 | 131 | 132 | 133 | 134 | -------------------------------------------------------------------------------- /LocalizationManager.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | DF3808561B05F14E00F74195 /* StringsHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = DF3808551B05F14E00F74195 /* StringsHandler.m */; }; 11 | DF3808591B05F18A00F74195 /* NSScrollView+MultiLine.m in Sources */ = {isa = PBXBuildFile; fileRef = DF3808581B05F18A00F74195 /* NSScrollView+MultiLine.m */; }; 12 | DFF415C11B050555006A4954 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = DFF415C01B050555006A4954 /* AppDelegate.m */; }; 13 | DFF415C31B050555006A4954 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = DFF415C21B050555006A4954 /* main.m */; }; 14 | DFF415C81B050555006A4954 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = DFF415C61B050555006A4954 /* MainMenu.xib */; }; 15 | DFF415E01B0505B6006A4954 /* MasterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DFF415DE1B0505B6006A4954 /* MasterViewController.m */; }; 16 | DFF415E11B0505B6006A4954 /* MasterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = DFF415DF1B0505B6006A4954 /* MasterViewController.xib */; }; 17 | DFF415E51B050603006A4954 /* IRTextFieldDrag.m in Sources */ = {isa = PBXBuildFile; fileRef = DFF415E41B050603006A4954 /* IRTextFieldDrag.m */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXFileReference section */ 21 | DF3808541B05F14E00F74195 /* StringsHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StringsHandler.h; sourceTree = ""; }; 22 | DF3808551B05F14E00F74195 /* StringsHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StringsHandler.m; sourceTree = ""; }; 23 | DF3808571B05F18A00F74195 /* NSScrollView+MultiLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSScrollView+MultiLine.h"; sourceTree = ""; }; 24 | DF3808581B05F18A00F74195 /* NSScrollView+MultiLine.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSScrollView+MultiLine.m"; sourceTree = ""; }; 25 | DFF415BA1B050555006A4954 /* LocalizationManager.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LocalizationManager.app; sourceTree = BUILT_PRODUCTS_DIR; }; 26 | DFF415BE1B050555006A4954 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 27 | DFF415BF1B050555006A4954 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 28 | DFF415C01B050555006A4954 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 29 | DFF415C21B050555006A4954 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 30 | DFF415C71B050555006A4954 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; 31 | DFF415DD1B0505B6006A4954 /* MasterViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MasterViewController.h; sourceTree = ""; }; 32 | DFF415DE1B0505B6006A4954 /* MasterViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MasterViewController.m; sourceTree = ""; }; 33 | DFF415DF1B0505B6006A4954 /* MasterViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MasterViewController.xib; sourceTree = ""; }; 34 | DFF415E31B050603006A4954 /* IRTextFieldDrag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRTextFieldDrag.h; sourceTree = ""; }; 35 | DFF415E41B050603006A4954 /* IRTextFieldDrag.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IRTextFieldDrag.m; sourceTree = ""; }; 36 | /* End PBXFileReference section */ 37 | 38 | /* Begin PBXFrameworksBuildPhase section */ 39 | DFF415B71B050555006A4954 /* Frameworks */ = { 40 | isa = PBXFrameworksBuildPhase; 41 | buildActionMask = 2147483647; 42 | files = ( 43 | ); 44 | runOnlyForDeploymentPostprocessing = 0; 45 | }; 46 | /* End PBXFrameworksBuildPhase section */ 47 | 48 | /* Begin PBXGroup section */ 49 | DF38085A1B05F18C00F74195 /* GUI */ = { 50 | isa = PBXGroup; 51 | children = ( 52 | DFF415BF1B050555006A4954 /* AppDelegate.h */, 53 | DFF415C01B050555006A4954 /* AppDelegate.m */, 54 | DFF415C61B050555006A4954 /* MainMenu.xib */, 55 | DFF415DD1B0505B6006A4954 /* MasterViewController.h */, 56 | DFF415DE1B0505B6006A4954 /* MasterViewController.m */, 57 | DFF415DF1B0505B6006A4954 /* MasterViewController.xib */, 58 | ); 59 | name = GUI; 60 | sourceTree = ""; 61 | }; 62 | DFF415B11B050555006A4954 = { 63 | isa = PBXGroup; 64 | children = ( 65 | DFF415BC1B050555006A4954 /* LocalizationManager */, 66 | DFF415BB1B050555006A4954 /* Products */, 67 | ); 68 | sourceTree = ""; 69 | }; 70 | DFF415BB1B050555006A4954 /* Products */ = { 71 | isa = PBXGroup; 72 | children = ( 73 | DFF415BA1B050555006A4954 /* LocalizationManager.app */, 74 | ); 75 | name = Products; 76 | sourceTree = ""; 77 | }; 78 | DFF415BC1B050555006A4954 /* LocalizationManager */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | DF38085A1B05F18C00F74195 /* GUI */, 82 | DFF415E21B050603006A4954 /* Helper */, 83 | DFF415BD1B050555006A4954 /* Supporting Files */, 84 | ); 85 | path = LocalizationManager; 86 | sourceTree = ""; 87 | }; 88 | DFF415BD1B050555006A4954 /* Supporting Files */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | DFF415BE1B050555006A4954 /* Info.plist */, 92 | DFF415C21B050555006A4954 /* main.m */, 93 | ); 94 | name = "Supporting Files"; 95 | sourceTree = ""; 96 | }; 97 | DFF415E21B050603006A4954 /* Helper */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | DF3808571B05F18A00F74195 /* NSScrollView+MultiLine.h */, 101 | DF3808581B05F18A00F74195 /* NSScrollView+MultiLine.m */, 102 | DFF415E31B050603006A4954 /* IRTextFieldDrag.h */, 103 | DFF415E41B050603006A4954 /* IRTextFieldDrag.m */, 104 | DF3808541B05F14E00F74195 /* StringsHandler.h */, 105 | DF3808551B05F14E00F74195 /* StringsHandler.m */, 106 | ); 107 | path = Helper; 108 | sourceTree = ""; 109 | }; 110 | /* End PBXGroup section */ 111 | 112 | /* Begin PBXNativeTarget section */ 113 | DFF415B91B050555006A4954 /* LocalizationManager */ = { 114 | isa = PBXNativeTarget; 115 | buildConfigurationList = DFF415D71B050555006A4954 /* Build configuration list for PBXNativeTarget "LocalizationManager" */; 116 | buildPhases = ( 117 | DFF415B61B050555006A4954 /* Sources */, 118 | DFF415B71B050555006A4954 /* Frameworks */, 119 | DFF415B81B050555006A4954 /* Resources */, 120 | ); 121 | buildRules = ( 122 | ); 123 | dependencies = ( 124 | ); 125 | name = LocalizationManager; 126 | productName = LocalizationManager; 127 | productReference = DFF415BA1B050555006A4954 /* LocalizationManager.app */; 128 | productType = "com.apple.product-type.application"; 129 | }; 130 | /* End PBXNativeTarget section */ 131 | 132 | /* Begin PBXProject section */ 133 | DFF415B21B050555006A4954 /* Project object */ = { 134 | isa = PBXProject; 135 | attributes = { 136 | LastUpgradeCheck = 0630; 137 | ORGANIZATIONNAME = "Francesca Corsini"; 138 | TargetAttributes = { 139 | DFF415B91B050555006A4954 = { 140 | CreatedOnToolsVersion = 6.3.1; 141 | }; 142 | }; 143 | }; 144 | buildConfigurationList = DFF415B51B050555006A4954 /* Build configuration list for PBXProject "LocalizationManager" */; 145 | compatibilityVersion = "Xcode 3.2"; 146 | developmentRegion = English; 147 | hasScannedForEncodings = 0; 148 | knownRegions = ( 149 | en, 150 | Base, 151 | ); 152 | mainGroup = DFF415B11B050555006A4954; 153 | productRefGroup = DFF415BB1B050555006A4954 /* Products */; 154 | projectDirPath = ""; 155 | projectRoot = ""; 156 | targets = ( 157 | DFF415B91B050555006A4954 /* LocalizationManager */, 158 | ); 159 | }; 160 | /* End PBXProject section */ 161 | 162 | /* Begin PBXResourcesBuildPhase section */ 163 | DFF415B81B050555006A4954 /* Resources */ = { 164 | isa = PBXResourcesBuildPhase; 165 | buildActionMask = 2147483647; 166 | files = ( 167 | DFF415E11B0505B6006A4954 /* MasterViewController.xib in Resources */, 168 | DFF415C81B050555006A4954 /* MainMenu.xib in Resources */, 169 | ); 170 | runOnlyForDeploymentPostprocessing = 0; 171 | }; 172 | /* End PBXResourcesBuildPhase section */ 173 | 174 | /* Begin PBXSourcesBuildPhase section */ 175 | DFF415B61B050555006A4954 /* Sources */ = { 176 | isa = PBXSourcesBuildPhase; 177 | buildActionMask = 2147483647; 178 | files = ( 179 | DFF415C31B050555006A4954 /* main.m in Sources */, 180 | DFF415E01B0505B6006A4954 /* MasterViewController.m in Sources */, 181 | DF3808591B05F18A00F74195 /* NSScrollView+MultiLine.m in Sources */, 182 | DF3808561B05F14E00F74195 /* StringsHandler.m in Sources */, 183 | DFF415E51B050603006A4954 /* IRTextFieldDrag.m in Sources */, 184 | DFF415C11B050555006A4954 /* AppDelegate.m in Sources */, 185 | ); 186 | runOnlyForDeploymentPostprocessing = 0; 187 | }; 188 | /* End PBXSourcesBuildPhase section */ 189 | 190 | /* Begin PBXVariantGroup section */ 191 | DFF415C61B050555006A4954 /* MainMenu.xib */ = { 192 | isa = PBXVariantGroup; 193 | children = ( 194 | DFF415C71B050555006A4954 /* Base */, 195 | ); 196 | name = MainMenu.xib; 197 | sourceTree = ""; 198 | }; 199 | /* End PBXVariantGroup section */ 200 | 201 | /* Begin XCBuildConfiguration section */ 202 | DFF415D51B050555006A4954 /* Debug */ = { 203 | isa = XCBuildConfiguration; 204 | buildSettings = { 205 | ALWAYS_SEARCH_USER_PATHS = NO; 206 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 207 | CLANG_CXX_LIBRARY = "libc++"; 208 | CLANG_ENABLE_MODULES = YES; 209 | CLANG_ENABLE_OBJC_ARC = YES; 210 | CLANG_WARN_BOOL_CONVERSION = YES; 211 | CLANG_WARN_CONSTANT_CONVERSION = YES; 212 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 213 | CLANG_WARN_EMPTY_BODY = YES; 214 | CLANG_WARN_ENUM_CONVERSION = YES; 215 | CLANG_WARN_INT_CONVERSION = YES; 216 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 217 | CLANG_WARN_UNREACHABLE_CODE = YES; 218 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 219 | CODE_SIGN_IDENTITY = "-"; 220 | COPY_PHASE_STRIP = NO; 221 | DEBUG_INFORMATION_FORMAT = dwarf; 222 | ENABLE_STRICT_OBJC_MSGSEND = YES; 223 | GCC_C_LANGUAGE_STANDARD = gnu99; 224 | GCC_DYNAMIC_NO_PIC = NO; 225 | GCC_NO_COMMON_BLOCKS = YES; 226 | GCC_OPTIMIZATION_LEVEL = 0; 227 | GCC_PREPROCESSOR_DEFINITIONS = ( 228 | "DEBUG=1", 229 | "$(inherited)", 230 | ); 231 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 232 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 233 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 234 | GCC_WARN_UNDECLARED_SELECTOR = YES; 235 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 236 | GCC_WARN_UNUSED_FUNCTION = YES; 237 | GCC_WARN_UNUSED_VARIABLE = YES; 238 | MACOSX_DEPLOYMENT_TARGET = 10.10; 239 | MTL_ENABLE_DEBUG_INFO = YES; 240 | ONLY_ACTIVE_ARCH = YES; 241 | SDKROOT = macosx; 242 | }; 243 | name = Debug; 244 | }; 245 | DFF415D61B050555006A4954 /* Release */ = { 246 | isa = XCBuildConfiguration; 247 | buildSettings = { 248 | ALWAYS_SEARCH_USER_PATHS = NO; 249 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 250 | CLANG_CXX_LIBRARY = "libc++"; 251 | CLANG_ENABLE_MODULES = YES; 252 | CLANG_ENABLE_OBJC_ARC = YES; 253 | CLANG_WARN_BOOL_CONVERSION = YES; 254 | CLANG_WARN_CONSTANT_CONVERSION = YES; 255 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 256 | CLANG_WARN_EMPTY_BODY = YES; 257 | CLANG_WARN_ENUM_CONVERSION = YES; 258 | CLANG_WARN_INT_CONVERSION = YES; 259 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | CODE_SIGN_IDENTITY = "-"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | MACOSX_DEPLOYMENT_TARGET = 10.10; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = macosx; 278 | }; 279 | name = Release; 280 | }; 281 | DFF415D81B050555006A4954 /* Debug */ = { 282 | isa = XCBuildConfiguration; 283 | buildSettings = { 284 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 285 | COMBINE_HIDPI_IMAGES = YES; 286 | INFOPLIST_FILE = LocalizationManager/Info.plist; 287 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 288 | MACOSX_DEPLOYMENT_TARGET = 10.9; 289 | PRODUCT_NAME = "$(TARGET_NAME)"; 290 | }; 291 | name = Debug; 292 | }; 293 | DFF415D91B050555006A4954 /* Release */ = { 294 | isa = XCBuildConfiguration; 295 | buildSettings = { 296 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 297 | COMBINE_HIDPI_IMAGES = YES; 298 | INFOPLIST_FILE = LocalizationManager/Info.plist; 299 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; 300 | MACOSX_DEPLOYMENT_TARGET = 10.9; 301 | PRODUCT_NAME = "$(TARGET_NAME)"; 302 | }; 303 | name = Release; 304 | }; 305 | /* End XCBuildConfiguration section */ 306 | 307 | /* Begin XCConfigurationList section */ 308 | DFF415B51B050555006A4954 /* Build configuration list for PBXProject "LocalizationManager" */ = { 309 | isa = XCConfigurationList; 310 | buildConfigurations = ( 311 | DFF415D51B050555006A4954 /* Debug */, 312 | DFF415D61B050555006A4954 /* Release */, 313 | ); 314 | defaultConfigurationIsVisible = 0; 315 | defaultConfigurationName = Release; 316 | }; 317 | DFF415D71B050555006A4954 /* Build configuration list for PBXNativeTarget "LocalizationManager" */ = { 318 | isa = XCConfigurationList; 319 | buildConfigurations = ( 320 | DFF415D81B050555006A4954 /* Debug */, 321 | DFF415D91B050555006A4954 /* Release */, 322 | ); 323 | defaultConfigurationIsVisible = 0; 324 | defaultConfigurationName = Release; 325 | }; 326 | /* End XCConfigurationList section */ 327 | }; 328 | rootObject = DFF415B21B050555006A4954 /* Project object */; 329 | } 330 | -------------------------------------------------------------------------------- /LocalizationManager.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LocalizationManager.xcodeproj/project.xcworkspace/xcshareddata/LocalizationManager.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | A17D127E-0302-4443-A541-95102389C483 9 | IDESourceControlProjectName 10 | LocalizationManager 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 60FCDAFD25CAD54ED824BF24EA70D602BAF859AB 14 | https://github.com/LigeiaRowena/LocalizationManager.git 15 | 16 | IDESourceControlProjectPath 17 | LocalizationManager.xcodeproj 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 60FCDAFD25CAD54ED824BF24EA70D602BAF859AB 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/LigeiaRowena/LocalizationManager.git 25 | IDESourceControlProjectVersion 26 | 111 27 | IDESourceControlProjectWCCIdentifier 28 | 60FCDAFD25CAD54ED824BF24EA70D602BAF859AB 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 60FCDAFD25CAD54ED824BF24EA70D602BAF859AB 36 | IDESourceControlWCCName 37 | LocalizationManager 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /LocalizationManager.xcodeproj/xcuserdata/francescacorsini.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /LocalizationManager.xcodeproj/xcuserdata/francescacorsini.xcuserdatad/xcschemes/LocalizationManager.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 29 | 35 | 36 | 37 | 38 | 39 | 44 | 45 | 47 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 65 | 66 | 75 | 77 | 83 | 84 | 85 | 86 | 87 | 88 | 94 | 96 | 102 | 103 | 104 | 105 | 107 | 108 | 111 | 112 | 113 | -------------------------------------------------------------------------------- /LocalizationManager.xcodeproj/xcuserdata/francescacorsini.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | LocalizationManager.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | DFF415B91B050555006A4954 16 | 17 | primary 18 | 19 | 20 | DFF415CC1B050555006A4954 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LocalizationManager/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // HelloWorld 4 | // 5 | // Created by Francesca Corsini on 05/03/15. 6 | // Copyright (c) 2015 Francesca Corsini. All rights reserved. 7 | // 8 | 9 | #import 10 | #include "MasterViewController.h" 11 | 12 | @interface AppDelegate : NSObject 13 | 14 | @property (weak) IBOutlet NSWindow *window; 15 | @property (nonatomic, strong) MasterViewController *masterViewController; 16 | 17 | @end 18 | 19 | -------------------------------------------------------------------------------- /LocalizationManager/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // HelloWorld 4 | // 5 | // Created by Francesca Corsini on 05/03/15. 6 | // Copyright (c) 2015 Francesca Corsini. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | - (void)applicationDidFinishLaunching:(NSNotification *)aNotification 18 | { 19 | // add a contentView 20 | self.masterViewController = [[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil]; 21 | [self.window.contentView addSubview:self.masterViewController.view]; 22 | self.masterViewController.view.frame = ((NSView*)self.window.contentView).bounds; 23 | } 24 | 25 | - (void)applicationWillTerminate:(NSNotification *)aNotification { 26 | // Insert code here to tear down your application 27 | } 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /LocalizationManager/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | Default 540 | 541 | 542 | 543 | 544 | 545 | 546 | Left to Right 547 | 548 | 549 | 550 | 551 | 552 | 553 | Right to Left 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | Default 565 | 566 | 567 | 568 | 569 | 570 | 571 | Left to Right 572 | 573 | 574 | 575 | 576 | 577 | 578 | Right to Left 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | 628 | 629 | 630 | 631 | 632 | 633 | 634 | 635 | 636 | 637 | 638 | 639 | 640 | 641 | 642 | 643 | 644 | 645 | 646 | 647 | 648 | 649 | 650 | 651 | 652 | 653 | 654 | 655 | 656 | 657 | 658 | 659 | 660 | 661 | 662 | 663 | 664 | 665 | 666 | 667 | 668 | 669 | 670 | 671 | 672 | 673 | 674 | 675 | 676 | 677 | 678 | 679 | 680 | 681 | 682 | 683 | 684 | -------------------------------------------------------------------------------- /LocalizationManager/Helper/IRTextFieldDrag.h: -------------------------------------------------------------------------------- 1 | // 2 | // IRTextFieldDrag.h 3 | // iReSign 4 | // 5 | // Created by Esteban Bouza on 01/12/12. 6 | // 7 | 8 | #import 9 | @class IRTextFieldDrag; 10 | 11 | @protocol IRTextFieldDragDelegate 12 | - (void)performDragOperation:(NSString*)text textField:(IRTextFieldDrag*)textField; 13 | @optional 14 | - (void)draggingEntered:(IRTextFieldDrag*)textField; 15 | @end 16 | 17 | @interface IRTextFieldDrag : NSTextField 18 | 19 | @property (nonatomic, weak) IBOutlet id dragDelegate; 20 | 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /LocalizationManager/Helper/IRTextFieldDrag.m: -------------------------------------------------------------------------------- 1 | // 2 | // IRTextFieldDrag.m 3 | // iReSign 4 | // 5 | // Created by Esteban Bouza on 01/12/12. 6 | // 7 | 8 | #import "IRTextFieldDrag.h" 9 | 10 | @implementation IRTextFieldDrag 11 | 12 | - (void)awakeFromNib 13 | { 14 | // Registers the pasteboard types that the receiver will accept as the destination of an image-dragging session 15 | [self registerForDraggedTypes:@[NSFilenamesPboardType]]; 16 | } 17 | 18 | #pragma mark - NSDraggingDestination 19 | 20 | - (BOOL)performDragOperation:(id )sender 21 | { 22 | // Invoked after the released image has been removed from the screen, signaling the receiver to import the pasteboard data 23 | 24 | NSPasteboard *pboard = [sender draggingPasteboard]; 25 | 26 | if ([[pboard types] containsObject:NSURLPboardType]) 27 | { 28 | NSArray *files = [pboard propertyListForType:NSFilenamesPboardType]; 29 | if (files.count <= 0) 30 | return NO; 31 | 32 | self.stringValue = [files objectAtIndex:0]; 33 | 34 | if (self.dragDelegate != nil && [self.dragDelegate respondsToSelector:@selector(performDragOperation:textField:)]) 35 | [self.dragDelegate performDragOperation:self.stringValue textField:self]; 36 | } 37 | return YES; 38 | } 39 | 40 | - (NSDragOperation)draggingEntered:(id )sender 41 | { 42 | // Invoked when the dragged image enters destination bounds or frame; delegate returns dragging operation to perform 43 | 44 | if (!self.isEnabled) 45 | return NSDragOperationNone; 46 | 47 | NSPasteboard *pboard; 48 | NSDragOperation sourceDragMask; 49 | 50 | sourceDragMask = [sender draggingSourceOperationMask]; 51 | pboard = [sender draggingPasteboard]; 52 | 53 | if ([[pboard types] containsObject:NSColorPboardType] || [[pboard types] containsObject:NSFilenamesPboardType]) 54 | { 55 | if (sourceDragMask & NSDragOperationCopy) 56 | { 57 | if (self.dragDelegate != nil && [self.dragDelegate respondsToSelector:@selector(draggingEntered:)]) 58 | [self.dragDelegate draggingEntered:self]; 59 | return NSDragOperationCopy; 60 | } 61 | } 62 | 63 | return NSDragOperationNone; 64 | } 65 | 66 | 67 | @end 68 | -------------------------------------------------------------------------------- /LocalizationManager/Helper/NSScrollView+MultiLine.h: -------------------------------------------------------------------------------- 1 | 2 | 3 | #import 4 | 5 | @interface NSScrollView (MultiLine) 6 | 7 | - (void)appendStringValue:(NSString*)string; 8 | - (void)setStringValue:(NSString*)string; 9 | - (void)setStringValue:(NSString*)string color:(NSColor*)color range:(NSRange)range; 10 | - (void)setAttributedString:(NSAttributedString*)string; 11 | - (NSString*)getString; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /LocalizationManager/Helper/NSScrollView+MultiLine.m: -------------------------------------------------------------------------------- 1 | 2 | 3 | #import "NSScrollView+MultiLine.h" 4 | 5 | @implementation NSScrollView (MultiLine) 6 | 7 | - (void)appendStringValue:(NSString*)string 8 | { 9 | NSTextView *textfield = (NSTextView*)self.documentView; 10 | NSString *newValue = [textfield.textStorage.mutableString stringByAppendingFormat:@"\n%@", string]; 11 | [textfield setString:newValue]; 12 | } 13 | 14 | - (void)setStringValue:(NSString*)string 15 | { 16 | NSTextView *textfield = (NSTextView*)self.documentView; 17 | [textfield setString:string]; 18 | } 19 | 20 | - (void)setStringValue:(NSString*)string color:(NSColor*)color range:(NSRange)range 21 | { 22 | NSTextView *textfield = (NSTextView*)self.documentView; 23 | [textfield setRichText:YES]; 24 | [textfield setString:string]; 25 | [textfield setTextColor:color range:range]; 26 | } 27 | 28 | - (void)setAttributedString:(NSAttributedString*)string 29 | { 30 | NSTextView *textfield = (NSTextView*)self.documentView; 31 | [[textfield textStorage] appendAttributedString:string]; 32 | } 33 | 34 | - (NSString*)getString 35 | { 36 | NSTextView *textfield = (NSTextView*)self.documentView; 37 | return textfield.string; 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /LocalizationManager/Helper/StringsHandler.h: -------------------------------------------------------------------------------- 1 | // 2 | // StringsHandler.h 3 | // LocalizationManager 4 | // 5 | // Created by Francesca Corsini on 15/05/15. 6 | // Copyright (c) 2015 Francesca Corsini. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef void(^SuccessBlock)(); 12 | typedef void(^FailedBlock)(NSString*); 13 | 14 | 15 | @interface StringsHandler : NSObject 16 | { 17 | // blocks 18 | SuccessBlock successBlock; 19 | FailedBlock failedBlock; 20 | } 21 | 22 | // the array with the strings from the master .strings file 23 | @property (nonatomic, strong) NSMutableArray *masterStrings; 24 | 25 | // the array with the strings from the secondary .strings file 26 | @property (nonatomic, strong) NSMutableArray *secondaryStrings; 27 | 28 | // the array with all the strings from 2 .strings file 29 | @property (nonatomic, strong) NSMutableArray *mergedStrings; 30 | 31 | // the array with only the differences between the 2 .strings file 32 | @property (nonatomic, strong) NSMutableArray *diffStrings; 33 | 34 | // init 35 | + (instancetype)sharedInstance; 36 | 37 | // save .strings 38 | - (void)saveStrings:(NSString*)strings isDiff:(BOOL)isDiff success:(SuccessBlock)success failed:(FailedBlock)failed; 39 | 40 | // diff .strings 41 | - (void)diffStringsWithSuccess:(SuccessBlock)success; 42 | 43 | // merge .strings 44 | - (void)mergeStringsWithSuccess:(SuccessBlock)success; 45 | 46 | // parsing .strings 47 | - (NSAttributedString*)parseArrayToAttributeString:(NSArray*)array; 48 | - (NSString*)parseArrayToStrings:(NSArray*)array; 49 | - (void)parseMasterStringsFromPath:(NSString*)path; 50 | - (void)parseSecondaryStringsFromPath:(NSString*)path; 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /LocalizationManager/Helper/StringsHandler.m: -------------------------------------------------------------------------------- 1 | // 2 | // StringsHandler.m 3 | // LocalizationManager 4 | // 5 | // Created by Francesca Corsini on 15/05/15. 6 | // Copyright (c) 2015 Francesca Corsini. All rights reserved. 7 | // 8 | 9 | #import "StringsHandler.h" 10 | #import 11 | 12 | @implementation StringsHandler 13 | 14 | #pragma mark - Init 15 | 16 | static StringsHandler *istance; 17 | 18 | + (instancetype)sharedInstance 19 | { 20 | @synchronized(self) 21 | { 22 | if (istance == nil) 23 | { 24 | istance = [[StringsHandler alloc] init]; 25 | return istance; 26 | } 27 | } 28 | return istance; 29 | } 30 | 31 | - (id)init 32 | { 33 | self = [super init]; 34 | if (self) { 35 | self.masterStrings = @[].mutableCopy; 36 | self.secondaryStrings = @[].mutableCopy; 37 | self.mergedStrings = @[].mutableCopy; 38 | self.diffStrings = @[].mutableCopy; 39 | } 40 | return self; 41 | } 42 | 43 | - (NSString*)removeSlantingDoubleQuoteFromString:(NSString*)string 44 | { 45 | NSMutableString *str = @"".mutableCopy; 46 | NSRange range = NSMakeRange(0, 1); 47 | for (__unused int i = (int)range.location; range.location < [string length]; range.location++) 48 | { 49 | NSString *substring = [string substringWithRange:range]; 50 | if ([substring isEqualToString:@"”"] || [substring isEqualToString:@"“"]) 51 | [str appendString:@"\""]; 52 | else 53 | [str appendString:substring]; 54 | } 55 | 56 | return str; 57 | } 58 | 59 | #pragma mark - Save .strings 60 | 61 | - (void)saveStrings:(NSString*)strings isDiff:(BOOL)isDiff success:(SuccessBlock)success failed:(FailedBlock)failed 62 | { 63 | successBlock = success; 64 | failedBlock = failed; 65 | 66 | 67 | if ([self.masterStrings count] == 0 || [self.secondaryStrings count] == 0) 68 | { 69 | if (failedBlock) 70 | failedBlock(@"Please insert a proper master .strings file and a proper secondary .strings file."); 71 | return; 72 | } 73 | 74 | // delete eventually slanting double quote 75 | NSString *standardString = [self removeSlantingDoubleQuoteFromString:strings]; 76 | 77 | 78 | // detect if strings is regular 79 | if (![self detectRegularStrings:standardString]) 80 | { 81 | if (failedBlock) 82 | failedBlock(@"You edited a not valid .strings file. Please try again."); 83 | return; 84 | } 85 | 86 | // save mergedStrings 87 | [self.diffStrings removeAllObjects]; 88 | [self.mergedStrings removeAllObjects]; 89 | if (isDiff) 90 | { 91 | self.diffStrings = [self parseStrings:standardString].mutableCopy; 92 | [self.mergedStrings addObjectsFromArray:self.secondaryStrings]; 93 | [self.mergedStrings addObjectsFromArray:self.diffStrings]; 94 | } 95 | else 96 | self.mergedStrings = [self parseStrings:standardString].mutableCopy; 97 | 98 | // sort mergedStrings by alphabetic order 99 | self.mergedStrings = [self.mergedStrings sortedArrayUsingComparator: ^(id id_1, id id_2) { 100 | NSDictionary *d1 = (NSDictionary*) id_1; 101 | NSDictionary *d2 = (NSDictionary*) id_2; 102 | NSString *s1 = [[d1 allKeys] firstObject]; 103 | NSString *s2 = [[d2 allKeys] firstObject]; 104 | return [s1 compare: s2]; 105 | }].mutableCopy; 106 | 107 | // sort diffStrings by alphabetic order 108 | self.diffStrings = [self.diffStrings sortedArrayUsingComparator: ^(id id_1, id id_2) { 109 | NSDictionary *d1 = (NSDictionary*) id_1; 110 | NSDictionary *d2 = (NSDictionary*) id_2; 111 | NSString *s1 = [[d1 allKeys] firstObject]; 112 | NSString *s2 = [[d2 allKeys] firstObject]; 113 | return [s1 compare: s2]; 114 | }].mutableCopy; 115 | 116 | 117 | if (successBlock) 118 | successBlock(); 119 | } 120 | 121 | #pragma mark - Diff .strings 122 | 123 | - (void)diffStringsWithSuccess:(SuccessBlock)success 124 | { 125 | successBlock = success; 126 | 127 | if ([self.masterStrings count] == 0 || [self.secondaryStrings count] == 0) 128 | { 129 | return; 130 | } 131 | 132 | // init diffStrings 133 | [self.diffStrings removeAllObjects]; 134 | 135 | // add missing fields of secondaryStrings to diffStrings 136 | [self.masterStrings enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 137 | NSDictionary *dict = (NSDictionary*)obj; 138 | BOOL contains = [self array:self.secondaryStrings containsField:[[dict allKeys] firstObject]]; 139 | // add dict with value @"" 140 | if (!contains) 141 | { 142 | [self.diffStrings addObject:@{[[dict allKeys] firstObject] : @""}]; 143 | //[self.diffStrings addObject:@{[[dict allKeys] firstObject] : [[dict allValues] firstObject]}]; 144 | } 145 | }]; 146 | 147 | // sort by alphabetic order 148 | self.diffStrings = [self.diffStrings sortedArrayUsingComparator: ^(id id_1, id id_2) { 149 | NSDictionary *d1 = (NSDictionary*) id_1; 150 | NSDictionary *d2 = (NSDictionary*) id_2; 151 | NSString *s1 = [[d1 allKeys] firstObject]; 152 | NSString *s2 = [[d2 allKeys] firstObject]; 153 | return [s1 compare: s2]; 154 | }].mutableCopy; 155 | 156 | if (successBlock) 157 | successBlock(); 158 | } 159 | 160 | #pragma mark - Merge .strings 161 | 162 | - (void)mergeStringsWithSuccess:(SuccessBlock)success 163 | { 164 | successBlock = success; 165 | 166 | if ([self.masterStrings count] == 0 || [self.secondaryStrings count] == 0) 167 | { 168 | return; 169 | } 170 | 171 | 172 | // init mergedStrings 173 | [self.mergedStrings removeAllObjects]; 174 | [self.mergedStrings addObjectsFromArray:self.secondaryStrings]; 175 | 176 | // add missing fields to mergedStrings 177 | [self.masterStrings enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 178 | NSDictionary *dict = (NSDictionary*)obj; 179 | BOOL contains = [self array:self.mergedStrings containsField:[[dict allKeys] firstObject]]; 180 | // add dict with value @"" 181 | if (!contains) 182 | { 183 | [self.mergedStrings addObject:@{[[dict allKeys] firstObject] : @""}]; 184 | } 185 | }]; 186 | 187 | // sort by alphabetic order 188 | self.mergedStrings = [self.mergedStrings sortedArrayUsingComparator: ^(id id_1, id id_2) { 189 | NSDictionary *d1 = (NSDictionary*) id_1; 190 | NSDictionary *d2 = (NSDictionary*) id_2; 191 | NSString *s1 = [[d1 allKeys] firstObject]; 192 | NSString *s2 = [[d2 allKeys] firstObject]; 193 | return [s1 compare: s2]; 194 | }].mutableCopy; 195 | 196 | if (successBlock) 197 | successBlock(); 198 | } 199 | 200 | - (BOOL)array:(NSArray*)array containsField:(NSString*)field 201 | { 202 | __block BOOL contains = NO; 203 | [array enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 204 | NSDictionary *dict = (NSDictionary*)obj; 205 | if ([field isEqualToString:[[dict allKeys] firstObject]]) 206 | contains = YES; 207 | }]; 208 | 209 | return contains; 210 | } 211 | 212 | #pragma mark - Parsing .strings 213 | 214 | - (NSAttributedString*)parseArrayToAttributeString:(NSArray*)array 215 | { 216 | NSMutableAttributedString *attrString = [[NSMutableAttributedString alloc] initWithString:@""];; 217 | [array enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 218 | NSDictionary *dict = (NSDictionary*)obj; 219 | NSString *field = [[dict allKeys] firstObject]; 220 | [attrString.mutableString appendString:[NSString stringWithFormat:@"\"%@\"", field]]; 221 | [attrString.mutableString appendString:@" = "]; 222 | NSString *value = [[dict allValues] firstObject]; 223 | [attrString.mutableString appendString:[NSString stringWithFormat:@"\"%@\"", value]]; 224 | [attrString.mutableString appendString:@";"]; 225 | [attrString.mutableString appendString:@"\n"]; 226 | }]; 227 | 228 | NSDictionary *dict = @{ 229 | NSForegroundColorAttributeName : [NSColor redColor], 230 | NSFontAttributeName : [NSFont fontWithName:@"Helvetica" size:14] 231 | }; 232 | 233 | NSRange range = NSMakeRange(0, 1); 234 | for (__unused int i = (int)range.location; range.location < [attrString.string length]; range.location++) 235 | { 236 | NSString *substring = [attrString.string substringWithRange:range]; 237 | if ([substring isEqualToString:@"\"\""]) 238 | { 239 | [attrString setAttributes:dict range:range]; 240 | } 241 | } 242 | 243 | 244 | // NSRange range = [attrString.string rangeOfString:@"\"\""]; 245 | // [attrString setAttributes:dict range:range]; 246 | 247 | 248 | return attrString; 249 | } 250 | 251 | - (NSString*)parseArrayToStrings:(NSArray*)array 252 | { 253 | NSMutableString *string = @"".mutableCopy; 254 | [array enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 255 | NSDictionary *dict = (NSDictionary*)obj; 256 | NSString *field = [[dict allKeys] firstObject]; 257 | [string appendString:[NSString stringWithFormat:@"\"%@\"", field]]; 258 | [string appendString:@" = "]; 259 | NSString *value = [[dict allValues] firstObject]; 260 | [string appendString:[NSString stringWithFormat:@"\"%@\"", value]]; 261 | [string appendString:@";"]; 262 | [string appendString:@"\n"]; 263 | }]; 264 | 265 | return string; 266 | } 267 | 268 | - (void)parseMasterStringsFromPath:(NSString*)path 269 | { 270 | [self.masterStrings removeAllObjects]; 271 | self.masterStrings = [self parseStringsFromPath:path].mutableCopy; 272 | } 273 | 274 | - (void)parseSecondaryStringsFromPath:(NSString*)path 275 | { 276 | [self.secondaryStrings removeAllObjects]; 277 | self.secondaryStrings = [self parseStringsFromPath:path].mutableCopy; 278 | } 279 | 280 | - (BOOL)detectRegularStrings:(NSString*)strings 281 | { 282 | __block BOOL isRegular = YES; 283 | NSString *trimmedString = [strings stringByReplacingOccurrencesOfString:@"\n" withString:@""]; 284 | NSDictionary *dict; 285 | 286 | @try { 287 | dict = [trimmedString propertyListFromStringsFileFormat]; 288 | } 289 | @catch (NSException *exception) { 290 | return NO; 291 | } 292 | @finally { 293 | } 294 | 295 | 296 | /* 297 | 298 | NSArray *list = [trimmedString componentsSeparatedByString:@";"]; 299 | if ([list count] < 2) 300 | return NO; 301 | 302 | [list enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 303 | NSString *item = (NSString*)obj; 304 | NSArray *field = [item componentsSeparatedByString:@"="]; 305 | if ([field count] == 2) 306 | { 307 | for (NSString *string in field) 308 | { 309 | BOOL hasPrefix = ([string hasPrefix:@"\""]) || ([string hasPrefix:@"”"]); 310 | BOOL hasSuffix = ([string hasSuffix:@"\""]) || ([string hasSuffix:@"”"]); 311 | if (hasPrefix && hasSuffix) 312 | { 313 | NSLog(@"dfsdfsdfsdf"); 314 | } 315 | else 316 | { 317 | isRegular = NO; 318 | *stop = YES; 319 | } 320 | } 321 | } 322 | else 323 | { 324 | isRegular = NO; 325 | *stop = YES; 326 | } 327 | }]; 328 | */ 329 | 330 | 331 | 332 | return isRegular; 333 | } 334 | 335 | - (NSArray*)parseStringsFromPath:(NSString*)path 336 | { 337 | NSArray *array; 338 | NSMutableArray *arrayStrings = @[].mutableCopy; 339 | 340 | // take all the fields and values 341 | NSDictionary *dict = [NSDictionary dictionaryWithContentsOfFile:path]; 342 | [dict enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 343 | [arrayStrings addObject:@{key : obj}]; 344 | }]; 345 | 346 | // delete duplicate fields 347 | NSOrderedSet *orderedSet = [NSOrderedSet orderedSetWithArray:arrayStrings]; 348 | arrayStrings = [orderedSet array].mutableCopy; 349 | 350 | // sort by alphabetic order 351 | array = [arrayStrings sortedArrayUsingComparator: ^(id id_1, id id_2) { 352 | NSDictionary *d1 = (NSDictionary*) id_1; 353 | NSDictionary *d2 = (NSDictionary*) id_2; 354 | NSString *s1 = [[d1 allKeys] firstObject]; 355 | NSString *s2 = [[d2 allKeys] firstObject]; 356 | return [s1 compare: s2]; 357 | }]; 358 | 359 | return array; 360 | } 361 | 362 | - (NSArray*)parseStrings:(NSString*)strings 363 | { 364 | NSArray *array; 365 | NSMutableArray *arrayStrings = @[].mutableCopy; 366 | NSString *trimmedString = [strings stringByReplacingOccurrencesOfString:@"\n" withString:@""]; 367 | 368 | // take all the fields and values 369 | NSDictionary *dict = [trimmedString propertyListFromStringsFileFormat];; 370 | [dict enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { 371 | [arrayStrings addObject:@{key : obj}]; 372 | }]; 373 | 374 | // delete duplicate fields 375 | NSOrderedSet *orderedSet = [NSOrderedSet orderedSetWithArray:arrayStrings]; 376 | arrayStrings = [orderedSet array].mutableCopy; 377 | 378 | 379 | // sort by alphabetic order 380 | array = [arrayStrings sortedArrayUsingComparator: ^(id id_1, id id_2) { 381 | NSDictionary *d1 = (NSDictionary*) id_1; 382 | NSDictionary *d2 = (NSDictionary*) id_2; 383 | NSString *s1 = [[d1 allKeys] firstObject]; 384 | NSString *s2 = [[d2 allKeys] firstObject]; 385 | return [s1 compare: s2]; 386 | }]; 387 | 388 | 389 | return array; 390 | } 391 | 392 | @end 393 | -------------------------------------------------------------------------------- /LocalizationManager/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIconFile 10 | 11 | CFBundleIdentifier 12 | wurth.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1 25 | LSMinimumSystemVersion 26 | $(MACOSX_DEPLOYMENT_TARGET) 27 | NSHumanReadableCopyright 28 | Copyright © 2015 Francesca Corsini. All rights reserved. 29 | NSMainNibFile 30 | MainMenu 31 | NSPrincipalClass 32 | NSApplication 33 | 34 | 35 | -------------------------------------------------------------------------------- /LocalizationManager/MasterViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MasterViewController.h 3 | // HelloWorld 4 | // 5 | // Created by Francesca Corsini on 05/03/15. 6 | // Copyright (c) 2015 Francesca Corsini. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "IRTextFieldDrag.h" 11 | 12 | @interface MasterViewController : NSViewController 13 | 14 | @end 15 | -------------------------------------------------------------------------------- /LocalizationManager/MasterViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MasterViewController.m 3 | // HelloWorld 4 | // 5 | // Created by Francesca Corsini on 05/03/15. 6 | // Copyright (c) 2015 Francesca Corsini. All rights reserved. 7 | // 8 | 9 | #import "MasterViewController.h" 10 | #import "NSScrollView+MultiLine.h" 11 | #import "StringsHandler.h" 12 | #import "AppDelegate.h" 13 | 14 | @interface MasterViewController () 15 | 16 | @property (nonatomic, weak) IBOutlet IRTextFieldDrag *openMasterField; 17 | @property (nonatomic, weak) IBOutlet IRTextFieldDrag *openSecondaryField; 18 | @property (weak) IBOutlet NSScrollView *console; 19 | @property (weak) IBOutlet NSSegmentedControl *filterStrings; 20 | 21 | @end 22 | 23 | @implementation MasterViewController 24 | 25 | - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil 26 | { 27 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; 28 | if (self) { 29 | } 30 | return self; 31 | } 32 | 33 | - (void)loadView 34 | { 35 | [super loadView]; 36 | 37 | // set default value of the filter: show only diff strings 38 | [self.filterStrings setSelected:YES forSegment:0]; 39 | } 40 | 41 | 42 | #pragma mark - IRTextFieldDragDelegate 43 | 44 | - (void)draggingEntered:(IRTextFieldDrag*)textField 45 | { 46 | NSLog(@"draggingEntered..."); 47 | } 48 | 49 | - (void)performDragOperation:(NSString*)text textField:(IRTextFieldDrag*)textField 50 | { 51 | NSLog(@"performDragOperation..."); 52 | 53 | if (textField == self.openMasterField) 54 | { 55 | [[StringsHandler sharedInstance] parseMasterStringsFromPath:text]; 56 | [self filter:nil]; 57 | } 58 | 59 | else if (textField == self.openSecondaryField) 60 | { 61 | [[StringsHandler sharedInstance] parseSecondaryStringsFromPath:text]; 62 | [self filter:nil]; 63 | } 64 | } 65 | 66 | #pragma mark - Parsing .strings 67 | 68 | 69 | #pragma mark - Actions 70 | 71 | - (IBAction)tapOpenMaster:(id)sender 72 | { 73 | NSOpenPanel *opanel = [NSOpenPanel openPanel]; 74 | NSString *documentFolderPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; 75 | [opanel setDirectoryURL:[NSURL fileURLWithPath:documentFolderPath]]; 76 | [opanel setCanChooseFiles:TRUE]; 77 | [opanel setCanChooseDirectories:FALSE]; 78 | [opanel setAllowedFileTypes:@[@"strings"]]; 79 | [opanel setAllowedFileTypes:nil]; 80 | [opanel setPrompt:@"Open"]; 81 | [opanel setTitle:@"Open file"]; 82 | [opanel setMessage:@"Please select a path where to open file"]; 83 | if ([opanel runModal] == NSOKButton) 84 | { 85 | NSString* path = [[opanel URL] path]; 86 | [self.openMasterField setStringValue:path]; 87 | [[StringsHandler sharedInstance] parseMasterStringsFromPath:path]; 88 | [self filter:nil]; 89 | } 90 | } 91 | 92 | - (IBAction)tapOpenSecondary:(id)sender 93 | { 94 | NSOpenPanel *opanel = [NSOpenPanel openPanel]; 95 | NSString *documentFolderPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; 96 | [opanel setDirectoryURL:[NSURL fileURLWithPath:documentFolderPath]]; 97 | [opanel setCanChooseFiles:TRUE]; 98 | [opanel setCanChooseDirectories:FALSE]; 99 | [opanel setAllowedFileTypes:@[@"strings"]]; 100 | [opanel setAllowedFileTypes:nil]; 101 | [opanel setPrompt:@"Open"]; 102 | [opanel setTitle:@"Open file"]; 103 | [opanel setMessage:@"Please select a path where to open file"]; 104 | if ([opanel runModal] == NSOKButton) 105 | { 106 | NSString* path = [[opanel URL] path]; 107 | [self.openSecondaryField setStringValue:path]; 108 | [[StringsHandler sharedInstance] parseSecondaryStringsFromPath:path]; 109 | [self filter:nil]; 110 | } 111 | } 112 | 113 | - (IBAction)filter:(id)sender 114 | { 115 | // Filter by diff strings 116 | if (self.filterStrings.selectedSegment == 0) 117 | { 118 | [self showDiffStrings]; 119 | } 120 | 121 | // Filter by merged strings 122 | else if (self.filterStrings.selectedSegment == 1) 123 | { 124 | [self showMergedStrings]; 125 | } 126 | } 127 | 128 | - (void)showDiffStrings 129 | { 130 | // clean 131 | [self.console setStringValue:@""]; 132 | 133 | [[StringsHandler sharedInstance] diffStringsWithSuccess:^{ 134 | NSAttributedString *attrString = [[StringsHandler sharedInstance] parseArrayToAttributeString:[[StringsHandler sharedInstance] diffStrings]]; 135 | [self.console setAttributedString:attrString]; 136 | }]; 137 | } 138 | 139 | - (void)showMergedStrings 140 | { 141 | // clean 142 | [self.console setStringValue:@""]; 143 | 144 | [[StringsHandler sharedInstance] mergeStringsWithSuccess:^{ 145 | NSAttributedString *attrString = [[StringsHandler sharedInstance] parseArrayToAttributeString:[[StringsHandler sharedInstance] mergedStrings]]; 146 | [self.console setAttributedString:attrString]; 147 | }]; 148 | } 149 | 150 | - (IBAction)saveMerged:(id)sender 151 | { 152 | // resign as first responder the other controls 153 | AppDelegate *appDelegate = (AppDelegate *)[NSApp delegate]; 154 | [appDelegate.window makeFirstResponder: nil]; 155 | 156 | // save mergedStrings 157 | NSString *strings = [self.console getString]; 158 | [[StringsHandler sharedInstance] saveStrings:strings isDiff:(self.filterStrings.selectedSegment == 0) success:^{ 159 | NSString *stringToSave = [[StringsHandler sharedInstance] parseArrayToStrings:[[StringsHandler sharedInstance] mergedStrings]]; 160 | [self showSavePanel:stringToSave]; 161 | } failed:^(NSString *error){ 162 | [self showAlertOfKind:NSCriticalAlertStyle WithTitle:@"Error" AndMessage:error]; 163 | }]; 164 | } 165 | 166 | - (IBAction)saveDiffs:(id)sender 167 | { 168 | // resign as first responder the other controls 169 | AppDelegate *appDelegate = (AppDelegate *)[NSApp delegate]; 170 | [appDelegate.window makeFirstResponder: nil]; 171 | 172 | // select "Show diff strings" option 173 | [self.filterStrings setSelectedSegment:0]; 174 | [self showDiffStrings]; 175 | 176 | // save diffStrings 177 | NSString *strings = [self.console getString]; 178 | [[StringsHandler sharedInstance] saveStrings:strings isDiff:(self.filterStrings.selectedSegment == 0) success:^{ 179 | if ([[[StringsHandler sharedInstance] diffStrings] count] > 0) 180 | { 181 | NSString *stringToSave = [[StringsHandler sharedInstance] parseArrayToStrings:[[StringsHandler sharedInstance] diffStrings]]; 182 | [self showSavePanel:stringToSave]; 183 | } 184 | else 185 | [self showAlertOfKind:NSCriticalAlertStyle WithTitle:@"Error" AndMessage:@"Please select \"Show diff strings\" option!"]; 186 | 187 | } failed:^(NSString *error){ 188 | [self showAlertOfKind:NSCriticalAlertStyle WithTitle:@"Error" AndMessage:error]; 189 | }]; 190 | } 191 | 192 | 193 | - (void)showSavePanel:(NSString*)strings 194 | { 195 | NSSavePanel *spanel = [NSSavePanel savePanel]; 196 | NSString *documentFolderPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]; 197 | [spanel setDirectoryURL:[NSURL fileURLWithPath:documentFolderPath]]; 198 | [spanel setPrompt:@"Save"]; 199 | [spanel setTitle:@"Save file"]; 200 | [spanel setMessage:@"Please select a path where to save file"]; 201 | [spanel setAllowedFileTypes:@[@"strings"]]; 202 | if ([spanel runModal] == NSOKButton) 203 | { 204 | NSString* path = [[spanel URL] path]; 205 | NSError *err = nil; 206 | BOOL success = [strings writeToFile:path atomically:NO encoding:NSUTF8StringEncoding error:&err]; 207 | if (!success || err) 208 | { 209 | [NSApp presentError:err]; 210 | } 211 | } 212 | } 213 | 214 | - (IBAction)clearAll:(id)sender 215 | { 216 | [self.console setStringValue:@""]; 217 | [self.openMasterField setStringValue:@""]; 218 | [self.openSecondaryField setStringValue:@""]; 219 | [self.filterStrings setSelected:YES forSegment:0]; 220 | 221 | [[[StringsHandler sharedInstance] masterStrings] removeAllObjects]; 222 | [[[StringsHandler sharedInstance] secondaryStrings] removeAllObjects]; 223 | [[[StringsHandler sharedInstance] mergedStrings] removeAllObjects]; 224 | [[[StringsHandler sharedInstance] diffStrings] removeAllObjects]; 225 | } 226 | 227 | #pragma mark - Alert Methods 228 | 229 | - (void)showAlertOfKind:(NSAlertStyle)style WithTitle:(NSString *)title AndMessage:(NSString *)message 230 | { 231 | // Show a critical alert 232 | NSAlert *alert = [[NSAlert alloc] init]; 233 | [alert addButtonWithTitle:@"OK"]; 234 | [alert setMessageText:title]; 235 | [alert setInformativeText:message]; 236 | [alert setAlertStyle:style]; 237 | [alert runModal]; 238 | } 239 | 240 | @end 241 | -------------------------------------------------------------------------------- /LocalizationManager/MasterViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 80 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 129 | 130 | 131 | 132 | 133 | 134 | 145 | 146 | 147 | 148 | 149 | 150 | -------------------------------------------------------------------------------- /LocalizationManager/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LocalizationManager 4 | // 5 | // Created by Francesca Corsini on 14/05/15. 6 | // Copyright (c) 2015 Francesca Corsini. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, const char * argv[]) { 12 | return NSApplicationMain(argc, argv); 13 | } 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # LocalizationManager 2 | 3 | This is a OSX utility app to manage the localization .strings files. 4 | Main features: 5 | 6 | - Minimum OS: OS 10.9 7 | - ARC 8 | - Language used: Objective-C 9 | 10 | #INSTALLATION 11 | 12 | You can open the xcode project and build it or open directly the app. 13 | 14 | #MANAGING THE STRINGS FILES 15 | 16 | The app need a "master" strings file with all the strings, and a "secondary" strings file that needs to be filled. 17 | You have two kinds of views: 18 | - show only the diff strings between the two strings files 19 | - show the merged strings between the two strings files 20 | 21 | You can edit the displayed strings file, and then you can save it in two ways: 22 | - save only the diff strings between the two strings files 23 | - save the merged strings between the two strings files 24 | 25 | With the "Clear All" button you can reset and clean all the fields. 26 | 27 | Screen: 28 | 29 | ![alt text](https://github.com/LigeiaRowena/LocalizationManager/blob/master/screen.png "Screen") 30 | 31 | -------------------------------------------------------------------------------- /screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LigeiaRowena/LocalizationManager/51c0978ef4e50e9fff507684589663aa61bde09d/screen.png --------------------------------------------------------------------------------