diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000000000000000000000000000000000..70363b5ee128654d621d19edbb16ede56470572e --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +.PHONY: help doctor install reset-db translations +.DEFAULT_GOAL := help + +help: + @echo "\033[33mUsage:\033[0m" + @echo " make [command]" + @echo "" + @echo "\033[33mAvailable commands:\033[0m" + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' Makefile | sort \ + | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[32m%s\033[0m___%s\n", $$1, $$2}' | column -ts___ + +doctor: ## Check that everything is installed to use this application + @echo "\033[1m\033[36m==> Check required dependencies\033[0m\033[21m" + @which composer >/dev/null 2>&1 && echo "\033[32mcomposer installed\033[0m" || echo "\033[31mcomposer not installed\033[0m" + @echo "\033[1m\033[36m==> Check configuration\033[0m\033[21m" + @test -s ./app/config.php && echo "\033[32mConfiguration OK\033[0m" || echo "\033[31mYou need to copy app/config.php.sample to app/config.php in order to configure your application.\033[0m" + @echo "\033[1m\033[36m==> Check optional dependencies\033[0m\033[21m" + @which msgmerge >/dev/null 2>&1 && echo "\033[32mmsgmerge installed\033[0m" || echo "\033[31mmsgmerge not installed\033[0m" + @which msgfmt >/dev/null 2>&1 && echo "\033[32mmsgfmt installed\033[0m" || echo "\033[31mmsgfmt not installed\033[0m" + @which xgettext >/dev/null 2>&1 && echo "\033[32mxgettext installed\033[0m" || echo "\033[31mxgettext not installed\033[0m" + +install: ## Install the application + @echo "\033[1m\033[36m==> Install Composer dependencies\033[0m\033[21m" + @composer install + +server-start: server-stop ## Launch a local server + @php -S 127.0.0.1:8000 >> ./var/log/server.log & + @echo "\033[32mServer running. (http://127.0.0.1:8000)\033[0m" + +server-stop: ## Stop local server if running + @ps -aux | grep "[p]hp -S 127.0.0.1:8000" | grep -v grep | awk '{print $$2}' | xargs -r -n 1 kill + @echo "\033[32mServer stopped. (http://127.0.0.1:8000)\033[0m" + +translations: locales/fr_FR/LC_MESSAGES/messages.mo locales/en_US/LC_MESSAGES/messages.mo ## Generate translations + +messages.pot: app/*.php templates/*.html + [ -r $@ ] || touch $@ + xgettext --package-name=LQDNCampaign --package-version=2016.1 --force-po -o $@ --keyword=__ --keyword=_ --from-code=UTF-8 $^ + +locales/%/LC_MESSAGES/messages.po: messages.pot + msgmerge -v -U $@ $^ + +locales/fr_FR/LC_MESSAGES/messages.mo: locales/fr_FR/LC_MESSAGES/messages.po + msgfmt $^ -o $@ + +locales/en_US/LC_MESSAGES/messages.mo: locales/en_US/LC_MESSAGES/messages.po + msgfmt $^ -o $@ diff --git a/locales/en_US/LC_MESSAGES/messages.po b/locales/en_US/LC_MESSAGES/messages.po new file mode 100644 index 0000000000000000000000000000000000000000..4cb3b7ce194e7b69f29655374c09442ec6075bfe --- /dev/null +++ b/locales/en_US/LC_MESSAGES/messages.po @@ -0,0 +1,162 @@ +#: templates/campaign.html:5 templates/intro.html:11 +msgid "Act Now!" +msgstr "" + +#: templates/campaign.html:12 templates/intro.html:23 +msgid "Visit Us!" +msgstr "" + +#: templates/feedbackform.html:4 +msgid "0. Initialising the call" +msgstr "" + +#: templates/feedbackform.html:5 +msgid "1. Calling you" +msgstr "" + +#: templates/feedbackform.html:6 +msgid "2. When ready, please dial 1 on your phone" +msgstr "" + +#: templates/feedbackform.html:7 +msgid "3. Calling " +msgstr "" + +#: templates/feedbackform.html:8 +msgid "4. Connected to " +msgstr "" + +#: templates/feedbackform.html:27 +msgid "Phone number" +msgstr "" + +#: templates/feedbackform.html:60 +msgid "Feedback Form" +msgstr "" + +#: templates/feedbackform.html:61 +msgid "" +"Please tell us what happened if you were able to talk to someone. Your " +"feedback is important to us." +msgstr "" + +#: templates/footer.html:6 +msgid "This campaign is powered by the piphone" +msgstr "" + +#: templates/footer.html:14 +msgid "Get in touch with LQDN" +msgstr "" + +#: templates/footer.html:15 +msgid "Code licensed under the AGPL v3.0+" +msgstr "" + +#: templates/footer.html:7 +msgid "" +"The piphone is a campaigning tool developped by La Quadrature du " +"Net" +msgstr "" + +#: templates/contact.html:30 templates/home.html:36 +msgid "Call for free" +msgstr "" + +#: templates/contact.html:36 +msgid "Your phone number:" +msgstr "" + +#: templates/contact.html:46 +msgid "More info" +msgstr "" + +#: templates/contact.html:33 +msgid "" +"If you want to call for free, you must provide us with your phone number " +msgstr "" + +#: templates/toolbar.html:4 +msgid "Act" +msgstr "" + +#: templates/toolbar.html:5 +msgid "About the campaign" +msgstr "" + +#: templates/toolbar.html:6 +msgid "About the piphone" +msgstr "" + +#: templates/sidebar.html:18 +msgid "Home" +msgstr "" + +#: templates/sidebar.html:19 +msgid "Choose a representative to call" +msgstr "" + +#: templates/sidebar.html:20 templates/argumentation.html:3 +msgid "Arguments" +msgstr "" + +#: templates/argumentation.html:5 +msgid "" +"Those are arguments we provide you to help you convince the representative " +"you will call." +msgstr "" + +#: templates/call.html:6 +msgid "Reach out to " +msgstr "" + +#: templates/call.html:11 +msgid "Call at your expense" +msgstr "" + +#: templates/call.html:12 +msgid "" +"Here is the number of the selected MEP - you can either dial it from your " +"phone or push the button if any VoIP client is installed on your device." +msgstr "" + +#: templates/thankyou.html:4 +msgid "Thank you for your call! <3" +msgstr "" + +#: templates/thankyou.html:6 +msgid "Call another representative" +msgstr "" + +#: templates/piphone.html:4 +msgid "What is the piPhone?" +msgstr "" + +#: templates/piphone.html:7 +msgid "" +"The piphone is a tool developped by La Quadrature du Net, a French NGO specialised in digital rights " +"issues." +msgstr "" + +#: templates/piphone.html:8 +msgid "" +"Its purpose is to ease mobilisation of people toward influencing the " +"representatives elements of democracy, by removing the cost of such calls " +"and gathering all needed data." +msgstr "" + +#: templates/piphone.html:11 +msgid "" +"The source code is distributed under the term of the AGPL v3.0+ and is open " +"to contribution on LQDN's own " +"gitlab" +msgstr "" + +#: templates/home.html:5 +msgid "Call a representative and make your voice heard!" +msgstr "" + +#: templates/home.html:40 +msgid "We need your phone number to initiate the call" +msgstr "" diff --git a/locales/fr_FR/LC_MESSAGES/messages.po b/locales/fr_FR/LC_MESSAGES/messages.po new file mode 100644 index 0000000000000000000000000000000000000000..4cb3b7ce194e7b69f29655374c09442ec6075bfe --- /dev/null +++ b/locales/fr_FR/LC_MESSAGES/messages.po @@ -0,0 +1,162 @@ +#: templates/campaign.html:5 templates/intro.html:11 +msgid "Act Now!" +msgstr "" + +#: templates/campaign.html:12 templates/intro.html:23 +msgid "Visit Us!" +msgstr "" + +#: templates/feedbackform.html:4 +msgid "0. Initialising the call" +msgstr "" + +#: templates/feedbackform.html:5 +msgid "1. Calling you" +msgstr "" + +#: templates/feedbackform.html:6 +msgid "2. When ready, please dial 1 on your phone" +msgstr "" + +#: templates/feedbackform.html:7 +msgid "3. Calling " +msgstr "" + +#: templates/feedbackform.html:8 +msgid "4. Connected to " +msgstr "" + +#: templates/feedbackform.html:27 +msgid "Phone number" +msgstr "" + +#: templates/feedbackform.html:60 +msgid "Feedback Form" +msgstr "" + +#: templates/feedbackform.html:61 +msgid "" +"Please tell us what happened if you were able to talk to someone. Your " +"feedback is important to us." +msgstr "" + +#: templates/footer.html:6 +msgid "This campaign is powered by the piphone" +msgstr "" + +#: templates/footer.html:14 +msgid "Get in touch with LQDN" +msgstr "" + +#: templates/footer.html:15 +msgid "Code licensed under the AGPL v3.0+" +msgstr "" + +#: templates/footer.html:7 +msgid "" +"The piphone is a campaigning tool developped by La Quadrature du " +"Net" +msgstr "" + +#: templates/contact.html:30 templates/home.html:36 +msgid "Call for free" +msgstr "" + +#: templates/contact.html:36 +msgid "Your phone number:" +msgstr "" + +#: templates/contact.html:46 +msgid "More info" +msgstr "" + +#: templates/contact.html:33 +msgid "" +"If you want to call for free, you must provide us with your phone number " +msgstr "" + +#: templates/toolbar.html:4 +msgid "Act" +msgstr "" + +#: templates/toolbar.html:5 +msgid "About the campaign" +msgstr "" + +#: templates/toolbar.html:6 +msgid "About the piphone" +msgstr "" + +#: templates/sidebar.html:18 +msgid "Home" +msgstr "" + +#: templates/sidebar.html:19 +msgid "Choose a representative to call" +msgstr "" + +#: templates/sidebar.html:20 templates/argumentation.html:3 +msgid "Arguments" +msgstr "" + +#: templates/argumentation.html:5 +msgid "" +"Those are arguments we provide you to help you convince the representative " +"you will call." +msgstr "" + +#: templates/call.html:6 +msgid "Reach out to " +msgstr "" + +#: templates/call.html:11 +msgid "Call at your expense" +msgstr "" + +#: templates/call.html:12 +msgid "" +"Here is the number of the selected MEP - you can either dial it from your " +"phone or push the button if any VoIP client is installed on your device." +msgstr "" + +#: templates/thankyou.html:4 +msgid "Thank you for your call! <3" +msgstr "" + +#: templates/thankyou.html:6 +msgid "Call another representative" +msgstr "" + +#: templates/piphone.html:4 +msgid "What is the piPhone?" +msgstr "" + +#: templates/piphone.html:7 +msgid "" +"The piphone is a tool developped by La Quadrature du Net, a French NGO specialised in digital rights " +"issues." +msgstr "" + +#: templates/piphone.html:8 +msgid "" +"Its purpose is to ease mobilisation of people toward influencing the " +"representatives elements of democracy, by removing the cost of such calls " +"and gathering all needed data." +msgstr "" + +#: templates/piphone.html:11 +msgid "" +"The source code is distributed under the term of the AGPL v3.0+ and is open " +"to contribution on LQDN's own " +"gitlab" +msgstr "" + +#: templates/home.html:5 +msgid "Call a representative and make your voice heard!" +msgstr "" + +#: templates/home.html:40 +msgid "We need your phone number to initiate the call" +msgstr "" diff --git a/templates/call.html b/templates/call.html index dead36961263f5206898946f20ab91d3f6e38d25..7dd1ad06962f1d6fe2008ba3c3f982367bd6d216 100644 --- a/templates/call.html +++ b/templates/call.html @@ -7,24 +7,9 @@