For now all we have for JS is Drupal.t() and Drupal.formatPlural() which is nice but pretty basic.
We need to look at what we can do on the JS side to help with localizing JS strings and how that can fit with JS libraries that already have internationalization tools/processes. It might turn out we don't want to do much more than what we're currently doing, I don't know.
First we need to list all the problems/limitation of the current state of things then brainstorm ideas about how to address this.
Comments
Comment #1
Gábor HojtsyDrupal.t() and Drupal.formatPlural() although not very well known, are fantastic in that they map to their PHP equivalents basically 1-1 (except JS syntax obviously). I think there are certain values in there, that would be bad to loose unless we have very good reasons to do something else in JS. (Also, we put in tons of work to level the JS functionality with the Drupal PHP API side, adding context in D8 to JS strings too, so we invested quite a bit there already :).
Comment #2
nod_Yes I agree, I'm not trying to undermine the work already done on the JS side of things.
I'm concerned when I see issues like this one (it's verbose and doesn't minify very well/at all) #507502: (needs documentation) Provide Locale support for jQuery UI. I'd like to fine a more elegant solution for it and maybe make it possible to integrate a bit more gracefully with the translations provided by the third party library or help third party script integrate with drupal translations. I'm not sure it has to be done but it needs to be discussed at least.
Comment #3
Gábor HojtsyYes, those sound like great goals. Retiling for that to reflect that we are not redoing the existing functionality.
Comment #4
nod_Yep much better, thanks. That's what I had in mind, was putting the wrong words over it.
Comment #5
Gábor HojtsyFix tag.
Comment #6
nod_Comment #18
nod_Cleaning-up my issues