Skip to content

Commit

Permalink
Merge branch 'release/1.8.0' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
Lionel Laské committed Apr 10, 2024
2 parents bb07df3 + 62958db commit 97517a1
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 46 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
## [1.8.0] - 2024-04-10
### Added
- Chart Activity
- Word Puzzle Template in Exerciser activity
Expand Down
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ As all Open Source software, contributions to Sugarizer are welcome.

A good way to start to contribute is testing and trying Sugarizer to find some issues. If you find one, don't be shy, submit your issue [here](https://github.com/llaske/Sugarizer/issues) by giving the maximum information on it, specifically detailed steps to reproduce it. We will check your issue and ask you more information if needed.

Issues are also the way to propose new features. If you have a suggestion, explain it in detail in an issue and we will discuss it.

If you're a developer, the best way to start is to read the [architecture](docs/architecture.md) then to do the whole [tutorial](docs/tutorial.md). It will give you a good understanding of Sugarizer internal.

When you think you're ready, you could try to fix some existing issues [here](https://github.com/llaske/Sugarizer/issues). If you find a fix, send a Pull Request, we will be pleased to review it.
Expand All @@ -17,6 +19,7 @@ So to send your Pull Request:

Few rules to respect when you fix an issue:

* [ ] Do not send a Pull Request without a related issue that has been approved by a Sugarizer maintainer,
* [ ] Ensure your pull request contains only update related to the fix,
* [ ] Respect indentation of the original file,
* [ ] Mention the issue number in the pull request but not in the commit message
Expand Down
27 changes: 12 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,20 +262,17 @@ At the end of the process, all JavaScript files in all directories have been rep

If you're not a developer and you want to translate Sugarizer into your own language, please go to the [Sugarizer translation platform](http://translate.sugarizer.org) where you will be able to do that. If you're a developer, the following paragraphs will explain to you how the Sugarizer localization system works.

