[mythtv] Mythweb translations...
knight at teksavvy.com
Wed Dec 30 01:47:17 UTC 2009
Michael T. Dean wrote:
> Not sure what you're trying to do, but in the MythTV code, when we use a
> value (such as "Default") in the database we translate only for
Translate what has not been translated in Mythweb weather settings and display screens...
My problems is with the 'Current Conditions', 'Three Day Forecast', 'Six Day
Forecast', 'Static Map', 'Animated Map', 'Severe Weather Alerts' and '18 Hour
Forecast' labels which are not in the lang files since they are never enclosed
between "t()" or "tn()" anywhere. The only place where they are declared would AFAIK
make them end up in the database if I try to translate them there.
I could "cheat" by replacing the following echo:
<h2><?php echo $screen->container ?></h2>
<h2><?php echo t('Six Day Forecast') ?></h2>
for example in weather.6d.php
though I have a feeling it was done that way to make the screen more generic (I
believe I even read something to that effect though I can't seem to find where I read
that) so that it could be used for showing a smaller number of days and the title
would be changed accordingly.
I guess my "best bet" would probably be to make a getScreenTitle(containerName)
similar to the one in weatherUtils.cpp. That would translate between what is stored
in the database and what is actually displayed...
> display. So, you should be able to use t() or whatever only for
> displaying the value. And since, TTBOMK, HTML allows differentiation
> between labels and values for everything but command buttons, you should
> be able to deal with any situation by differentiation between (display)
> labels and (non-display/non-translated) values.
I'm already doing this but the part of the code that does the lists (in the settings
screen) or the display is dynamic so it is not the actual name of the label that
ends up enclosed by "t()" but an element in a list or a structure so it, as expected,
doesn't get extracted by build_translations.pl .
Thank you very much for your help and happy holidays!
More information about the mythtv-dev