Test: updated test CPLocalizationTest

This commit is contained in:
Alexandre Wilhelm
2015-04-21 10:53:36 -07:00
parent 2db7ce8da1
commit ba26a97ddc
6 changed files with 22 additions and 5 deletions
@@ -22,11 +22,26 @@
- (void)awakeFromCib
{
var label = [CPTextField labelWithTitle:CPLocalizedString(@"Label from file", @"")];
var label = [CPTextField labelWithTitle:CPLocalizedString(@"Label from file", @"") + " -> Label title from en.lproj from first context"];
[label setFrameOrigin:CGPointMake(20, 10)];
[[theWindow contentView] addSubview:label];
var label2 = [CPTextField labelWithTitle:CPLocalizedString(@"Label from file", @"My second context.") + " -> Label title from en.lproj from second context"];
[label2 setFrameOrigin:CGPointMake(20, 30)];
[[theWindow contentView] addSubview:label2];
var label3 = [CPTextField labelWithTitle:CPLocalizedString(@"Label from file", @"My first context.") + " -> Label title from en.lproj from first context"];
[label3 setFrameOrigin:CGPointMake(20, 50)];
[[theWindow contentView] addSubview:label3];
var label4 = [CPTextField labelWithTitle:CPLocalizedStringFromTable(@"Label from file", @"SecondLocalizable", @"My first context.") + " -> Label title from first context from en.lproj from SecondLocalizable"];
[label4 setFrameOrigin:CGPointMake(20, 70)];
[[theWindow contentView] addSubview:label4];
var label5 = [CPTextField labelWithTitle:CPLocalizedString(@"Wrong key", @"") + " -> Wrong key"];
[label5 setFrameOrigin:CGPointMake(20, 90)];
[[theWindow contentView] addSubview:label5];
// This is called when the cib is done loading.
// You can implement this method on any object instantiated from a Cib.
// It's a useful hook for setting up current UI values, and other things.
@@ -13,6 +13,7 @@
<key>CPLocalizableStrings</key>
<array>
<string>Localizable.strings</string>
<string>SecondLocalizable.strings</string>
</array>
</dict>
</plist>
File diff suppressed because one or more lines are too long
@@ -647,10 +647,9 @@
<object class="NSTextField" id="123304262">
<reference key="NSNextResponder" ref="439893737"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{18, 292}, {92, 17}}</string>
<string key="NSFrame">{{18, 178}, {92, 17}}</string>
<reference key="NSSuperview" ref="439893737"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
<string key="NSReuseIdentifierKey">_NS:526</string>
<string key="NSHuggingPriority">{251, 750}</string>
<bool key="NSEnabled">YES</bool>
@@ -0,0 +1,2 @@
/* My first context. */
"Label from file" = "Label title from en.lproj from first context from SecondLocalizable";