Skip to content

Commit e817f53

Browse files
authored
Internationalize attachment size (#478)
1 parent 3b9a4e7 commit e817f53

File tree

18 files changed

+148
-70
lines changed

18 files changed

+148
-70
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This file was downloaded from Hugo Learn Theme.

exampleSite/content/shortcodes/attachments.en.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,23 @@ That's all!
3939
|:--|:--|:--|
4040
| title | "Attachments" | List's title |
4141
| style | "" | Choose between "orange", "grey", "blue" and "green" for nice style |
42-
| pattern | ".*" | A regular expressions, used to filter the attachments by file name. <br/><br/>The **pattern** parameter value must be [regular expressions](https://en.wikipedia.org/wiki/Regular_expression).
42+
| pattern | ".*" | A regular expression, used to filter the attachments by file name. The **pattern** parameter value must be a [regular expression](https://en.wikipedia.org/wiki/Regular_expression). |
4343

4444
For example:
4545

46-
* To match a file suffix of 'jpg', use **.*jpg** (not *.jpg).
47-
* To match file names ending in 'jpg' or 'png', use **.*(jpg|png)**
46+
* To match a file suffix of '.jpg', use `.*\.jpg$` (not `*.jpg`).
47+
* To match file names ending in '.jpg' or '.png', use `.*\.(jpg|png)$`.
4848

4949
### Examples
5050

5151
#### List of attachments ending in pdf or mp4
5252

5353

54-
{{%/*attachments title="Related files" pattern=".*(pdf|mp4)"/*/%}}
54+
{{%/*attachments title="Related files" pattern=".*\.(pdf|mp4)$"/*/%}}
5555

5656
renders as
5757

58-
{{%attachments title="Related files" pattern=".*(pdf|mp4)"/%}}
58+
{{%attachments title="Related files" pattern=".*\.(pdf|mp4)$"/%}}
5959

6060
#### Colored styled box
6161

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Ce fichier a été téléchargé à partir du Hugo Learn Theme.

exampleSite/content/shortcodes/attachments.fr.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,23 +39,23 @@ C'est tout !
3939
|:--|:--|:--|
4040
| title | "Pièces jointes" | Titre de la liste |
4141
| style | "" | Choisir entre "orange", "grey", "blue" et "green" pour un style plus sympa |
42-
| pattern | ".*" | Une expression régulière, utilisée pour filtrer les pièces jointes par leur nom de fichier. <br/><br/>Le paramètre **pattern** doit être une [expression régulière](https://en.wikipedia.org/wiki/Regular_expression).
42+
| pattern | ".*" | Une expression régulière, utilisée pour filtrer les pièces jointes par leur nom de fichier. Le paramètre **pattern** doit être une [expression régulière](https://en.wikipedia.org/wiki/Regular_expression). |
4343

4444
Par exemple:
4545

46-
* Pour trouver les fichiers avec le suffixe 'jpg', utilisez **.*jpg** (pas *.jpg).
47-
* Pour trouver les fichiers avec les suffixe 'jpg' ou 'png', utilisez **.*(jpg|png)**
46+
* Pour trouver les fichiers avec le suffixe '.jpg', utilisez `.*\.jpg$` (pas `*.jpg`).
47+
* Pour trouver les fichiers avec les suffixe '.jpg' ou '.png', utilisez `.*\.(jpg|png)$`.
4848

4949
### Exemples
5050

5151
#### Lister les pièces jointes de type pdf ou mp4
5252

5353

54-
{{%/*attachments title="Fichiers associés" pattern=".*(pdf|mp4)"/*/%}}
54+
{{%/*attachments title="Fichiers associés" pattern=".*\.(pdf|mp4)$"/*/%}}
5555

5656
s'affiche comme
5757

58-
{{%attachments title="Fichiers associés" pattern=".*(pdf|mp4)"/%}}
58+
{{%attachments title="Fichiers associés" pattern=".*\.(pdf|mp4)$"/%}}
5959

6060
#### Modifier le style
6161

i18n/ar.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,11 @@ other = "المزيد"
2525
[Expand-title]
2626
other = "...قم بتوسيع"
2727

28-
[BinaryPrefix-kilobyte]
29-
other = "kb"
28+
[Byte-symbol]
29+
other = "B"
30+
31+
[Kilobyte-symbol]
32+
other = "KB"
33+
34+
[Megabyte-symbol]
35+
other = "MB"

i18n/de.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,11 @@ other = "Mehr"
2525
[Expand-title]
2626
other = "Erweitere mich..."
2727

28-
[BinaryPrefix-kilobyte]
29-
other = "kb"
28+
[Byte-symbol]
29+
other = "B"
30+
31+
[Kilobyte-symbol]
32+
other = "KB"
33+
34+
[Megabyte-symbol]
35+
other = "MB"

i18n/en.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,11 @@ other = "More"
2525
[Expand-title]
2626
other = "Expand me..."
2727

28-
[BinaryPrefix-kilobyte]
29-
other = "kb"
28+
[Byte-symbol]
29+
other = "B"
30+
31+
[Kilobyte-symbol]
32+
other = "KB"
33+
34+
[Megabyte-symbol]
35+
other = "MB"

i18n/es.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,11 @@ other = "Más"
2525
[Expand-title]
2626
other = "Expandir..."
2727

28-
[BinaryPrefix-kilobyte]
29-
other = "kb"
28+
[Byte-symbol]
29+
other = "B"
30+
31+
[Kilobyte-symbol]
32+
other = "KB"
33+
34+
[Megabyte-symbol]
35+
other = "MB"

i18n/fr.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,11 @@ other = "Aller plus loin"
2525
[Expand-title]
2626
other = "Déroulez-moi..."
2727

28-
[BinaryPrefix-kilobyte]
29-
other = "ko"
28+
[Byte-symbol]
29+
other = "o"
30+
31+
[Kilobyte-symbol]
32+
other = "ko"
33+
34+
[Megabyte-symbol]
35+
other = "Mo"

i18n/hi.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,11 @@ other = "अधिक सामग्री दिखाएं"
2525
[Expand-title]
2626
other = "विस्तार करे..."
2727

28-
[BinaryPrefix-kilobyte]
29-
other = "kb"
28+
[Byte-symbol]
29+
other = "B"
30+
31+
[Kilobyte-symbol]
32+
other = "KB"
33+
34+
[Megabyte-symbol]
35+
other = "MB"

0 commit comments

Comments
 (0)