Closed
Bug 897168
Opened 13 years ago
Closed 13 years ago
Fix up localization for the goggles
Categories
(Webmaker Graveyard :: X-Ray Goggles, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: michiel, Assigned: alicoding)
Details
Attachments
(1 file)
Plan of attack:
- write script to convert transifex key-value-json into goggles jquery.localization.extend format
- modify our views/settings.js so that the "language" property uses i18n-abide to figure which language it should be serving,
- create the custom /src/locale/...js files that we need to support any language we need supported.
idea for settings.js:
(function(jQuery) {
"use strict";
function makeAbsoluteURL(baseURI, url) {
if (url.match(/^https?:/))
return url;
return baseURI + url;
}
jQuery.webxraySettings = {
extend: jQuery.extend,
url: function(name) {
if (jQuery.isArray(this[name])) {
var self = this;
return jQuery.map(this[name], function(url) {
return makeAbsoluteURL(self.baseURI, url);
});
}
return makeAbsoluteURL(this.baseURI, this[name]);
},
language: (function() {
// loaded once, when webxray starts up
jQuery.getScript("/src/i18n-abide.js");
// i18n is now loaded, get the client-global language
var lang = i18n-abide.requestLanguage();
// make sure webxray, for this uses, uses this langauge,
// or "en" as fallback language.
return lang + " en";
}()),
baseURI: "",
cssURL: "webxray.css",
preferencesURL: "preferences.html",
easyRemixDialogURL: "easy-remix-dialog/index.html",
uprootDialogURL: "uproot-dialog.html",
bugReportDialogURL: "bug-report-dialog.html",
hackpubURL: "http://hackpub.hackasaurus.org/",
bugReportHackpubURL: "http://hackpub.hackasaurus.org/buckets/webxray-bugs/",
hackpubInjectionURL: "published-hack/injector.js",
pluginURLs: []
};
})(jQuery);
we will also need to change the app.js to serve up i18n-abide, of course.
note that our transifex -> jquery.lo... conversion script would have to generate the files into the ./webxray/src/locale directory
| Assignee | ||
Comment 4•13 years ago
|
||
Attachment #792209 -
Flags: review?(pomax)
Attachment #792209 -
Flags: review?(david.humphrey)
| Assignee | ||
Updated•13 years ago
|
Status: NEW → ASSIGNED
Updated•13 years ago
|
Attachment #792209 -
Flags: review?(david.humphrey) → review-
Comment on attachment 792209 [details] [review]
https://github.com/mozilla/goggles.webmaker.org/pull/14
I will r- until the next iteration, since there are too many comments on the pull request at this point.
Attachment #792209 -
Flags: review?(pomax) → review-
| Assignee | ||
Updated•13 years ago
|
Attachment #792209 -
Flags: review?(pomax)
Attachment #792209 -
Flags: review?(david.humphrey)
Attachment #792209 -
Flags: review-
Comment 6•13 years ago
|
||
Comment on attachment 792209 [details] [review]
https://github.com/mozilla/goggles.webmaker.org/pull/14
This is really looking good. Some feedback in the PR. I'm unclear if I'll be able to finish the full review of this before my holidays, so don't block on me if it goes beyond today. Pomax can take over, and Jon if you need more eyes.
Amazing, amazing work here Ali. ^5
Attachment #792209 -
Flags: review?(david.humphrey) → review-
| Assignee | ||
Updated•13 years ago
|
Attachment #792209 -
Flags: review?(jon)
Comment 7•13 years ago
|
||
Comment on attachment 792209 [details] [review]
https://github.com/mozilla/goggles.webmaker.org/pull/14
Looking good to me, please address all of humph's comments though
Attachment #792209 -
Flags: review?(jon) → review+
Comment on attachment 792209 [details] [review]
https://github.com/mozilla/goggles.webmaker.org/pull/14
couple of notes in the pull request that I'd like addressed before I r+ this.
Attachment #792209 -
Flags: review?(pomax) → review-
Comment on attachment 792209 [details] [review]
https://github.com/mozilla/goggles.webmaker.org/pull/14
r+ with two things: 1) take out th-TH so we don't accidentally land it with bad thai support, an 2) we need to file one or more followups for tackling the things we don't have localised atm: tutorial images, sign in/out include from webmaker.org, etc.
Attachment #792209 -
Flags: review- → review+
| Assignee | ||
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Updated•13 years ago
|
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in
before you can comment on or make changes to this bug.
Description
•