[mythtv-commits] mythtv/master commit: d8642dc0e by Chris Pinkham (cpinkham)

MythTV noreply at mythtv.org
Wed Apr 27 03:45:12 UTC 2011


      Author:  Chris Pinkham <cpinkham at mythtv.org>
 Change Date:  2011-04-26T20:34:49-07:00
   Push Date:  2011/04/26 20:45:09 -0700
  Repository:  mythtv
      Branch:  master
New Revision:  d8642dc0e4cc9d5c4a8d1ec7887083da69c53d78
   Changeset:  https://github.com/MythTV/mythtv/commit/d8642dc0e

Log:

HTML Setup: Add some <i18n> tags and add formatStr() functions.

Add <i18n> tags for translatable strings in .qsp files.

Add Javascript formatStr() function.

Add equivalent C++ formatStr() function and register it as callable
in .qsp Qt script code.

formatStr() usage is similar to QString::arg() usage.  Normally
this would also contain <i18n> tags as well so the string is
translated.  For example:

    var desc = formatStr("<i18n>User Job #%1</i18n>", 4);

After this line executes, desc would contain "User Job #4".  The
<i18n> tags would have been stripped out by the mythbackend
webserver during normal translation.  Translations may re-order
the %1, %2, etc. arguments and they will be automatically filled
in in proper order by formatStr(), similar to how QString::arg()
works.

Modified:

   mythtv/html/htmlstrings.h
   mythtv/html/js/util.qjs
   mythtv/html/misc/overview.qsp
   mythtv/html/samples/storagegroups.qsp
   mythtv/html/setup/jobqueue-jobs.qsp
   mythtv/html/setup/wizard-network.qsp
   mythtv/libs/libmythupnp/serverSideScripting.cpp



More information about the mythtv-commits mailing list