From 7c550a4dcd6e1503ae01c3c1693f036ef8f36fd7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Feb 2021 15:43:43 +0100 Subject: [PATCH 01/10] Delete app.src --- conf/app.src | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 conf/app.src diff --git a/conf/app.src b/conf/app.src deleted file mode 100644 index f95eb29..0000000 --- a/conf/app.src +++ /dev/null @@ -1,6 +0,0 @@ -SOURCE_URL=https://github.com/apankrat/nullboard/archive/d449da9f54677ef9ef5c066106e78c0b16be996a.tar.gz -SOURCE_SUM=1126b02a8626e6685c4b6f1892ea43a6e3aa7a04cc91243bea672d10268435e8 -SOURCE_SUM_PRG=sha256sum -SOURCE_FORMAT=tar.gz -SOURCE_IN_SUBDIR=true -SOURCE_FILENAME= From 9415fd32ac4d30330fe8365f0504ff1a1cbb1bed Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Feb 2021 16:06:44 +0100 Subject: [PATCH 02/10] Fix --- README.md | 5 +++++ README_fr.md | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index ae510a7..18765b8 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,11 @@ TiddlyWiki is a complete interactive wiki in JavaScript. It can be used as a sin * [Official demo](https://tiddlywiki.com/) +## Documentation + + * Official documentation: Link to the official documentation of this app + * YunoHost documentation: If specific documentation is needed, feel free to contribute. + #### Supported architectures * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/tiddlywiki%20%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/tiddlywiki/) diff --git a/README_fr.md b/README_fr.md index 69dc4cb..eeffa69 100644 --- a/README_fr.md +++ b/README_fr.md @@ -22,6 +22,11 @@ TiddlyWiki est un wiki interactif complet en JavaScript. Il peut être utilisé * [Démo officielle](https://tiddlywiki.com/) +## Documentation + + * Documentation officielle : Lien vers la documentation officielle de cette application. + * Documentation YunoHost : Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. + #### Architectures supportées * x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/tiddlywiki%40%28Apps%29.svg)](https://ci-apps.yunohost.org/ci/apps/tiddlywiki/) From 1b972879da11f7d3eb9e7f0395a62d44ef60291f Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Feb 2021 21:30:04 +0100 Subject: [PATCH 03/10] Update README_fr.md --- README_fr.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_fr.md b/README_fr.md index eeffa69..a050010 100644 --- a/README_fr.md +++ b/README_fr.md @@ -24,7 +24,7 @@ TiddlyWiki est un wiki interactif complet en JavaScript. Il peut être utilisé ## Documentation - * Documentation officielle : Lien vers la documentation officielle de cette application. + * Documentation officielle : https://tiddlywiki.com/languages/fr-FR/index.html * Documentation YunoHost : Si une documentation spécifique est nécessaire, n'hésitez pas à contribuer. #### Architectures supportées From d7b206aba8d270e391e485fc9c15b24e90bb356d Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Feb 2021 21:30:50 +0100 Subject: [PATCH 04/10] Create empty_fr.html --- sources/empty_fr.html | 16811 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 16811 insertions(+) create mode 100644 sources/empty_fr.html diff --git a/sources/empty_fr.html b/sources/empty_fr.html new file mode 100644 index 0000000..7d008f3 --- /dev/null +++ b/sources/empty_fr.html @@ -0,0 +1,16811 @@ + + + + + + + + + + + + + + + + + + + + +TiddlyWiki — un carnet de notes web personnel et non linéaire + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + From ff46ebc15076951476bb25b7372b91b35417de25 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 16 Feb 2021 21:51:20 +0100 Subject: [PATCH 05/10] Update manifest.json --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index f96f934..5c52be5 100644 --- a/manifest.json +++ b/manifest.json @@ -8,7 +8,7 @@ }, "version": "5.1.23~ynh1", "url": "https://nullboard.io/preview", - "license": "BSD-2-Clause", + "license": "BSD-3-Clause", "maintainer": { "name": "eric_G", "email": "" From 10ef7be920334f7c6ec155fd251d9ac1e5fb6fc5 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 1 Mar 2021 20:53:01 +0100 Subject: [PATCH 06/10] Cleaning up --- scripts/install | 1 - scripts/upgrade | 1 - 2 files changed, 2 deletions(-) diff --git a/scripts/install b/scripts/install index 4f3cbde..de02526 100755 --- a/scripts/install +++ b/scripts/install @@ -44,7 +44,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=2 ynh_app_setting_set --app=$app --key=domain --value=$domain ynh_app_setting_set --app=$app --key=path --value=$path_url -ynh_app_setting_set --app=$app --key=is_public --value=$is_public #================================================= # STANDARD MODIFICATIONS diff --git a/scripts/upgrade b/scripts/upgrade index dc4d419..76c7c59 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -17,7 +17,6 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) -is_public=$(ynh_app_setting_get --app=$app --key=is_public) final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= From f324bdb7be039ce184fcda8e03398d710352dce9 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 2 Mar 2021 20:56:52 +0100 Subject: [PATCH 07/10] Update upgrade --- scripts/upgrade | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/upgrade b/scripts/upgrade index 76c7c59..90cac05 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -59,7 +59,9 @@ then ynh_script_progression --message="Upgrading source files..." --weight=4 # Download, check integrity, uncompress and patch the source from app.src - ynh_setup_source --dest_dir="$final_path" + #ynh_setup_source --dest_dir="$final_path" + mkdir -p $final_path + cp -a ../sources/empty.html $final_path/empty.html fi #================================================= From febdc6fdf95188f3fdc285811e3206dca95e721a Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Wed, 10 Mar 2021 18:08:54 +0100 Subject: [PATCH 08/10] Add language --- manifest.json | 10 ++++++++++ scripts/install | 13 ++++++++++--- scripts/upgrade | 12 ++++++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/manifest.json b/manifest.json index 5c52be5..b05e18a 100644 --- a/manifest.json +++ b/manifest.json @@ -53,6 +53,16 @@ "fr": "Si cette case est cochée, TiddlyWiki sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." }, "default": true + }, + { + "name": "language", + "type": "string", + "ask": { + "en": "Choose the application language", + "fr": "Choisissez la langue de l'application" + }, + "choices": ["fr", "en"], + "default": "fr" } ] } diff --git a/scripts/install b/scripts/install index de02526..6d31eb5 100755 --- a/scripts/install +++ b/scripts/install @@ -22,6 +22,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH is_public=$YNH_APP_ARG_IS_PUBLIC +language=$YNH_APP_ARG_LANGUAGE app=$YNH_APP_INSTANCE_NAME @@ -42,8 +43,9 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url #================================================= ynh_script_progression --message="Storing installation settings..." --weight=2 -ynh_app_setting_set --app=$app --key=domain --value=$domain -ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=domain --value=$domain +ynh_app_setting_set --app=$app --key=path --value=$path_url +ynh_app_setting_set --app=$app --key=language --value=$language #================================================= # STANDARD MODIFICATIONS @@ -58,7 +60,12 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path #ynh_setup_source --dest_dir="$final_path" mkdir -p $final_path -cp -a ../sources/empty.html $final_path/empty.html + +if [ "$language" = "fr" ]; then + cp -a ../sources/empty_fr.html $final_path/empty.html +else + cp -a ../sources/empty.html $final_path/empty.html +fi #================================================= # NGINX CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 90cac05..1a882b3 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,6 +18,7 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) +language=$(ynh_app_setting_get --app=$app --key=language) #================================================= # CHECK VERSION @@ -36,6 +37,12 @@ if [ -z "$final_path" ]; then ynh_app_setting_set --app=$app --key=final_path --value=$final_path fi +# Save the language used if not present +if [ -z "$language" ]; then + language="en" + ynh_app_setting_set --app=$app --key=language --value=$language +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -61,7 +68,12 @@ then # Download, check integrity, uncompress and patch the source from app.src #ynh_setup_source --dest_dir="$final_path" mkdir -p $final_path + + if [ "$language" = "fr" ]; then + cp -a ../sources/empty_fr.html $final_path/empty.html + else cp -a ../sources/empty.html $final_path/empty.html + fi fi #================================================= From 4d8df44a4f389140e5a93f4b583ca5051a51b670 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 08:58:14 +0100 Subject: [PATCH 09/10] Update manifest.json --- manifest.json | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/manifest.json b/manifest.json index b05e18a..468eb5f 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "" }, "requirements": { - "yunohost": ">= 4.0.0" + "yunohost": ">= 4.1.7" }, "multi_instance": true, "services": [ @@ -25,29 +25,17 @@ { "name": "domain", "type": "domain", - "ask": { - "en": "Choose a domain for TiddlyWiki", - "fr": "Choisissez un nom de domaine pour TiddlyWiki" - }, "example": "domain.org" }, { "name": "path", "type": "path", - "ask": { - "en": "Choose a path for TiddlyWiki", - "fr": "Choisissez un chemin pour TiddlyWiki" - }, "example": "/tiddlywiki", "default": "/tiddlywiki" }, { "name": "is_public", "type": "boolean", - "ask": { - "en": "Is it a public application?", - "fr": "Est-ce une application publique ?" - }, "help": { "en": "If enabled, TiddlyWiki will be accessible by people who doesn’t have an account. This can be changed later via the webadmin.", "fr": "Si cette case est cochée, TiddlyWiki sera accessible aux personnes n’ayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." From be4fde34fa7c20f5fac02e8829e91684177341a1 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Mon, 15 Mar 2021 10:40:41 +0100 Subject: [PATCH 10/10] cleaning up --- scripts/change_url | 2 -- scripts/upgrade | 7 +++++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/change_url b/scripts/change_url index e912667..6e8d89a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -8,8 +8,6 @@ source /usr/share/yunohost/helpers -ynh_abort_if_errors - #================================================= # RETRIEVE ARGUMENTS #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 1a882b3..b3fcb6e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -43,6 +43,13 @@ if [ -z "$language" ]; then ynh_app_setting_set --app=$app --key=language --value=$language fi +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #=================================================