[vlc-devel] [PATCH 2/2] [iOS]Add localization for External Display view

Gleb Pinigin gpinigin at gmail.com
Tue Feb 19 16:30:04 CET 2013


---
 Classes/MVLCMovieViewController.h      |   2 ++
 Classes/MVLCMovieViewController.m      |  10 +++++++++-
 Resources/MVLCMovieView~ipad.xib       |  31 ++++++++++++++++++++++++++++---
 Resources/MVLCMovieView~iphone.xib     |  30 ++++++++++++++++++++++++++++--
 Resources/en.lproj/Localizable.strings | Bin 3172 -> 3354 bytes
 Resources/ru.lproj/Localizable.strings | Bin 3272 -> 3466 bytes
 6 files changed, 67 insertions(+), 6 deletions(-)

diff --git a/Classes/MVLCMovieViewController.h b/Classes/MVLCMovieViewController.h
index fef92fd..4aff7b9 100644
--- a/Classes/MVLCMovieViewController.h
+++ b/Classes/MVLCMovieViewController.h
@@ -43,6 +43,8 @@
 @property (nonatomic, assign) BOOL hudVisibility;
 
 @property (nonatomic, retain) IBOutlet UIView *playingExternallyView;
+ at property (nonatomic, retain) IBOutlet UILabel *titleTvLabel;
+ at property (nonatomic, retain) IBOutlet UILabel *descriptionTvLabel;
 
 - (IBAction)toggleHUDVisibility:(id)sender;
 - (IBAction)togglePlayOrPause:(id)sender;
diff --git a/Classes/MVLCMovieViewController.m b/Classes/MVLCMovieViewController.m
index 2efc4e0..3a37278 100644
--- a/Classes/MVLCMovieViewController.m
+++ b/Classes/MVLCMovieViewController.m
@@ -43,6 +43,7 @@ static NSString * MVLCMovieViewControllerHUDFadeOutAnimation = @"MVLCMovieViewCo
 @implementation MVLCMovieViewController
 @synthesize movieView=_movieView, file=_file, url=_url, positionSlider=_positionSlider, playOrPauseButton=_playOrPauseButton, volumeSlider=_volumeSlider, HUDView=_HUDView, topView=_topView, remainingTimeLabel=_remainingTimeLabel, trackSelectorButton=_trackSelectorButton, doneBarButton=_doneBarButton;
 @synthesize externalWindow = _externalWindow, playingExternallyView = _playingExternallyView;
+ at synthesize titleTvLabel = _titleTvLabel, descriptionTvLabel = _descriptionTvLabel;
 
 
 - (id)init {
@@ -75,6 +76,9 @@ static NSString * MVLCMovieViewControllerHUDFadeOutAnimation = @"MVLCMovieViewCo
     if ([self hasExternalDisplay]) {
         [self showOnExternalDisplay];
     }
+    self.titleTvLabel.text = NSLocalizedString(@"TV Connected", @"TV Connected title");
+    self.descriptionTvLabel.text = NSLocalizedString(@"The video is playing on TV", @"TV Connected description");
+    
 //    [self setHudVisibility:NO]; // This triggers a bug in the transition animation on the iPhone
 }
 
@@ -134,6 +138,8 @@ static NSString * MVLCMovieViewControllerHUDFadeOutAnimation = @"MVLCMovieViewCo
 }
 
 - (void)dealloc {
+    [[NSNotificationCenter defaultCenter] removeObserver:self];
+    
     [_topView release];
     [_HUDView release];
     [_playOrPauseButton release];
@@ -143,8 +149,10 @@ static NSString * MVLCMovieViewControllerHUDFadeOutAnimation = @"MVLCMovieViewCo
     [_url release];
     [_file release];
     [_externalWindow release];
+    
     [_playingExternallyView release];
-    [[NSNotificationCenter defaultCenter] removeObserver:self];
+    [_titleTvLabel release];
+    [_descriptionTvLabel release];
     
     [super dealloc];
 }
diff --git a/Resources/MVLCMovieView~ipad.xib b/Resources/MVLCMovieView~ipad.xib
index 11345ca..500ef43 100644
--- a/Resources/MVLCMovieView~ipad.xib
+++ b/Resources/MVLCMovieView~ipad.xib
@@ -2,7 +2,7 @@
 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="8.00">
 	<data>
 		<int key="IBDocument.SystemTarget">1296</int>
