Skip to content
This repository was archived by the owner on Jun 15, 2021. It is now read-only.

Commit 54737df

Browse files
committed
1 parent 9e04964 commit 54737df

File tree

4 files changed

+67
-0
lines changed

4 files changed

+67
-0
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ matrix:
5959
- bash scripts/identical/fof-share-social.sh
6060
- bash scripts/identical/fof-spamblock.sh
6161
- bash scripts/identical/fof-split.sh
62+
- bash scripts/identical/fof-stopforumspam.sh
6263
- bash scripts/identical/fof-subscribed.sh
6364
- bash scripts/identical/fof-upload.sh
6465
- bash scripts/identical/fof-user-directory.sh

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ php flarum cache:clear
8686
- Share Social ([GitHub Repository](https://github.com/FriendsOfFlarum/share-social) / [Flarum Community](https://discuss.flarum.org/d/20401-friendsofflarum-share-social))
8787
- Spamblock ([GitHub Repository](https://github.com/FriendsOfFlarum/spamblock) / [Flarum Community](https://discuss.flarum.org/d/17772-friendsofflarum-spamblock))
8888
- Split ([GitHub Repository](https://github.com/FriendsOfFlarum/split) / [Flarum Community](https://discuss.flarum.org/d/1903-flagrow-split-separates-posts-to-a-new-discussion))
89+
- Stop Forum Spam ([GitHub Repository](https://github.com/FriendsOfFlarum/stopforumspam) / [Flarum Community](https://discuss.flarum.org/d/17846-friendsofflarum-stopforumspam))
8990
- Subscribed ([GitHub Repository](https://github.com/FriendsOfFlarum/subscribed) / [Flarum Community](https://discuss.flarum.org/d/20917-friendsofflarum-subscribed/))
9091
- transliterator ([GitHub Repository](https://github.com/FriendsOfFlarum/transliterator) / [Flarum Community](https://discuss.flarum.org/d/18074-friendsofflarum-url-transliterator))
9192
- Upload ([GitHub Repository](https://github.com/FriendsOfFlarum/upload/) / [Flarum Community](https://discuss.flarum.org/d/4154-flagrow-upload-the-intelligent-file-attachment-extension))

locale/fof-stopforumspam.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
fof-stopforumspam:
2+
admin:
3+
settings:
4+
api_key_instructions_text: <register>Inscrivez-vous à StopForumSpam</register>. Ensuite, vous devrez <key>obtenir une clé API</key>.
5+
api_key_label: Clé API
6+
api_key_text: 'Vous avez fof/spamblock d’activé, vous avez maintenant la possibilité de signaler les spammeurs à StopForumSpam afin de préserver du spam une plus grande communauté.'
7+
email_label: Vérification anti-spam de l'email
8+
frequency_example_text: 'Ex: Si l’email a un rapport et l’adresse IP deux rapports, cela fera trois avertissements au total. Si le seuil est fixé à 3 ou moins, cela empêchera l’enregistrement.'
9+
frequency_label: Seuil
10+
frequency_text: Le nombre de rapports de spam entre tous les contrôles activés qui déclencheront le filtre anti-spam.
11+
ip_label: Vérification anti-spam de l’adresse IP
12+
title: FriendsOfFlarum Stop Forum Spam
13+
username_label: Vérification anti-spam du nom d’utilisateur
14+
api:
15+
error:
16+
unknown: Impossible de signaler l’utilisateur à StopForumSpam.
17+
forum:
18+
message:
19+
spam: Vos informations ont été marquées comme spam.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
VERSION='master' #Repository version
2+
REPO='FriendsOfFlarum/stopforumspam' #Repository name
3+
LOCALE='locale' #Locale folder path
4+
5+
YAML1='en.yml' #Original yaml file
6+
YAML2='fof-stopforumspam.yml' #Translated yaml file
7+
8+
TEMP_DIR=`mktemp -d`
9+
WORK_DIR=`pwd`
10+
11+
GREEN='\033[0;32m'
12+
RED='\033[0;31m'
13+
NC='\033[0m'
14+
15+
if ! [ -x "$(command -v same-yaml)" ]; then
16+
echo 'Error: same-yaml is not installed.' >&2
17+
exit 1
18+
fi
19+
20+
if [[ ! "$TEMP_DIR" || ! -d "$TEMP_DIR" ]]; then
21+
exit 1
22+
fi
23+
24+
function cleanup {
25+
rm -rf "$TEMP_DIR"
26+
}
27+
28+
cd "$TEMP_DIR"
29+
30+
curl -s -L "https://raw.githubusercontent.com/$REPO/$VERSION/$LOCALE/$YAML1" > $YAML1
31+
32+
RC=0
33+
34+
echo "Testing $YAML1 against $YAML2:"
35+
same-yaml --ref "$YAML1" --tra "$WORK_DIR/locale/$YAML2"
36+
if [ $YAML1 = $YAML2 ]
37+
then
38+
RC=1
39+
printf "${RED}⨉ failed${NC}\n"
40+
else
41+
printf "${GREEN}✓ passed${NC}\n"
42+
fi
43+
44+
trap cleanup EXIT
45+
46+
exit $RC

0 commit comments

Comments
 (0)