Skip to content

Commit

Permalink
Merge branch 'pr/1703' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Laské committed Jan 15, 2025
2 parents d54706c + c234a15 commit b4e9959
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Unusual Draw in Chess Activity #1678
- Pressing the start button in ColorMyWorld activity immediately shows "Congratulations! You finished!" #1691
- Broken dialog box on first screen tutorial #1418
- Sample values in Chart activity are not initialized #1695

## [1.8.0] - 2024-04-10
### Added
Expand Down
12 changes: 12 additions & 0 deletions activities/Chart.activity/js/activity.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ const app = new Vue({
"csv-view": CsvView,
},
data: {
isLocalized: false,
pendingNewInstance: false,
currentenv: null,
SugarL10n: null,
SugarPresence: null,
Expand Down Expand Up @@ -145,9 +147,15 @@ const app = new Vue({
});
},
localized() {
this.isLocalized = true;
this.SugarL10n.localize(this.l10n);
document.getElementById("export-csv-button").title = this.l10n.stringexportAsCSV;
document.getElementById("export-img-button").title = this.l10n.stringSaveImage;
// If onJournalNewInstance was triggered before localization
if (this.pendingNewInstance) {
this.onJournalNewInstance(); // Execute the pending call
this.pendingNewInstance = false;
}

},

Expand Down Expand Up @@ -270,6 +278,10 @@ const app = new Vue({


onJournalNewInstance() {
if (!this.isLocalized) {
this.pendingNewInstance = true; // Mark the call as pending
return;
}
const randArr = this.shuffleArray([1, 2, 3, 4, 5, 6]);
for(let i = 0; i < 3; i++) {
const label = "EgLabel" + randArr[i];
Expand Down

0 comments on commit b4e9959

Please sign in to comment.