Merge pull request #1459 from yunohost-bot/anonymous-2020-12-02_09-10-43

[Anonymous contrib] Add number parser
This commit is contained in:
Alexandre Aubin 2020-12-15 15:06:57 +01:00 committed by GitHub
commit 39d11e9008
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -87,7 +87,7 @@ Example in toml:
[maybe.some.stuff.before.the_name]
type = "string"
ask.en = "the question in english"
ask.fr = "the question in french"
ask.fr = "la question en français"
example = "an example value" # optional
choices = ["fr", "en"]
default = "en" # optional
@ -250,6 +250,34 @@ And in json:
},
```
### Number
Like string except the user needs to enter a number
Example in toml:
```toml
[maybe.some.stuff.before.the_name]
type = "number"
ask.en = "the question in english"
ask.fr = "the question in french"
default = 0
```
And in json:
```javascript
{
"name": "the_name",
"type": "number",
"ask": {
"en": "the question in english",
"fr": "the question in french"
},
"default": 0
},
```
### App
This type will ask the user to select an application in the list of installed