Sugarizer use [webL10n](https://github.com/fabi1cazenave/webL10n) localization system by Fabien Cazenave.
Sugarizer use [i18next](https://www.i18next.com/) localization system.

Here is how to add a new translation. See a video tutorial [here](https://youtu.be/vTPVegrVm5A).
All strings are localized in JSON files in the [locales](locales) directory at the root of the repository.
If you want to add a new translation, copy the `en.json` files in a new one and:

All strings are localized in the [locale.ini](locale.ini) file at the root of the repository.
If you want to add a new translation, copy the whole [en] section at the end of the file and:
* Replace "en" in the new file name by the [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) of your language. For example, "fr.json" for French,
* Substitute the right side of the ":" character on each line of the file by the string localized in your language. For example:

* Replace "en" by the [ISO 639-1 code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) of your language. For example, "fr" for French,
* Substitute the right side of the "=" character on each line by the string localized in your language. For example:

[fr]
StartNew=Commencer un nouveau
NameActivity=Activité {{name}}
RemoveFavorite=Retirer le favori
"StartNew": "Commencer un nouveau",
"NameActivity": "Activité {{name}}",
"RemoveFavorite": "Retirer le favori",

Warning: Note that text inside {{}} must not be localized. So here, **{{name}}** is not translated.

Expand All @@ -286,13 +283,13 @@ Sugarizer automatically detects the navigator language. To enable this detection

Sugarizer settings display a list of all available languages. You need to add your language in this dialog. For this you have to:

* Add a new string in [locale.ini](locale.ini) with the name of your language in English. For example:
* Add a new string in [locales/en.json](locales/en.json) with the name of your language in English. For example:

French=French
"French": "French",

* Add the same line for all languages/sections in the file. If you're able to do that, translate the right side of the "=" character with the localized string for the name of your language. If you don't know how to translate it, just use the English word. For example:
* Add the same line in all other language files. If you're able to do that, translate the right side of the ":" character with the localized string for the name of your language. If you don't know how to translate it, just use the English word. For example:

French=Français
"French": "Français",

* Add your string in the [js/dialog.js](js/dialog.js) file in the create function of the Enyo class Sugar.DialogLanguage. You should give the ISO 639-1 language code and the new string for your language name. For example:

Expand Down
8 changes: 4 additions & 4 deletions activities/Exerciser.activity/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"main.css": "static/css/main.96e4dd2c.css",
"main.css.map": "static/css/main.96e4dd2c.css.map",
"main.js": "static/js/main.5502642c.js",
"main.js.map": "static/js/main.5502642c.js.map",
"main.css": "static/css/main.7b28c7c2.css",
"main.css.map": "static/css/main.7b28c7c2.css.map",
"main.js": "static/js/main.5d11dee0.js",
"main.js.map": "static/js/main.5d11dee0.js.map",
"static/media/README.md": "static/media/README.bc6c3970.md",
"static/media/activity-icon.svg": "static/media/activity-icon.4b722852.svg",
"static/media/add.svg": "static/media/add.038e3f81.svg",
Expand Down
2 changes: 1 addition & 1 deletion activities/Exerciser.activity/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><title>Exerciser Activity</title><meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width,viewport-fit=cover"/><link rel="stylesheet" media="not screen and (device-width:1200px) and (device-height:900px)" href="lib/sugar-web/graphics/css/sugar-96dpi.css"><link rel="stylesheet" media="screen and (device-width:1200px) and (device-height:900px)" href="lib/sugar-web/graphics/css/sugar-200dpi.css"><script type="text/javascript" src="../../cordova.js"></script><link href="./static/css/main.96e4dd2c.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><div id="drag-list-item"></div><script type="text/javascript" src="./static/js/main.5502642c.js"></script></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><title>Exerciser Activity</title><meta name="viewport" content="user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width,viewport-fit=cover"/><link rel="stylesheet" media="not screen and (device-width:1200px) and (device-height:900px)" href="lib/sugar-web/graphics/css/sugar-96dpi.css"><link rel="stylesheet" media="screen and (device-width:1200px) and (device-height:900px)" href="lib/sugar-web/graphics/css/sugar-200dpi.css"><script type="text/javascript" src="../../cordova.js"></script><link href="./static/css/main.7b28c7c2.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div><script type="text/javascript" src="./static/js/main.5d11dee0.js"></script></body></html>
Original file line number Diff line number Diff line change
Expand Up @@ -419,18 +419,6 @@ input[type='radio']:checked {
background-image: url(../icons/actions/radio-active.svg);
}
/* Textarea */
.palette textarea#description.expand {
resize: vertical !important;
max-height: 70vh !important;
}
#description .row expand {
resize: vertical !important;
max-height: 70vh !important;;
}
textarea #description.expand {
resize: vertical !important;
max-height: 70vh !important;
}
textarea {
margin: 2px;
border: 2px solid #808080;
Expand Down
2 changes: 1 addition & 1 deletion activities/Exerciser.activity/service-worker.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion activities/TamTamMicro.activity/simon.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ enyo.kind({
this.timeouts = [];

var that = this;
requirejs(["webL10n"], function(webL10n) {
requirejs(["l10n"], function(webL10n) {
that.START_MSG = webL10n.get("SimonStartMsg");
that.SCORE_MSG = webL10n.get("SimonScoreMsg");
that.LEVEL_MSG = webL10n.get("SimonLevelMsg");
Expand Down
4 changes: 2 additions & 2 deletions config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
<allow-navigation href="*" />

<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="31" />
<preference name="android-compileSdkVersion" value="31" />
<preference name="android-targetSdkVersion" value="33" />
<preference name="android-compileSdkVersion" value="33" />

<engine name="android" spec="9.0.0" />
<plugin name="cordova-plugin-inappbrowser" spec="5.0.0" />
Expand Down
6 changes: 4 additions & 2 deletions docs/credits.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ Initial activities in Sugarizer was developed by Lionel Laské (FoodChain, Abece
* Paint, Memorize, Record, Calculate and Media Viewer by Michaël Ohayon
* Gridpaint by Brian Silverman
* Speak by Vishal Batchu
* Chat, Markdown by Suraj Gillespie
* Chat by Utkarsh Siddhpura
* Chart by Utkarsh Siddhpura
* Markdown by Suraj Gillespie
* Moon by Shirsh Zibbu
* EToys by Vanessa Freudenberg
* Abacus, Reflection, XOEditor, Flip by Euan Ong
Expand All @@ -21,7 +23,7 @@ Initial activities in Sugarizer was developed by Lionel Laské (FoodChain, Abece
* Fototoon by Gonzalo Odiard
* Game of Life, Pomodoro by Sanatan Kumar
* Sprint Math by Mankirat Singh
* Exerciser by Mankirat Singh and Avinash Agarwal
* Exerciser by Mankirat Singh, Avinash Agarwal and Utkarsh Siddhpura
* Write by Ashish Aggarval
* Constellation, Planets by Andrea Gonzales
* Falabracman, Chess, MindMath, Tangram by Prakash Ujjwal
Expand Down
3 changes: 2 additions & 1 deletion lib/l10n.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ let l10ndefine = function (i18next, axios) {
} else {
// In node, load language file from disk
const fs = require('fs');
fs.readFile("./locales/" + lang + ".json", (err, data) => {
const electron = require('electron');
fs.readFile(electron.app.getAppPath()+"/locales/" + lang + ".json", (err, data) => {
if (err) {
console.log("Failed to load " + lang + " language: " + err);
resolve(null); // Resolve with null to indicate failure
Expand Down
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,10 @@ function createWindow () {
};
menu.submenu[0].label = l10n.get("Quit");
template.unshift(menu);

const { systemPreferences } = require('electron')
systemPreferences.askForMediaAccess('microphone');
systemPreferences.askForMediaAccess('camera');
}
var menu = Menu.buildFromTemplate(template);
Menu.setApplicationMenu(menu);
Expand Down

0 comments on commit 97517a1

Please sign in to comment.