<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><div><br></div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>d. Long bits of text with a little bit of markup in the millde are problematic. Consider this example:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&lt;p&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;When it comes to solving a business problem in code, once is&nbsp;&lt;em&gt;more&nbsp;than&lt;/em&gt;&nbsp;enough! As compelling<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;as the autonomous AJAX based client architecture is, when your client code&nbsp;is in JavaScript and your<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;server code isn't, you're now committed maintaining two&nbsp;apps&nbsp;in parallel,&nbsp;and keeping them up-to-date<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;in lock step.<br><br></div><div>In the above, the only i18n key that gets extracted is "more than". The rest remains untranslatable.</div><div><br></div><div>If we went with the rule&nbsp;"every text fragment within a non data-field element will be a candidate for translation," we'd be in better shape, but still not amazing shape. This is really /one/ translatable thought, not three. Maybe this:</div><div><br></div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;p&gt;<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;When it comes to solving a business problem in code, once is&nbsp;&lt;em data-i18n=inline&gt;more&nbsp;than&lt;/em&gt;&nbsp;enough! As compelling<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;as the autonomous AJAX based client architecture is, when your client code&nbsp;is in JavaScript and your<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;server code isn't, you're now committed maintaining two&nbsp;apps&nbsp;in parallel,&nbsp;and keeping them up-to-date<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;in lock step.<br></div><div><br></div><div>And then allow HTML markup in translation values? We could treat them as SafeHtml…</div></div></blockquote><br></div><div>One possible solution would be to define elements that are to define that some elements are always treated as inline instead of needing to declare them by hand.</div><div><ul><li style="font-family: verdana, helvetica, arial, sans-serif; font-size: 12px; line-height: 16px; "><a href="http://www.w3schools.com/tags/tag_phrase_elements.asp" style="color: rgb(0, 0, 0); ">&lt;em&gt;</a>&nbsp;(emphasized text)</li><li style="font-family: verdana, helvetica, arial, sans-serif; font-size: 12px; line-height: 16px; "><a href="http://www.w3schools.com/tags/tag_phrase_elements.asp" style="color: rgb(0, 0, 0); ">&lt;strong&gt;</a>&nbsp;(important text)</li><li style="font-family: verdana, helvetica, arial, sans-serif; font-size: 12px; line-height: 16px; "><a href="http://www.w3schools.com/tags/tag_mark.asp" style="color: rgb(0, 0, 0); ">&lt;mark&gt;</a>&nbsp;(marked/highlighted text)</li><li style="font-family: verdana, helvetica, arial, sans-serif; font-size: 12px; line-height: 16px; "><a href="http://www.w3schools.com/tags/tag_cite.asp" style="color: rgb(0, 0, 0); ">&lt;cite&gt;</a>&nbsp;(the title of a work)</li><li style="font-family: verdana, helvetica, arial, sans-serif; font-size: 12px; line-height: 16px; "><a href="http://www.w3schools.com/tags/tag_phrase_elements.asp" style="color: rgb(0, 0, 0); ">&lt;dfn&gt;</a>&nbsp;(a definition term)</li><li style="font-family: verdana, helvetica, arial, sans-serif; font-size: 12px; line-height: 16px; "><span style="background-color: rgb(255, 255, 255); ">&lt;i&gt; tag is usually displayed in italic</span></li><li><span style="background-color: rgb(255, 255, 255); "><font face="verdana, helvetica, arial, sans-serif"><span style="line-height: 16px;">&lt;b&gt; tag is&nbsp;usually&nbsp;bold</span></font></span></li></ul></div>And maybe even span, although that can be a scary one.</div><div><br></div><div style="text-align: left;"><blockquote type="cite">e. I think we should automatically consider placeholder and title attributes as translatable. Perhaps there's a case for allowing end users to override this default in ErraiApp.properties or in an attribute of the @Bundle annotation if we keep it. I'm mostly thinking of custom data-* attributes as a motivation for this.</blockquote></div><div><br></div><div>+1 placeholder and titles need translation 99.99% of the times in my experience.</div><div><br></div><div><div></div></div><blockquote type="cite"><div><div>f. It would be kind of us to include a reusable language chooser widget with well-documented CSS classnames. Seems like everyone is going to need one of these.</div></div></blockquote><div><br></div><div>Or at least a way to get a list with the available translations. That way one can wrap them into a template and have them output as a select or a list of links. And when a language is added there is no need to change anything on the client.</div><div><br></div><div>for example:</div><div><br></div><div>@Inject</div><div>private List&lt;String&gt;&nbsp;supportedLocales;</div><div><br></div><div>and then have a template render it.</div><div><br></div><div>@Inject @DataField ListWidget&lt;String, LanguageSelectWidget&gt; langaugeSelectList;</div><div><br></div><div>Cheers,</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>Erik Jan</div></body></html>