Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-4492] iOS:Internationalization of strings does not work on iphone if the project is built from xcode

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2011-07-11T16:17:04.000+0000
Affected Version/sRelease 1.7.0
Fix Version/sSprint 2011-28
ComponentsiOS
Labelsios
ReporterAnirudh Nagesh
AssigneeReggie Seagraves
Created2011-06-24T13:04:34.000+0000
Updated2011-07-15T00:05:37.000+0000

Description

This works fine when built and deployed from Ti Studio! Step1: Copy the below code to app.js Step2: Create a folder 'il8n/en' and 'il8n/es' in the root of the project. Step3: Copy the strings.xml files(attached) to both the folders. Step4: Run the application. You can a see a welcome message. Step5: Go to 'build/iphone' directory and open the project in x-code. Step6: Build and run the application from x-code. Step7: The strings.xml is missing in the project and internationalization does not work.
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');

//
var win1 = Titanium.UI.createWindow({  
    title:'Tab 1',
    backgroundColor:'#fff'
});


var label1 = Titanium.UI.createLabel({
	color:'#999',
	text:Ti.Locale.getString("welcome_message"),
	font:{fontSize:20,fontFamily:'Helvetica Neue'},
	textAlign:'center',
	width:'auto'
});

win1.add(label1);

win1.open();

The screenshot of the application is attached. Associated Helpdesk Ticket: http://appc.me/c/APP-762623

Attachments

FileDateSize
i18n.zip2011-06-24T13:04:34.000+00001421
Localized.png2011-07-11T13:58:12.000+000033803
NotLocalized.png2011-07-11T13:58:12.000+000031369
photo.PNG2011-06-24T13:04:34.000+000035075

Comments

  1. Reggie Seagraves 2011-06-28

    I tried these steps and could not reproduce the problem. The app when build with XCode displayed proper translations in the strings. I had QE visually verify this with me. Additionally, running projects from XCode is not a supported workflow, running from Studio is.
  2. Natalie Huynh 2011-07-11

    Tested with 1.7.2.v20110711111041 on iPhone 4 4.2.8 When application is localized you see "Welcome to Kitchen Sink for Titanium." When application is not localized you see "welcome_message:" (See attached image) Works when build with Studio, but when build and ran with xcode string is not localized
  3. Reggie Seagraves 2011-07-11

    This is not a supported workflow. Validated with CE that this support (building outside of Studio) will not be provided.
  4. Aaron K. Saunders 2011-07-15

    honestly i think it is crazy that the solution to the problem is to not built the project in xcode... that is the best work around you can provide? I build in xcode because that is where I package and archive before sending out to clients for testing? What is the approved approach for that workflow?

JSON Source