Skip to content

Commit 026c194

Browse files
committed
Clean dependencies + upgrade + fix syntaxes
1 parent f40d516 commit 026c194

14 files changed

Lines changed: 3834 additions & 5826 deletions

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/checkout@v2
1616
- uses: actions/setup-node@v3
1717
with:
18-
node-version: 16.x
18+
node-version: 22.x
1919
cache: yarn
2020

2121
- name: Install dependencies

babel.config.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
module.exports = {
22
presets: [
3-
require.resolve('@docusaurus/core/lib/babel/preset'),
4-
require.resolve("@babel/preset-react")
3+
require.resolve('@docusaurus/core/lib/babel/preset')
54
],
6-
plugins: [
7-
require.resolve('@babel/plugin-proposal-class-properties')
8-
]
9-
};
5+
};

blog/2019-05-28-hola.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

blog/2019-05-29-hello-world.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

blog/2019-05-30-welcome.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/Internationalization.md

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ If you want to create multilingual compatible templates, you have to pay a speci
1313

1414
Thelia provides several Smarty functions to help you.
1515

16-
### {intl}
17-
18-
The {intl} function translates a string into the current language.
16+
### `{intl}`
1917

18+
The `{intl}` function translates a string into the current language.
19+
```
2020
{intl l="This is a string to translate"}
2121
2222
or
@@ -26,8 +26,8 @@ The {intl} function translates a string into the current language.
2626
or
2727
2828
{intl l="Hello, %name, how do you do ?" name={$name}}
29-
30-
We have here three typical uses of {intl}
29+
```
30+
We have here three typical uses of `{intl}`
3131

3232
#### `l`
3333

@@ -59,39 +59,40 @@ For examples, in the `layout.tpl` file of the default front-office template, you
5959
When using `{intl}` in a Javascript string, the translated string may contain simple and/or double quotes, that should be escaped to prevent a syntax error.
6060

6161
To do so, use the `js` parameter, that will escape single and double quotes :
62-
62+
```js
6363
var myString = '{intl l="A string with 'simple' and \"double\" quotes" js=1}';
64-
64+
```
6565
The result will be :
66-
66+
```js
6767
var myString = 'A string \'simple\' and \"double\" quotes';
68-
68+
```
6969
You may also use the escape:'html' Smarty modifier :
70-
70+
```js
7171
var myString = '{intl l="A string with 'simple' and \"double\" quotes"|escape:'html'}';
72+
```
7273

7374
The result will be in this case :
74-
75+
```js
7576
var myString = 'A string with 'simple' and "double" quotes';
76-
77+
```
7778
The 'quotes' modifier could also be used, with some care as it escapes only simple quotes :
78-
79+
```js
7980
var myString = '{intl l="A string with 'simple' and \"double\" quotes"|escape:'quotes'}';
80-
81+
```
8182
will gives :
82-
83+
```js
8384
var myString = 'A string with \'simple\' and "double" quotes';
84-
85+
```
8586
#### Translating your templates
8687

8788
Translations is done through the back-office -> Configuration -> Translation. The string are automatically collected in your template, and you'll be able to enter the translation for any language defined in your store (see Configuration, -> Languages & URLs).
8889

89-
### {format_date}
90+
### `{format_date}`
9091

9192
Use this function to format a date according to the current locale standards.
9293

9394
#### Examples
94-
95+
```
9596
Return the given date using the locale date format as date and time
9697
{format_date date=$dateTimeObject}
9798
@@ -103,6 +104,7 @@ Use this function to format a date according to the current locale standards.
103104
104105
Return the given date as a time string, using the locale date
105106
{format_date date=$dateTimeObject output="time"}
107+
```
106108

107109
#### Parameters
108110

@@ -114,18 +116,19 @@ Use this function to format a date according to the current locale standards.
114116
- `datetime`: the date and the time (default)
115117

116118

117-
### {format_number}
119+
### `{format_number}`
118120

119121
Use this function to format a number according to the current locale standards, or a specific format.
120122

121123
#### Examples
122124

125+
```
123126
Outputs "1 246,1"
124127
{format_number number="1246.12" decimals="1" dec_point="," thousands_sep=" "}
125128
126129
Outputs "1246,12" if locale is fr_FR, 1 246.12 if locale is en_US
127130
{format_number number="1246.12"}
128-
131+
```
129132

130133
#### Parameters
131134

@@ -135,17 +138,19 @@ Use this function to format a number according to the current locale standards,
135138
- `thousands_sep`: thousands separator
136139

137140

138-
### {format_money}
141+
### `{format_money}`
139142

140143
Use this function to format an amount of money according to the current locale standards, or a specific format.
141144

142145
#### Examples
143146

147+
```
144148
Outputs "1 246,1 €"
145149
{format_money number="1246.12" decimals="1" dec_point="," thousands_sep=" " symbol="€"}
146150
147151
Outputs "1246,12 €" if locale is fr_FR, "€ 1 246.12" if locale is en_US
148152
{format_money number="1246.12"}
153+
```
149154

