script: Support translatable strings for properties
authorEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 6 Mar 2012 14:23:33 +0000 (14:23 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Tue, 6 Mar 2012 14:23:33 +0000 (14:23 +0000)
commit764640419607b4918515f42722bb0950ea23d90c
tree7313134a60d9e468ef12603461004cdbb467f3a0
parent4a9414ff870ce74d3194425d30709124558eacd2
script: Support translatable strings for properties

ClutterScript should be able to automatically call gettext() and friends
on strings loaded from a UI definition, prior to passing the string to
the object it is constructing.

The basic implementation is trivial:

  - set a translation domain on the ClutterScript instance
  - mark the translatable strings inside the JSON data, like:

      "property" : {
        "translatable" : true,
        "string" : "a translatable string"
      }

The hard part is now getting the tools we use to extract the
translatable strings to understand the JSON format we use inside
ClutterScript.
clutter/clutter-script-parser.c
clutter/clutter-script-private.h
clutter/clutter-script.c
clutter/clutter-script.h
tests/data/test-script.json