summaryrefslogtreecommitdiff
path: root/webhelper/webextensions/wh2extension.c
Commit message (Collapse)AuthorAge
* Handle excess whitespace in stringsPhilip Chimento2015-06-18
| | | | | | | | | | | | Whitespace between words and tags doesn't matter to HTML. Indeed, the text in a translatable element may be formatted any way over any number of lines, so we normalize all consecutive whitespace to be just one space character and strip whitespace from the beginning and end of the strings. This is so that translators are not confronted with strange newlines and whitespace on Transifex. [endlessm/eos-sdk#3291]
* webhelper: cast ngettext() number to guint64 instead of gulongCosimo Cecchi2015-05-22
| | | | | | This fixes the test suite on my BRIX. [endlessm/eos-sdk#291]
* Export webview DBus objects when bus readyPhilip Chimento2015-05-22
| | | | | | | | | Instead of starting an idle function when a webview page is created that waits until the bus connection object is ready before exporting an object on it, we save all page IDs that we haven't registered yet and instead register them all at once when the bus is ready. [endlessm/eos-sdk#291]
* Expose ngettext() to client-side JSPhilip Chimento2015-05-21
| | | | | | | | | This exposes the function set by webhelper.set_ngettext() to the client- side Javascript as a ngettext() function, defined on the global window object. This allows apps to translate messages that need to be separated into singular and plural, just like the C ngettext() function. [endlessm/eos-sdk#291]
* Expose gettext() to client-side JSPhilip Chimento2015-05-21
| | | | | | | | | | | | | | This exposes the function set by webhelper.set_gettext() to the client- side Javascript as a gettext() function, defined on the global window object. This allows apps to translate messages that are generated at runtime, not just messages in static HTML. Some often-used JavaScriptCore operations can be turned into separate functions, which we can put in a separate source file. This is in anticipation of the next commit where we will define another function property of the global object. [endlessm/eos-sdk#291]
* WebHelper2 for translating WebKit2 viewsPhilip Chimento2015-05-21
This adds a new Javascript module, WebHelper2. It's the WebKit2 analogue to WebHelper. It offers a facility for calling gettext() on the contents of DOM elements in your web page. It accomplishes this using an extension module that's loaded into WebKit's web process. [endlessm/eos-sdk#291]