[TIMOB-4492] iOS:Internationalization of strings does not work on iphone if the project is built from xcode
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Won't Fix |
Resolution Date | 2011-07-11T16:17:04.000+0000 |
Affected Version/s | Release 1.7.0 |
Fix Version/s | Sprint 2011-28 |
Components | iOS |
Labels | ios |
Reporter | Anirudh Nagesh |
Assignee | Reggie Seagraves |
Created | 2011-06-24T13:04:34.000+0000 |
Updated | 2011-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
File | Date | Size |
---|---|---|
i18n.zip | 2011-06-24T13:04:34.000+0000 | 1421 |
Localized.png | 2011-07-11T13:58:12.000+0000 | 33803 |
NotLocalized.png | 2011-07-11T13:58:12.000+0000 | 31369 |
photo.PNG | 2011-06-24T13:04:34.000+0000 | 35075 |
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.
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
This is not a supported workflow. Validated with CE that this support (building outside of Studio) will not be provided.
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?