bugGNU gettext - Bugs: bug #48903, xgettext: Add support for...


You are not allowed to post comments on this tracker with your current authentication level.

bug #48903: xgettext: Add support for ClutterScript

Submitter:  Philip Withnall <drbob>
Submitted:  Thu 25 Aug 2016 06:22:10 PM UTC
Category:  Other Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Wed 31 Aug 2016 12:55:47 PM UTC, comment #2: 

I agree that JSON+ITS would be a better long term solution. I don’t currently have time to work on it, but have requested that it get put in the roadmap for our current project at work, which will hopefully result in me getting time to work on it in some weeks’ time.

I don’t believe there is a JSONPath implementation for json-c. The only JSON library I could find with JSONPath support is json-glib, but that brings in a lot of dependencies (and circular ones) for gettext. It should be possible to implement a JSONPath parser internally without too much difficulty (it’s not a complex standard; in fact, it’s not a standard at all, but merely a suggestion on a web page, which makes implementing it a little interesting — various bits of it are ill-defined).

Philip Withnall <drbob>
Group Member
Sat 27 Aug 2016 03:54:43 PM UTC, comment #1: 

While the patch looks reasonable, I would like to see JSON+ITS being implemented at some point:

Do you know if there is any JSONPath implementation for json-c?

Daiki Ueno <ueno>
Group administrator
Thu 25 Aug 2016 06:22:10 PM UTC, original submission:  

ClutterScript is a UI definition language for the Clutter toolkit, based on JSON. It allows marking translatable strings by adding a ‘translatable’ attribute to an object, and putting the string to be translated in a ‘string’ attribute. Translations are looked up by Clutter at runtime, rather than being merged back into the ClutterScript file.


This adds an extractor for ClutterScript files, which uses json-c to parse the JSON. The dependency is optional, and can be disabled by compiling gettext with --without-json-c.

A couple of new test cases are included, which will be skipped if ClutterScript support is compiled out.

Philip Withnall <drbob>
Group Member


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #38663:  0001-xgettext-Add-support-for-ClutterScript.patch added by drbob (26KiB - text/x-patch - Updated to fix extracting from ClutterScript files with an array as the root node)
file #38357:  0001-xgettext-Add-support-for-ClutterScript.patch added by drbob (24KiB - text/x-patch - xgettext: Add support for ClutterScript)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by haible (Updated the item)
  • -email is unavailable- added by ueno (Posted a comment)
  • -email is unavailable- added by drbob (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-27 haible CategoryNone Other
    2016-10-04 drbob Attached File- Added 0001-xgettext-Add-support-for-ClutterScript.patch, #38663
    2016-08-25 drbob Attached File- Added 0001-xgettext-Add-support-for-ClutterScript.patch, #38357

    Back to the top

    Powered by Savane 3.13-599c.
    Corresponding source code