-		<string key="IBDocument.SystemVersion">12C60</string>
+		<string key="IBDocument.SystemVersion">12C3104</string>
 		<string key="IBDocument.InterfaceBuilderVersion">3084</string>
 		<string key="IBDocument.AppKitVersion">1187.34</string>
 		<string key="IBDocument.HIToolboxVersion">625.00</string>
@@ -301,7 +301,6 @@
 								<string key="NSFrame">{{78, 57}, {274, 23}}</string>
 								<reference key="NSSuperview" ref="248075313"/>
 								<reference key="NSWindow"/>
-								<reference key="NSNextKeyView"/>
 								<reference key="IBUIBackgroundColor" ref="711731296"/>
 								<bool key="IBUIOpaque">NO</bool>
 								<string key="targetRuntimeIdentifier">IBIPadFramework</string>
@@ -462,6 +461,22 @@
 					<int key="connectionID">67</int>
 				</object>
 				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">titleTvLabel</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="466766809"/>
+					</object>
+					<int key="connectionID">68</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">descriptionTvLabel</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="217600684"/>
+					</object>
+					<int key="connectionID">69</int>
+				</object>
+				<object class="IBConnectionRecord">
 					<object class="IBCocoaTouchEventConnection" key="connection">
 						<string key="label">togglePlayOrPause:</string>
 						<reference key="source" ref="594951421"/>
@@ -689,7 +704,7 @@
 			<nil key="activeLocalization"/>
 			<dictionary class="NSMutableDictionary" key="localizations"/>
 			<nil key="sourceID"/>
-			<int key="maxID">67</int>
+			<int key="maxID">69</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -750,12 +765,14 @@
 					</dictionary>
 					<dictionary class="NSMutableDictionary" key="outlets">
 						<string key="HUDView">UIView</string>
+						<string key="descriptionTvLabel">UILabel</string>
 						<string key="doneBarButton">UIBarButtonItem</string>
 						<string key="movieView">UIView</string>
 						<string key="playOrPauseButton">UIButton</string>
 						<string key="playingExternallyView">UIView</string>
 						<string key="positionSlider">UISlider</string>
 						<string key="remainingTimeLabel">UIBarItem</string>
+						<string key="titleTvLabel">UILabel</string>
 						<string key="topView">UIView</string>
 						<string key="trackSelectorButton">UIButton</string>
 						<string key="volumeSlider">UISlider</string>
@@ -765,6 +782,10 @@
 							<string key="name">HUDView</string>
 							<string key="candidateClassName">UIView</string>
 						</object>
+						<object class="IBToOneOutletInfo" key="descriptionTvLabel">
+							<string key="name">descriptionTvLabel</string>
+							<string key="candidateClassName">UILabel</string>
+						</object>
 						<object class="IBToOneOutletInfo" key="doneBarButton">
 							<string key="name">doneBarButton</string>
 							<string key="candidateClassName">UIBarButtonItem</string>
@@ -789,6 +810,10 @@
 							<string key="name">remainingTimeLabel</string>
 							<string key="candidateClassName">UIBarItem</string>
 						</object>
+						<object class="IBToOneOutletInfo" key="titleTvLabel">
+							<string key="name">titleTvLabel</string>
+							<string key="candidateClassName">UILabel</string>
+						</object>
 						<object class="IBToOneOutletInfo" key="topView">
 							<string key="name">topView</string>
 							<string key="candidateClassName">UIView</string>
diff --git a/Resources/MVLCMovieView~iphone.xib b/Resources/MVLCMovieView~iphone.xib
index 8fcb891..f8d933e 100644
--- a/Resources/MVLCMovieView~iphone.xib
+++ b/Resources/MVLCMovieView~iphone.xib
@@ -2,7 +2,7 @@
 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
 	<data>
 		<int key="IBDocument.SystemTarget">1296</int>
-		<string key="IBDocument.SystemVersion">12C60</string>
+		<string key="IBDocument.SystemVersion">12C3104</string>
 		<string key="IBDocument.InterfaceBuilderVersion">3084</string>
 		<string key="IBDocument.AppKitVersion">1187.34</string>
 		<string key="IBDocument.HIToolboxVersion">625.00</string>
