Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-2605] Localization not setting in some instances

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:59:35.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M05
ComponentsiOS
Labelsios, localization, release-1.6.0, rplist
ReporterRick Blalock
AssigneeBlain Hamon
Created2011-04-15T03:24:12.000+0000
Updated2011-04-17T01:59:35.000+0000

Description

I'm working with a customer that is having the same issue I am having with using localization. Kevin W helped troubleshoot it with me. We walked through the identical same steps and it worked for him but not myself nor the customer. Tested on 1.5.0 GC and 1.5.1.

Attached is the project I was tweaking on trying to get it to work. Kevin had basically the same project and it worked for him.

the getString() always defaulted to the second arguement (The fallback text).

Any ideas on this one?

Attachments

FileDateSize
i18n-wtf.zip2011-04-15T03:24:13.000+0000855907
localization-test.zip2011-04-15T03:24:21.000+000018641533

Comments

  1. Rick Blalock 2011-04-15

    Forgot to mention. Customer ticket located here: http://developer.appcelerator.com/helpdesk/view/60311">http://developer.appcelerator.com/helpdesk/view/60311

  2. Stephen Tramer 2011-04-15

    Unable to duplicate this. Could be a TiDev issue of some kind - I built off of the command line using that script. master/HEAD, iOS 4.2, simulator.

  3. Stephen Tramer 2011-04-15

    Gonna bump this to needs-more-info and post a possible workaround on the HD ticket.

  4. Rick Blalock 2011-04-15

    Hi Steve,
    Ok so I spent several hours this morning trying to debug this. I now think it's an issue with Titanium Developer. Here are the steps I took this morning:

    1. Got the new builds.
    2. Killed the build folder in the project and re-ran. Same problem.
    3. Deleted the project and re-created it in it's place (note, all my test apps I put in /rickblalock/Appcelerator_Support/).
    4. When creating the new project I used the SAME APP ID - After building, it didn't work.
    5. Deleted project. I then created a project in the same folder with a DIFFERENT APP ID name. Localization worked.
    6. Deleted project. I then created a project outside the folder (put it in a folder on my desktop) with a different app id name. Localization worked.
    7. Deleted project. I then created a project outside the folder (put it in a folder on my desktop) with the SAME APP ID. Localization worked.
    8. Deleted project. I then created a project inside the folder I had before with the SAME APP ID NAME. This time, localization worked!

    So my assumption is it's an issue with Titanium Developer. I'm not familiar with how Ti Dev works enough to make a judgement call on this.

  5. Bert 2011-04-15

    I found that if I tried to use localization on a project originally created with 1.4.x branch of the SDK you would run into these issues.

    The key to getting it to work is to delete the build directory and touch the tiapp.xml in a text editor. I also copied over the new tags from a tiapp.xml created by the developer using the 1.5 SDK. After all that, it worked fine for me.

  6. Andreas sandberg 2011-04-15

    Hey Guys,

         I'm also experiencing this issue and it's intermittent.  Sometimes the localized strings are displayed after a build but most of the time they are not.  When it does work on the simulator, it never works deploying to the device.  I took the sample project attached to this ticket and tried to build, the localization doesn't work.  Tried to kill the build directory, retouch tiapp.xml, diff'd the xml structure with another 1.5.1 project, etc., no luck.  Then I created a new project, copied in the i18n directory manually and everything worked.  Was able to create three additional sample projects this way and every time the localization works.  If there are any log files or anything I can provide to help you troubleshoot the ticket, please let me know.  Thanks!
       

    Andreas

  7. Jacques Crocker 2011-04-15

    I'm having the same issue here. I attached another sample project

    I followed the docs instructions, put the strings.xml within [root]/i18n/en/strings.xml. On starting the app, L("base_ui_title") returns "base_ui_title" instead of the value specified in strings.xml

    I'm using Titanium Developer 1.2.2 along with the 1.5.1sdk

  8. Stephen Tramer 2011-04-15

    Ticket hasn't gone through yet but this has been fixed.

    To test and close:

    • Compile both provided projects in this ticket (localization-test.zip and i18n-wtf.zip) via TiDev OR command-line tools
    • Make sure that you see the expected localization result in the log output
  9. Jeff Haynie 2011-04-15

    (from [bc81d17959a8e369d92a3e402eaaa7a653b15c3a]) [#2605 state:fixed-in-qa] Prevent unnecessary name mangling of .app bundle name. https://github.com/appcelerator/titanium_mobile/commit/bc81d17959a8e369d92a3e402eaaa7a653b15c3a"> https://github.com/appcelerator/titanium_mobile/commit/bc81d17959a8...

  10. Alan Leard 2011-04-15

    Successful iOS Simulator test on 01/26/2011

    Tested both test applications in simulator and watched log for proper output.

    • iOS Simulator Results: Proper localization output on both applications

    Mobile SDK version: 1.6.0 (01/26/11 18:53 bd12917...)

    Simulator Version: 4.2 (235)

JSON Source