Skip to content

Commit

Permalink
Separate generic strings (What's new and Get Started) into a differen…
Browse files Browse the repository at this point in the history
…t localizable strings file.
  • Loading branch information
sarbogast committed Jul 2, 2014
1 parent 72e03de commit 45292d9
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ - (UICollectionReusableView *)collectionView:(UICollectionView *)collectionView
label.translatesAutoresizingMaskIntoConstraints = NO;
[view addConstraints:[NSLayoutConstraint constraintsToStretchHorizontallyToSuperview:label]];
[view addConstraints:[NSLayoutConstraint constraintsToStretchVerticallyToSuperview:label]];
label.text = NSLocalizedString(@"What’s New", nil);
label.text = NSLocalizedStringFromTable(@"What’s New", @"WhatsNew", nil);
label.textColor = [self contentColor];
label.textAlignment = NSTextAlignmentCenter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ - (void)__MTZWhatsNewViewController_SetUp
self.backgroundGradientBottomColor = [UIColor whiteColor];
_style = MTZWhatsNewViewControllerStyleDarkContent;
_automaticallySetStyle = YES;
self.dismissButtonTitle = NSLocalizedString(@"Get Started", nil);
self.dismissButtonTitle = NSLocalizedStringFromTable(@"Get Started", @"WhatsNew", nil);
}

- (void)reloadButtonHeight
Expand Down
6 changes: 6 additions & 0 deletions Classes/en.lproj/WhatsNew.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
WhatsNew.strings
*/

"Get Started" = "Get Started";
"What’s New" = "What’s New";
6 changes: 6 additions & 0 deletions Classes/fr.lproj/WhatsNew.strings
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/*
WhatsNew.strings
*/

"Get Started" = "Démarrer";
"What’s New" = "Nouveautés";
14 changes: 14 additions & 0 deletions Demo Apps/Podcasts/Podcasts.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

