Titanium JIRA Archive
Alloy (ALOY)

[ALOY-1121] Update extract-i18n command to extract strings from XML files in addition to TSS

GitHub Issuen/a
TypeImprovement
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-10-28T02:07:03.000+0000
Affected Version/sn/a
Fix Version/sAlloy 1.6.0
ComponentsTooling
Labelsn/a
ReporterTim Poulsen
AssigneeTim Poulsen
Created2014-08-26T14:11:11.000+0000
Updated2015-03-19T23:25:07.000+0000

Description

Community PR https://github.com/appcelerator/alloy/pull/527 Ticket is to test, confirm functionality and applicability.

Attachments

FileDateSize
app.zip2014-09-09T15:53:24.000+00002239356

Comments

  1. Tim Poulsen 2014-09-09

    Test app attached
  2. Tim Poulsen 2014-09-09

    QE/Review steps: 1. Create a new Alloy app. Copy the contents of the attached zip over the top of the app folder. Not that there is no i18n folder. 2. From the project's root directory, run alloy extract-i18n the output should match the following:
       [INFO] extract-i18n for "i18n/en/strings.xml"
       [DEBUG] /Users/admin/Documents/Titanium_Studio_Workspace/foo2/app/controllers/index.js: 1 strings found.
       [DEBUG] /Users/admin/Documents/Titanium_Studio_Workspace/foo2/app/styles/index.tss: 1 strings found.
       [DEBUG] /Users/admin/Documents/Titanium_Studio_Workspace/foo2/app/views/index.xml: 1 strings found.
       [INFO] Found 3 unique i18n strings in code. Checking against current i18n file...
       [INFO] ######## BEFORE ########
       <?xml version="1.0" encoding="UTF-8"?><resources>
       </resources>
       [INFO] ######## AFTER  ########
       <?xml version="1.0" encoding="UTF-8"?><resources>
         <string name="label4">label4</string>
         <string name="label2">label2</string>
         <string name="label1">label1</string>
       </resources>
       [INFO]  
       [WARN] Did not write the "i18n/en/strings.xml" file - use "--apply" option to write.
       
    Note that internationalized strings identified by the textid or titleid properties are not extracted (they were not prior to this change either).
  3. Tim Poulsen 2014-10-23

    Reopen to backport to 1_6_X branch
  4. Tim Poulsen 2014-10-24

    PR https://github.com/appcelerator/alloy/pull/607 for 1_6_X Functional test as above
  5. Feon Sua Xin Miao 2014-10-28

    PR merged.
  6. Eric Wieber 2015-03-19

    Verified fixed using: Titanium SDK 3.5.1.GA Studio 3.4.2.201502181619 CLI 4.0.0-alpha Xcode 6.2 Node 0.12 Alloy 1.6.0-alpha Output strings match expected output.

JSON Source