From 9669b87a2d75fc00542893eb8d3baeff2131c5f8 Mon Sep 17 00:00:00 2001 From: Hritik Vijay Date: Wed, 29 Nov 2017 02:21:33 +0530 Subject: [PATCH 1/2] Check existence of language files --- fluxion.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/fluxion.sh b/fluxion.sh index f877fd2..7e79753 100755 --- a/fluxion.sh +++ b/fluxion.sh @@ -357,6 +357,20 @@ function fluxion_set_language() { FLUXIONLanguage=${IOQueryFormatFields[0]} + # Check if all language files are present + find -type d -name language | while read language_dir; do + if [ ! -e "$language_dir/${FLUXIONLanguage}.sh" ]; then + echo "Fatal: Missing language file:" + echo "$language_dir/${FLUXIONLanguage}.sh" + return 1 + fi + done + if [ $? -eq 1 ]; then + FLUXIONLanguage="en" + sleep 1 + return 1 + fi + source "$FLUXIONPath/language/$FLUXIONLanguage.sh" fi } @@ -973,7 +987,7 @@ function fluxion_run_attack() { ################################### < FLUXION Loop > ################################### fluxion_set_resolution -fluxion_set_language +until fluxion_set_language;do : ; done while true; do fluxion_set_interface; if [ $? -ne 0 ]; then continue; fi From f74a6b20d57d75a37e3d1666d62c2f0f8db1a0ea Mon Sep 17 00:00:00 2001 From: Hritik Vijay Date: Wed, 29 Nov 2017 20:55:11 +0530 Subject: [PATCH 2/2] Instructions to add language --- CONTRIBUTING.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 792d600..ce09879 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1 +1,10 @@ -# +# Adding language files +1. Copy the English language files from +``` +./attacks/Handshake Snooper/language/en.sh +./attacks/Captive Portal/language/en.sh +./language/en.sh +``` +2. Translate +3. Save them as `LANGUAGE_CODE.sh` to respective locations. +Resource: [LANGUAGE_CODE](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) (ISO 639-1)