150155
#### Parameters
151156

@@ -156,7 +161,7 @@ Use this function to format an amount of money according to the current locale s
156161
- `symbol`: Currency symbol
157162
- `remove_zero_decimal` (since 2.4.0) : Do not show decimals if they are zero. example: 1234.00 € will become 1234 €
158163

159-
### {format_address}
164+
### `{format_address}`
160165

161166
Use this function to format an address according to the current country standards.
162167

docs/contribute.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ patch but there are some rules to follow.
2121
First of all, fork [Thelia](https://github.com/thelia/thelia) repo and create
2222
a new branch, never work on the `main` branch, use it only for syncing with [Thelia](https://github.com/thelia/thelia) repo
2323

24-
```
25-
$ git checkout -b new-branch main
24+
```bash
25+
git checkout -b new-branch main
2626
```
2727

2828
After finishing your modification you have to rebase your branch and push it to your repo
2929

30-
```
31-
$ git remote add upstream https://github.com/thelia/thelia.git
32-
$ git checkout main
33-
$ git pull --ff-only upstream main
34-
$ git checkout new-branch
35-
$ git rebase main
36-
$ git push origin new-branch
30+
```bash
31+
git remote add upstream https://github.com/thelia/thelia.git
32+
git checkout main
33+
git pull --ff-only upstream main
34+
git checkout new-branch
35+
git rebase main
36+
git push origin new-branch
3737
```
3838

3939
Next and last step, submit a Pull Request as indicated in the [GitHub documentation](https://help.github.com/articles/creating-a-pull-request)
@@ -109,9 +109,9 @@ php Thelia generate:sql --locales='de_DE,en_US,es_ES,fr_FR'
109109
## How to contribute new or update Thelia translations
110110

111111
Translations are contributed by Thelia users worldwide. The translation work is coordinated at [Crowdin](http://crowdin.com).
112-
The Thelia project is located at <http://translate.thelia.net/>.
112+
The Thelia project is located at [http://translate.thelia.net/](http://translate.thelia.net/).
113113

114-
Translations for **non english** languages should only be done on <http://translate.thelia.net/>, not in a Thelia development website and submitted to us with a pull request on GitHub.
114+
Translations for **non english** languages should only be done on [http://translate.thelia.net/](http://translate.thelia.net/), not in a Thelia development website and submitted to us with a pull request on GitHub.
115115
During the development stage, only english strings should be used inside Thelia and submitted with a pull request.
116116
Prior to any release, Thelia maintainers will make an announcement and we'll have a couple of weeks
117117
of string freeze in order to give people time to complete the translations.

docs/smarty_plugins/{intl}.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
All informations about the {intl} plugin can be found in the [internationalization part](../internationalization)
1+
All informations about the `{intl}` plugin can be found in the [internationalization part](../Internationalization)

docs/smarty_plugins/{navigate}.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ Example:
1414
- reload the current page : `<a href="{navigate to='current'}">{intl l="Reload !"}</a>`
1515

1616

17-
You can’t add custom parameters to the URL generated by {navigate}. To do so, use it along with the [{url}](./{url}) function :
17+
You can’t add custom parameters to the URL generated by `{navigate}`. To do so, use it along with the [`{url}`](./%7Burl%7D) function :
1818
`{url path={navigate to="current"} limit="4"}`
19-
This way the limit=4 parameter is added to the URL : `http://www.myshop.com/current-page-url.html?limit=4`
19+
This way the limit=4 parameter is added to the URL : `http://www.myshop.com/current-page-url.html?limit=4`
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
In most cases, Thelia automatically sets the previous URLs, so that `{navigate to='previous'}` will generate the URL to the previous page visited by your customer.
1+
In most cases, Thelia automatically sets the previous URLs, so that `{navigate to='previous'}` will generate the URL to the previous page visited by your customer.
22
But in some cases, you may want to define yourself the URL of the previous page, so that your customers will go back to this specific page instead of the page they have visited before.
33

44
The `{set_previous_url}` function allows setting the URLs of the page thant will become the previous page :
55
`{set_previous_url path='path/to/some/page'}`
6-
To get possible `{set_previous_url}` parameters, please see the [{url}](./{url}) function.
7-
6+
To get possible `{set_previous_url}` parameters, please see the [`{url}`](./%7Burl%7D) function.
7+
88
You may also want to prevent a page to become the “previous page”. To do so, use the `ignore_current` parameter, and put this call somewhere in the page :
9-
`{set_previous_url ignore_current=1}`
10-
9+
`{set_previous_url ignore_current=1}`
10+
1111
A typical example is the `login` and/or `register` page, where the user should go back where it was before entering its credentials (cart or order page), and not te register/login page itself.

0 commit comments

Comments
 (0)