Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1935] Alloy doesn't compile internationalized labels of Ti.UI.iOS.TabbedBar

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionDuplicate
Resolution Date2013-07-08T19:33:20.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAlloy, Titanium SDK & CLI
Labelsalloy, i18n, internationalization, labels, tabbedbar
ReporterManuel Lehner
AssigneeMauro Parra-Miranda
Created2013-07-08T19:27:26.000+0000
Updated2016-03-08T07:40:51.000+0000

Description

When trying to set internationalized labels to a Ti.UI.iOS.TabbedBar like in the following example, Alloy fails to compile. The titles of both labels were set with different approaches (first one with *titleid* property, the other one via tss accessed by its id) index.xml
<Alloy>
	<Window class="container">
		<TabbedBar id="tabbedbar" platform="ios" onClick="setView" >
		    <Labels id="labels">
		        <Label titleid="tab_one" />
		        <Label id="tab_two" />
		    </Labels>
		</TabbedBar>
	</Window>
</Alloy>
index.tss
".container": {
	backgroundColor:"white"
},
"#tab_two": {
	title: L('tab_two')
}
Both are producing this error: {noformat} [INFO] : ----- MVC GENERATION ----- [INFO] : [index.xml] view processing... [INFO] : style: "index.tss" [INFO] : view: "index.xml" [ERROR] : /usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.BarItemType.js:30 [ERROR] : logger.warn(' at index ' + index + ' has no properties'); [ERROR] : [ERROR] : ^ [ERROR] : ReferenceError: logger is not defined [ERROR] : at parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.BarItemType.js:30:3) [ERROR] : at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17) [ERROR] : at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract.BarItemType.js:6:27) [ERROR] : at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:223:48) [ERROR] : at exports.generateNode.content (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:277:29) [ERROR] : at Array.forEach (native) [ERROR] : at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] : at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:272:5) [ERROR] : at Object.exports.generateNodeExtended (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:175:17) [ERROR] : at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract._ItemContainer.js:48:15 [ERROR] : at Array.forEach (native) [ERROR] : at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] : at parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract._ItemContainer.js:28:4) [ERROR] : at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/base.js:11:17) [ERROR] : at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Alloy.Abstract._ItemContainer.js:17:27) [ERROR] : at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.ButtonBar.js:14:52) [ERROR] : at Object.exports.parse (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/parsers/Ti.UI.iOS.TabbedBar.js:2:38) [ERROR] : at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:223:48) [ERROR] : at exports.generateNode.content (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:277:29) [ERROR] : at Array.forEach (native) [ERROR] : at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] : at Object.exports.generateNode (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/compilerUtils.js:272:5) [ERROR] : at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:447:28 [ERROR] : at Array.forEach (native) [ERROR] : at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] : at parseAlloyComponent (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:439:5) [ERROR] : at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:202:5 [ERROR] : at Array.forEach (native) [ERROR] : at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] : at /usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:194:5 [ERROR] : at Array.forEach (native) [ERROR] : at Function.T.each.T.forEach (/usr/local/lib/node_modules/alloy/Alloy/lib/alloy/underscore.js:5:625) [ERROR] : at module.exports (/usr/local/lib/node_modules/alloy/Alloy/commands/compile/index.js:192:4) [ERROR] : at Object. (/usr/local/lib/node_modules/alloy/Alloy/alloy.js:86:46) [ERROR] : at Module._compile (module.js:449:26) [ERROR] : at Object.Module._extensions..js (module.js:467:10) [ERROR] : at Module.load (module.js:356:32) [ERROR] : at Function.Module._load (module.js:312:12) [ERROR] : at Module.require (module.js:362:17) [ERROR] : at require (module.js:378:17) [ERROR] : at Object. (/usr/local/lib/node_modules/alloy/bin/alloy:3:1) [ERROR] : at Module._compile (module.js:449:26) [ERROR] : at Object.Module._extensions..js (module.js:467:10) [ERROR] : at Module.load (module.js:356:32) [ERROR] : at Function.Module._load (module.js:312:12) [ERROR] : at Module.runMain (module.js:492:10) [ERROR] : at process.startup.processNextTick.process._tickCallback (node.js:245:9) [ERROR] : Alloy compiler failed {noformat}

Comments

  1. Tony Lukasavage 2013-07-08

    duplicate of ALOY-734
  2. Mauro Parra-Miranda 2013-11-24

    DUP issue.
  3. Santiago Valencia 2014-04-06

    Trying to do: That shows the text L... and when try the attribute text also doesn't show any text. I did what I want at code level creating a array of text and setting as a labels attributes for tabbedbar, but shouldn't it work in the View part? Regards,

JSON Source