That's a good one. We've already talked about the necessity to warn in such cases. Please be so kind and open a bug to the end that instances of this.tr() (and similar) calls, if without a literal argument as translation key, will be warned about, at least during generation.
That being said you can use non-literal translation keys. this.tr() will be called with the runtime value of the key and - if found - will return the translation. But since there is no literal key nothing gets extracted when you run 'generate.py translation', so your .po files are not populated with entries. You could try an enter the translation keys into the .po files by hand. But this is a bad idea as the generator (a bit willfully) will cast them out with the next run of the 'translation' job, as it only accepts keys in .po files it can verify literally from the class code. It will also not pick them up when generating the application, in either the source or build version. The other idea is to add the missing keys somewhere in your class code, e.g. with this.marktr() calls. This way the translation keys get picked up properly, the .po files get populated and the generated app will contain them if they are translated. In any case you have to make sure that *all potential values* of the runtime argument to this.tr() are covered, or else the runtime resolution of the this.tr() call will just return the argument value. But that's probably obvious. T. On 01/30/2013 05:21 PM, Michael wrote: > Am 30.01.2013 17:19, schrieb Derrell Lipman: >> On Wed, Jan 30, 2013 at 11:10 AM, Michael <[email protected]> wrote: >> >> >> Sometimes people forget that the value passed to this.tr() must be a string >> *constant*. It can not be a concatenation, a variable, etc. Maybe that's >> the problem with these two labels? >> > yes of course. Thanks. But I didn't forget it, I just didn't knew it :-) > > > Michael > > > > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_jan > _______________________________________________ > qooxdoo-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel > > ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_jan _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
