[ALOY-1121] Update extract-i18n command to extract strings from XML files in addition to TSS
| GitHub Issue | n/a |
|---|---|
| Type | Improvement |
| Priority | Medium |
| Status | Closed |
| Resolution | Fixed |
| Resolution Date | 2014-10-28T02:07:03.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | Alloy 1.6.0 |
| Components | Tooling |
| Labels | n/a |
| Reporter | Tim Poulsen |
| Assignee | Tim Poulsen |
| Created | 2014-08-26T14:11:11.000+0000 |
| Updated | 2015-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
| File | Date | Size |
|---|---|---|
| app.zip | 2014-09-09T15:53:24.000+0000 | 2239356 |
Test app attached
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-i18nthe output should match the following:Note that internationalized strings identified by the[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.textidortitleidproperties are not extracted (they were not prior to this change either).Reopen to backport to 1_6_X branch
PR https://github.com/appcelerator/alloy/pull/607 for 1_6_X Functional test as above
PR merged.
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.