/* Begin PBXBuildFile section */
331DA3773EAF72D6DAEE670C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 331DABF7F1A10A8D94D0E9C6 /* Localizable.strings */; };
B91C58CC1963FA0200924B86 /* WhatsNew.strings in Resources */ = {isa = PBXBuildFile; fileRef = B91C58CE1963FA0200924B86 /* WhatsNew.strings */; };
C97860F219341B1E005BE797 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C97860F119341B1E005BE797 /* Foundation.framework */; };
C97860F419341B1E005BE797 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C97860F319341B1E005BE797 /* CoreGraphics.framework */; };
C97860F619341B1E005BE797 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C97860F519341B1E005BE797 /* UIKit.framework */; };
Expand Down Expand Up @@ -47,6 +48,8 @@
331DAFEA9B98EB9E4E61B6CE /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
B90387691962ED73000AA217 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
B903876A1962ED73000AA217 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
B91C58CD1963FA0200924B86 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/WhatsNew.strings; sourceTree = "<group>"; };
B91C58CF1963FA0600924B86 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/WhatsNew.strings; sourceTree = "<group>"; };
C97860EE19341B1E005BE797 /* Podcasts.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Podcasts.app; sourceTree = BUILT_PRODUCTS_DIR; };
C97860F119341B1E005BE797 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
C97860F319341B1E005BE797 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
Expand Down Expand Up @@ -188,6 +191,7 @@
C978612C19341BDB005BE797 /* MTZWhatsNew.h */,
C978612D19341BDB005BE797 /* MTZWhatsNew.m */,
C978612E19341BDB005BE797 /* MTZWhatsNewViewController */,
B91C58CE1963FA0200924B86 /* WhatsNew.strings */,
);
name = "What's New";
path = ../../../Classes;
Expand Down Expand Up @@ -312,6 +316,7 @@
C978612A19341BCA005BE797 /* What's New.plist in Resources */,
C97860FC19341B1E005BE797 /* InfoPlist.strings in Resources */,
331DA3773EAF72D6DAEE670C /* Localizable.strings in Resources */,
B91C58CC1963FA0200924B86 /* WhatsNew.strings in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -371,6 +376,15 @@
name = Localizable.strings;
sourceTree = "<group>";
};
B91C58CE1963FA0200924B86 /* WhatsNew.strings */ = {
isa = PBXVariantGroup;
children = (
B91C58CD1963FA0200924B86 /* en */,
B91C58CF1963FA0600924B86 /* fr */,
);
name = WhatsNew.strings;
sourceTree = "<group>";
};
C97860FA19341B1E005BE797 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,36 +5,36 @@
<key>IDESourceControlProjectFavoriteDictionaryKey</key>
<false/>
<key>IDESourceControlProjectIdentifier</key>
<string>A59064AA-35FA-42FA-97BD-33B6A3DF5D69</string>
<string>50EB2F35-0A43-4FE6-AF1E-3D426DE58852</string>
<key>IDESourceControlProjectName</key>
<string>Podcasts</string>
<key>IDESourceControlProjectOriginsDictionary</key>
<dict>
<key>09CB178F-6959-4963-9563-7CE426CE8BD3</key>
<string>https://github.com/mdznr/What-s-New.git</string>
<key>85B2DC01-FD15-4B43-9633-0C932422B127</key>
<string>https://github.com/instaply/What-s-New.git</string>
</dict>
<key>IDESourceControlProjectPath</key>
<string>Demo Apps/Podcasts/Podcasts.xcodeproj/project.xcworkspace</string>
<key>IDESourceControlProjectRelativeInstallPathDictionary</key>
<dict>
<key>09CB178F-6959-4963-9563-7CE426CE8BD3</key>
<key>85B2DC01-FD15-4B43-9633-0C932422B127</key>
<string>../../../..</string>
</dict>
<key>IDESourceControlProjectURL</key>
<string>https://github.com/mdznr/What-s-New.git</string>
<string>https://github.com/instaply/What-s-New.git</string>
<key>IDESourceControlProjectVersion</key>
<integer>110</integer>
<key>IDESourceControlProjectWCCIdentifier</key>
<string>09CB178F-6959-4963-9563-7CE426CE8BD3</string>
<string>85B2DC01-FD15-4B43-9633-0C932422B127</string>
<key>IDESourceControlProjectWCConfigurations</key>
<array>
<dict>
<key>IDESourceControlRepositoryExtensionIdentifierKey</key>
<string>public.vcs.git</string>
<key>IDESourceControlWCCIdentifierKey</key>
<string>09CB178F-6959-4963-9563-7CE426CE8BD3</string>
<string>85B2DC01-FD15-4B43-9633-0C932422B127</string>
<key>IDESourceControlWCCName</key>
<string>What's New</string>
<string>What-s-New</string>
</dict>
</array>
</dict>
Expand Down
3 changes: 0 additions & 3 deletions Demo Apps/Podcasts/Podcasts/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/****************************************************************************/
/* Localization file */


"Get Started" = "Get Started";
"Unplayed Episodes" = "Unplayed Episodes";
"Quickly find episodes you haven’t played yet." = "Quickly find episodes you haven’t played yet.";
"Browse the Feed" = "Browse the Feed";
Expand All @@ -19,4 +17,3 @@
"Create custom stations of your favorite podcasts." = "Create custom stations of your favorite podcasts.";
"Pull to Refresh" = "Pull to Refresh";
"More easily refresh a subscription or playlist." = "More easily refresh a subscription or playlist.";
"What’s New" = "What’s New";
5 changes: 1 addition & 4 deletions Demo Apps/Podcasts/Podcasts/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
/****************************************************************************/
/* Localization file */


"Get Started" = "Démarrer";
"Unplayed Episodes" = "Episodes non-écoutés";
"Quickly find episodes you haven’t played yet." = "Trouvez rapidement les épisodes que vous n'avez pas encore écoutés.";
"Browse the Feed" = "Parcourir le flux";
Expand All @@ -18,5 +16,4 @@
"Custom Stations" = "Stations personnalisées";
"Create custom stations of your favorite podcasts." = "Créez des stations personnalisées avec vos podcasts favoris.";
"Pull to Refresh" = "Tirer pour rafraichir";
"More easily refresh a subscription or playlist." = "Rafraichissez plus simplement un abonnement ou une liste de lecture.";
"What’s New" = "Nouveautés";
"More easily refresh a subscription or playlist." = "Rafraichissez plus simplement un abonnement ou une liste de lecture.";

0 comments on commit 45292d9

Please sign in to comment.