@@ -465,6 +465,22 @@
 					<int key="connectionID">38</int>
 				</object>
 				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">titleTvLabel</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="351293636"/>
+					</object>
+					<int key="connectionID">39</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">descriptionTvLabel</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="277270157"/>
+					</object>
+					<int key="connectionID">40</int>
+				</object>
+				<object class="IBConnectionRecord">
 					<object class="IBCocoaTouchEventConnection" key="connection">
 						<string key="label">togglePlayOrPause:</string>
 						<reference key="source" ref="85788192"/>
@@ -695,7 +711,7 @@
 			<nil key="activeLocalization"/>
 			<dictionary class="NSMutableDictionary" key="localizations"/>
 			<nil key="sourceID"/>
-			<int key="maxID">38</int>
+			<int key="maxID">40</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -756,12 +772,14 @@
 					</dictionary>
 					<dictionary class="NSMutableDictionary" key="outlets">
 						<string key="HUDView">UIView</string>
+						<string key="descriptionTvLabel">UILabel</string>
 						<string key="doneBarButton">UIBarButtonItem</string>
 						<string key="movieView">UIView</string>
 						<string key="playOrPauseButton">UIButton</string>
 						<string key="playingExternallyView">UIView</string>
 						<string key="positionSlider">UISlider</string>
 						<string key="remainingTimeLabel">UIBarItem</string>
+						<string key="titleTvLabel">UILabel</string>
 						<string key="topView">UIView</string>
 						<string key="trackSelectorButton">UIButton</string>
 						<string key="volumeSlider">UISlider</string>
@@ -771,6 +789,10 @@
 							<string key="name">HUDView</string>
 							<string key="candidateClassName">UIView</string>
 						</object>
+						<object class="IBToOneOutletInfo" key="descriptionTvLabel">
+							<string key="name">descriptionTvLabel</string>
+							<string key="candidateClassName">UILabel</string>
+						</object>
 						<object class="IBToOneOutletInfo" key="doneBarButton">
 							<string key="name">doneBarButton</string>
 							<string key="candidateClassName">UIBarButtonItem</string>
@@ -795,6 +817,10 @@
 							<string key="name">remainingTimeLabel</string>
 							<string key="candidateClassName">UIBarItem</string>
 						</object>
+						<object class="IBToOneOutletInfo" key="titleTvLabel">
+							<string key="name">titleTvLabel</string>
+							<string key="candidateClassName">UILabel</string>
+						</object>
 						<object class="IBToOneOutletInfo" key="topView">
 							<string key="name">topView</string>
 							<string key="candidateClassName">UIView</string>
diff --git a/Resources/en.lproj/Localizable.strings b/Resources/en.lproj/Localizable.strings
index 666d77894a4ad9cd9cf5391a43a4a8099041f580..73cf56f31ee35ae31e774585eb654c2395b1cb79 100644
GIT binary patch
delta 191
zcmaDNF-vMg3Qs*3gAzjsLl}bsgEK=uLmm*OG9)vU0Lc`fj4fVSYX*q!44`TShBAgs
tpq^BqDGESVF_0`^$YDris08xz7}9}!kogK=+h8VVn1i*3k)#!5EdciYAe{gJ

delta 7
OcmbOw^+aMr3J(Abkpj^G

diff --git a/Resources/ru.lproj/Localizable.strings b/Resources/ru.lproj/Localizable.strings
index 396d5c69e0e6f9f2455b2085d2a0b3f1ec8937e0..b7a38ed600fd5d75744210a900374bf73b6f06cc 100644
GIT binary patch
delta 203
zcmXwzy$ZrW5QL|gDp-k)Sh(Z~Bzh1G=U)m7K^sXg8dQ)dD1w!}Pvc|cv78fSx!oIf
z=i9B at ug<$}JR?Miu|@$yjx#Dni7jr*J9WHXmm>~1WX2`ubo8{ZBS!XfA2e;a<0wxl
zis^S%zTkun9#R$d(t-c?268KBPdKjyPSAv at 7C9-ym=o2MebogM%{k6E<w`v-Wr*2i
GIN<{(@Eu_Q

delta 7
OcmeB at J|Vf`1P=fVX9EiW

-- 
1.7.12.4 (Apple Git-37)




More information about the vlc-devel mailing list