Skip to content

Commit 21da318

Browse files
author
Lionel Laské
committed
Merge branch 'pr/1489' into dev
2 parents 74c9875 + f3f4d54 commit 21da318

File tree

20 files changed

+438
-3612
lines changed

20 files changed

+438
-3612
lines changed

activities/Write.activity/index.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
<script src="./lib/intro.js"></script>
1818
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
1919
<script>if (window.module) module = window.module;</script>
20-
<!-- Add locale.ini file -->
21-
<link rel="prefetch" type="application/l10n" href="locale.ini">
2220
<script>if (typeof module === 'object') {window.module = module; module = undefined;}</script>
2321
<script src="lib/quill/quill-cursors.js"></script>
2422
<script src="lib/quill/quill.min.js"></script>

activities/Write.activity/js/activity.js

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ define([
1010
"sugar-web/env",
1111
"sugar-web/graphics/presencepalette",
1212
"activity/palettes/export-palette",
13-
"webL10n",
13+
"l10n",
1414
"tutorial"
15-
], function (activity,formatpalette,listpalette,parapalette,fontPalette,colorpalette , datastore , journalchooser,env,presencepalette,exportpalette,webL10n,tutorial) {
15+
], function (activity,formatpalette,listpalette,parapalette,fontPalette,colorpalette , datastore , journalchooser,env,presencepalette,exportpalette,l10n,tutorial) {
1616

1717
// Manipulate the DOM only when it is ready.
1818
requirejs(['domReady!','humane'], function (doc,humane) {
@@ -47,53 +47,53 @@ define([
4747
// Language Settings
4848
var defaultLanguage = (typeof chrome != 'undefined' && chrome.app && chrome.app.runtime) ? chrome.i18n.getUILanguage() : navigator.language;
4949
var language = environment.user ? environment.user.language : defaultLanguage;
50-
webL10n.language.code = language;
50+
l10n.init(language);
5151
window.addEventListener("localized", function() {
52-
document.getElementById("network-button").title = webL10n.get("Network");
53-
document.getElementById("color-button-1").title = webL10n.get("ForegroundColor");
54-
document.getElementById("color-button-2").title = webL10n.get("BackgroundColor");
55-
document.getElementById("format-text").title = webL10n.get("Formattext");
56-
document.getElementById("paragraph").title = webL10n.get("Paragraph");
57-
document.getElementById("list").title = webL10n.get("List");
58-
document.getElementById("resize-inc").title = webL10n.get("Increasefontsize");
59-
document.getElementById("font-button").title = webL10n.get("ChooseFont");
60-
document.getElementById("resize-dec").title = webL10n.get("Decreasefontsize");
61-
document.getElementById("insert-picture").title = webL10n.get("Image");
62-
document.getElementById("edit-undo").title = webL10n.get("Undo");
63-
document.getElementById("edit-redo").title = webL10n.get("Redo");
64-
document.getElementById("edit-copy").title = webL10n.get("Copy");
65-
document.getElementById("edit-paste").title = webL10n.get("Paste");
66-
document.getElementById("export").title = webL10n.get("Export");
67-
document.getElementById("super-script").title = webL10n.get("SuperScript");
68-
document.getElementById("sub-script").title = webL10n.get("SubScript");
69-
document.getElementById(5).title = webL10n.get("Bold");
70-
document.getElementById(6).title = webL10n.get("Italic");
71-
document.getElementById(7).title = webL10n.get("Underline");
72-
document.getElementById(8).title = webL10n.get("Strike");
73-
document.getElementById(9).title = webL10n.get("OrderedList");
74-
document.getElementById(10).title = webL10n.get("UnorderedList");
75-
document.getElementById(11).title = webL10n.get("JustifyLeft");
76-
document.getElementById(12).title = webL10n.get("JustifyRight");
77-
document.getElementById(13).title = webL10n.get("JustifyCenter");
78-
document.getElementById(19).title = webL10n.get("ExportToTxt");
79-
document.getElementById(20).title = webL10n.get("ExportToPdf");
80-
document.getElementById(21).title = webL10n.get("ExportToDoc");
81-
document.getElementById(22).title = webL10n.get("ExportToOdt");
52+
document.getElementById("network-button").title = l10n.get("Network");
53+
document.getElementById("color-button-1").title = l10n.get("ForegroundColor");
54+
document.getElementById("color-button-2").title = l10n.get("BackgroundColor");
55+
document.getElementById("format-text").title = l10n.get("Formattext");
56+
document.getElementById("paragraph").title = l10n.get("Paragraph");
57+
document.getElementById("list").title = l10n.get("List");
58+
document.getElementById("resize-inc").title = l10n.get("Increasefontsize");
59+
document.getElementById("font-button").title = l10n.get("ChooseFont");
60+
document.getElementById("resize-dec").title = l10n.get("Decreasefontsize");
61+
document.getElementById("insert-picture").title = l10n.get("Image");
62+
document.getElementById("edit-undo").title = l10n.get("Undo");
63+
document.getElementById("edit-redo").title = l10n.get("Redo");
64+
document.getElementById("edit-copy").title = l10n.get("Copy");
65+
document.getElementById("edit-paste").title = l10n.get("Paste");
66+
document.getElementById("export").title = l10n.get("Export");
67+
document.getElementById("super-script").title = l10n.get("SuperScript");
68+
document.getElementById("sub-script").title = l10n.get("SubScript");
69+
document.getElementById(5).title = l10n.get("Bold");
70+
document.getElementById(6).title = l10n.get("Italic");
71+
document.getElementById(7).title = l10n.get("Underline");
72+
document.getElementById(8).title = l10n.get("Strike");
73+
document.getElementById(9).title = l10n.get("OrderedList");
74+
document.getElementById(10).title = l10n.get("UnorderedList");
75+
document.getElementById(11).title = l10n.get("JustifyLeft");
76+
document.getElementById(12).title = l10n.get("JustifyRight");
77+
document.getElementById(13).title = l10n.get("JustifyCenter");
78+
document.getElementById(19).title = l10n.get("ExportToTxt");
79+
document.getElementById(20).title = l10n.get("ExportToPdf");
80+
document.getElementById(21).title = l10n.get("ExportToDoc");
81+
document.getElementById(22).title = l10n.get("ExportToOdt");
8282
});
8383

8484
if (!environment.objectId && !environment.sharedId) {
8585
// New instance
8686
// Intentionally added setTimeout to allow locale.ini file to be loaded
8787
setTimeout(function(){
8888
editor.setContents([
89-
{insert: webL10n.get('Welcome',{username: environment.user.name}) + '\n' , attributes: { size: "40px" , color : environment.user.colorvalue.stroke , bold: true }},
89+
{insert: l10n.get('Welcome',{username: environment.user.name}) + '\n' , attributes: { size: "40px" , color : environment.user.colorvalue.stroke , bold: true }},
9090
]);
9191
var length = editor.getLength();
92-
editor.clipboard.dangerouslyPasteHTML(length,webL10n.get('Write'));
92+
editor.clipboard.dangerouslyPasteHTML(length,l10n.get('Write'));
9393
length = editor.getLength();
94-
editor.clipboard.dangerouslyPasteHTML(length,webL10n.get('Writefeatures'));
94+
editor.clipboard.dangerouslyPasteHTML(length,l10n.get('Writefeatures'));
9595
length = editor.getLength();
96-
editor.clipboard.dangerouslyPasteHTML(length,webL10n.get('Enjoy'));
96+
editor.clipboard.dangerouslyPasteHTML(length,l10n.get('Enjoy'));
9797
length = editor.getLength();
9898
editor.clipboard.dangerouslyPasteHTML(length,"<br></br>");
9999
length = editor.getLength();
@@ -393,7 +393,7 @@ define([
393393
};
394394
datastore.create(metadata, function() {
395395
console.log("export done.");
396-
humane.log(webL10n.get("Txt"));
396+
humane.log(l10n.get("Txt"));
397397
}, inputData);
398398
});
399399

@@ -439,7 +439,7 @@ define([
439439
};
440440
datastore.create(metadata, function() {
441441
console.log("export done.");
442-
humane.log(webL10n.get("Pdf"));
442+
humane.log(l10n.get("Pdf"));
443443
}, inputData);
444444
});
445445
});
@@ -466,7 +466,7 @@ define([
466466
};
467467
datastore.create(metadata, function() {
468468
console.log("export done.");
469-
humane.log(webL10n.get("Doc"));
469+
humane.log(l10n.get("Doc"));
470470
}, inputData);
471471
});
472472

@@ -488,7 +488,7 @@ define([
488488
};
489489
datastore.create(metadata, function() {
490490
console.log("export done.");
491-
humane.log(webL10n.get("Odt"));
491+
humane.log(l10n.get("Odt"));
492492
resetXML();
493493
}, inputData);
494494

@@ -615,13 +615,13 @@ define([
615615
console.log(connectedPeople[key].name,key,connectedPeople[key].networkId);
616616
}
617617
if(msg.move==1){
618-
humane.log(html + webL10n.get("PlayerJoin",{user: userName}));
618+
humane.log(html + l10n.get("PlayerJoin",{user: userName}));
619619
var c = cursors.createCursor(msg.user.networkId, userName, msg.user.colorvalue.stroke);
620620
if(myid==msg.user.networkId) {mycursor=c;}
621621
}
622622
if (msg.move === -1) {
623623
cursors.removeCursor(msg.user.networkId);
624-
humane.log(html + webL10n.get("PlayerLeave",{user: userName}));
624+
humane.log(html + l10n.get("PlayerLeave",{user: userName}));
625625
if(msg.user.networkId == connectedPeople[0].networkId){
626626
if(connectedPeople[1].networkId == myid){
627627
document.getElementById(3).style.display = "inline";

0 commit comments

Comments
 (0)