diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-11-17 01:58:25 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-11-17 01:58:25 +0000 |
| commit | 3043ded6406ce8bb06392b2c6351eb7596658d11 (patch) | |
| tree | 7b8976d506d1033a7e628a1a12c9ef7e0b24f5eb /macosx/plugins/DFSound | |
| parent | ac860b2d845ab7c90a7388de026cc63074791350 (diff) | |
| download | pcsxr-3043ded6406ce8bb06392b2c6351eb7596658d11.tar.gz | |
First steps for localization support for Mac OS X/Cocoa, including:
Localizable.strings files for each plug-in.
Try to get localizable string from a c string (see Pcsxr_locale_text in main.m).
Each Mac plug-in now has a Principal class declaration in their Info.plist
Also updated the memory card extensions
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72361 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/plugins/DFSound')
| -rw-r--r-- | macosx/plugins/DFSound/English.lproj/Localizable.strings | 12 | ||||
| -rw-r--r-- | macosx/plugins/DFSound/Info copy.plist | 2 | ||||
| -rw-r--r-- | macosx/plugins/DFSound/Info.plist | 2 | ||||
| -rw-r--r-- | macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj | 25 | ||||
| -rw-r--r-- | macosx/plugins/DFSound/macsrc/PluginController.m | 10 |
5 files changed, 44 insertions, 7 deletions
diff --git a/macosx/plugins/DFSound/English.lproj/Localizable.strings b/macosx/plugins/DFSound/English.lproj/Localizable.strings new file mode 100644 index 00000000..fe252941 --- /dev/null +++ b/macosx/plugins/DFSound/English.lproj/Localizable.strings @@ -0,0 +1,12 @@ +/* + Localizable.strings + PeopsSPU + + Created by C.W. Betts on 11/16/11. + Copyright 2011 __MyCompanyName__. All rights reserved. + */ + +"SDL Sound" = "SDL Sound"; +"OpenAL Sound" = "OpenAL Sound"; +"Mac OS X Sound" = "Mac OS X Sound"; +"P.E.Op.S. Sound Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n" = "P.E.Op.S. Sound Driver V1.7\nCoded by Pete Bernert and the P.E.Op.S. team\n"; diff --git a/macosx/plugins/DFSound/Info copy.plist b/macosx/plugins/DFSound/Info copy.plist index a79ae416..8d4fbc1e 100644 --- a/macosx/plugins/DFSound/Info copy.plist +++ b/macosx/plugins/DFSound/Info copy.plist @@ -18,5 +18,7 @@ <string>PSPU</string> <key>CFBundleVersion</key> <string>1.19</string> + <key>NSPrincipalClass</key> + <string>NetSfPeopsALPluginController</string> </dict> </plist> diff --git a/macosx/plugins/DFSound/Info.plist b/macosx/plugins/DFSound/Info.plist index 2c4710f6..64b041c5 100644 --- a/macosx/plugins/DFSound/Info.plist +++ b/macosx/plugins/DFSound/Info.plist @@ -18,5 +18,7 @@ <string>PSPU</string> <key>CFBundleVersion</key> <string>1.19</string> + <key>NSPrincipalClass</key> + <string>NetSfPeopsSPUPluginController</string> </dict> </plist> diff --git a/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj b/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj index b84d61d6..1413c89d 100644 --- a/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj +++ b/macosx/plugins/DFSound/PeopsSPU.xcodeproj/project.pbxproj @@ -14,6 +14,8 @@ 2B7B2BD1072DAE5D007F0C35 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2B7B2BD0072DAE5D007F0C35 /* AppKit.framework */; }; 2B7B2BE9072DB1B6007F0C35 /* NamedSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B7B2BE7072DB1B6007F0C35 /* NamedSlider.m */; }; 2BFF7F3E0715D2E00061278A /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2BFF7F3D0715D2E00061278A /* Carbon.framework */; }; + 552E4CB41474735100FB231F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 552E4CB71474735100FB231F /* Localizable.strings */; }; + 552E4CB51474735100FB231F /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 552E4CB71474735100FB231F /* Localizable.strings */; }; 5599693813AFCD2900B0216B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8D5B49A704867FD3000E48DA /* InfoPlist.strings */; }; 5599693A13AFCD2900B0216B /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2B4F99F7077B0CE4004E36BA /* Credits.rtf */; }; 5599693C13AFCD2900B0216B /* PluginController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B7B2B92072D9BE6007F0C35 /* PluginController.m */; }; @@ -69,6 +71,7 @@ 2B7B2BE7072DB1B6007F0C35 /* NamedSlider.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; name = NamedSlider.m; path = macsrc/NamedSlider.m; sourceTree = "<group>"; }; 2BFF7F3D0715D2E00061278A /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; }; 5517C065136217DE00706CCF /* externals.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = externals.c; path = ../../../plugins/dfsound/externals.c; sourceTree = SOURCE_ROOT; }; + 552E4CB61474735100FB231F /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = "<group>"; }; 5599692713AFCCC600B0216B /* openal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = openal.c; path = ../../../plugins/dfsound/openal.c; sourceTree = SOURCE_ROOT; }; 5599695E13AFCD2900B0216B /* PeopsAL.psxplugin */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PeopsAL.psxplugin; sourceTree = BUILT_PRODUCTS_DIR; }; 5599696E13AFCE1D00B0216B /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; @@ -205,6 +208,7 @@ 55C8AB0C146DCD0E005ACCCB /* Info copy.plist */, 2B4F99F7077B0CE4004E36BA /* Credits.rtf */, 8D5B49A704867FD3000E48DA /* InfoPlist.strings */, + 552E4CB71474735100FB231F /* Localizable.strings */, 28F0C3A014651EFA00A90285 /* NetSfPeopsSpuPluginMain.xib */, ); name = Resources; @@ -458,6 +462,7 @@ 5599693813AFCD2900B0216B /* InfoPlist.strings in Resources */, 5599693A13AFCD2900B0216B /* Credits.rtf in Resources */, 28F0C3A314651EFA00A90285 /* NetSfPeopsSpuPluginMain.xib in Resources */, + 552E4CB51474735100FB231F /* Localizable.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -468,6 +473,7 @@ 8D5B49A804867FD3000E48DA /* InfoPlist.strings in Resources */, 2B4F99F9077B0CE4004E36BA /* Credits.rtf in Resources */, 28F0C3A214651EFA00A90285 /* NetSfPeopsSpuPluginMain.xib in Resources */, + 552E4CB41474735100FB231F /* Localizable.strings in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -540,6 +546,14 @@ name = Credits.rtf; sourceTree = "<group>"; }; + 552E4CB71474735100FB231F /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + 552E4CB61474735100FB231F /* English */, + ); + name = Localizable.strings; + sourceTree = "<group>"; + }; 8D5B49A704867FD3000E48DA /* InfoPlist.strings */ = { isa = PBXVariantGroup; children = ( @@ -559,13 +573,13 @@ GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( + "PCSXRPLUG=ALsound", _MACOSX, USEOPENAL, ); HEADER_SEARCH_PATHS = ( src/, ../../../plugins/dfsound, - ../Common/SDL/include, ); INFOPLIST_FILE = "Info copy.plist"; INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; @@ -582,18 +596,16 @@ GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = s; GCC_PREPROCESSOR_DEFINITIONS = ( + "PCSXRPLUG=ALsound", _MACOSX, USEOPENAL, ); HEADER_SEARCH_PATHS = ( src/, ../../../plugins/dfsound, - ../Common/SDL/include, ); INFOPLIST_FILE = "Info copy.plist"; INSTALL_PATH = "$(USER_LIBRARY_DIR)/Playstation Emulator Plugins"; - OTHER_CFLAGS = ""; - OTHER_CPLUSPLUSFLAGS = "$(OTHER_CFLAGS)"; PRODUCT_NAME = PeopsAL; SYMROOT = ../../build; WRAPPER_EXTENSION = psxplugin; @@ -608,6 +620,7 @@ GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( + "PCSXRPLUG=SPUSound", _MACOSX, USESDL, SDL_JOYSTICK_DISABLED, @@ -629,10 +642,10 @@ isa = XCBuildConfiguration; buildSettings = { COPY_PHASE_STRIP = YES; - DEBUGGING_SYMBOLS = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_OPTIMIZATION_LEVEL = s; GCC_PREPROCESSOR_DEFINITIONS = ( + "PCSXRPLUG=SPUSound", _MACOSX, USESDL, SDL_JOYSTICK_DISABLED, @@ -660,7 +673,6 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx10.6; SYMROOT = ../../build; - WARNING_CFLAGS = "-Wall"; }; name = Debug; }; @@ -672,7 +684,6 @@ MACOSX_DEPLOYMENT_TARGET = 10.6; SDKROOT = macosx10.6; SYMROOT = ../../build; - WARNING_CFLAGS = "-Wall"; }; name = Release; }; diff --git a/macosx/plugins/DFSound/macsrc/PluginController.m b/macosx/plugins/DFSound/macsrc/PluginController.m index 590ae034..9c2197cc 100644 --- a/macosx/plugins/DFSound/macsrc/PluginController.m +++ b/macosx/plugins/DFSound/macsrc/PluginController.m @@ -152,6 +152,7 @@ void ReadConfig(void) - (void)awakeFromNib { + //TODO: localize these, probably in their own table [interpolValue setStrings:[NSArray arrayWithObjects: @"(No Interpolation)", @"(Simple Interpolation)", @@ -175,3 +176,12 @@ void ReadConfig(void) } @end + +char* PLUGLOC(char *toloc) +{ + NSBundle *mainBundle = [NSBundle bundleForClass:[PluginController class]]; + NSString *origString = nil, *transString = nil; + origString = [NSString stringWithCString:toloc encoding:NSUTF8StringEncoding]; + transString = [mainBundle localizedStringForKey:origString value:nil table:nil]; + return [transString cStringUsingEncoding:NSUTF8StringEncoding]; +} |
