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

Submitted by:  Philip Withnall <drbob>
Submitted on:  Thu 25 Aug 2016 06:22:10 PM UTC  
 
Category: OtherSeverity: 3 - Normal
Item Group: NoneStatus: None
Privacy: PublicAssigned 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>
Project 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:
https://www.w3.org/International/its/wiki/JSON%2BITS

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

Daiki Ueno <ueno>
Project 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.

https://developer.gnome.org/clutter/stable/ClutterScript.html

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>
Project Member

 

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
  • -unavailable- added by haible (Updated the item)
  • -unavailable- added by ueno (Posted a comment)
  • -unavailable- added by drbob (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 27 Nov 2016 12:18:14 PM UTChaibleCategoryNone=>Other
    Tue 04 Oct 2016 03:39:11 PM UTCdrbobAttached File-=>Added 0001-xgettext-Add-support-for-ClutterScript.patch, #38663
    Thu 25 Aug 2016 06:22:10 PM UTCdrbobAttached File-=>Added 0001-xgettext-Add-support-for-ClutterScript.patch, #38357

    Back to the top


    Powered by Savane 3.1-cleanup1