Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9815] Anvil: Add support for i18n folders

GitHub Issuen/a
TypeNew Feature
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-03-21T17:26:37.000+0000
Affected Version/sRelease 2.1.0
Fix Version/sRelease 3.1.0
ComponentsTooling
Labelscore
ReporterJeff English
AssigneeIngo Muschenetz
Created2012-06-27T08:34:33.000+0000
Updated2017-03-09T00:01:05.000+0000

Description

Add the ability to use an i18n folder when running a test suite. I need to be able to define an i18n folder that is used when running a test suite so that I can test certain functionality and failure cases in modules.

Comments

  1. Bill Dawson 2013-03-18

    Test Case

    This uses the "app" Anvil config just for convenience (so you don't need to setup a completely new config just to test this.)

    Create the strings.xml file

    * Create the folder support/anvil/configSet/configs/app/i18n/en * Open support/anvil/configSet/configs/app/i18n/en/strings.xml in your favorite editor. * Add the following:
       <?xml version="1.0" encoding="utf-8"?>
       <resources>
       	<string name="test">I am i18n</string>
       </resources>
       

    Create a test

    * Open support/anvil/configSet/Resources/suites/app.js. * Add this line to the test therein:
       valueOf(testRun, L("test")).shouldBe("I am i18n");
       

    Run the test

    * Run the app config suites in Anvil (this assume you know how to run Anvil -- that's not covered here.) e.g.:
       CLI> start --config=app
       
    * The tests therein should succeed.
  2. Bill Dawson 2013-03-18

    Pull request has been submitted: https://github.com/appcelerator/titanium_mobile/pull/3977
  3. Lee Morris 2017-03-09

    Closing ticket as fixed.

JSON Source