diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..de0a2b9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +load.php diff --git a/index.php b/index.php new file mode 100644 index 0000000..3b14a8e --- /dev/null +++ b/index.php @@ -0,0 +1,137 @@ +. + +require 'load.php'; + +header( 'Content-Type: text/html; charset=' . CHARSET ); +?> + + + + <?php _e("E-mail server parameters") ?> — <?php echo SITE_NAME ?> + + + +

+

+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
mail.reyboz.it
993
(← )
+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
mail.reyboz.it
you@example.it (← write your e-mail address there)
465
Authentication
+ +

+

+

MX record pointing to %s."), + "mail.reyboz.it" + ) ?>

+

SPF record with \"%s\" in order to avoid spammers to use your domain as sender."), + "v=spf1 mx -all" + ) ?>

+ + + +%s', + $title, + $what + ); +} diff --git a/l10n/it.reyboz.mail.pot b/l10n/it.reyboz.mail.pot new file mode 100644 index 0000000..bfd6486 --- /dev/null +++ b/l10n/it.reyboz.mail.pot @@ -0,0 +1,117 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Valerio Bozzolan +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: it.reyboz.mail\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-12-16 18:06+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: index.php:8 index.php:15 +msgid "E-mail server parameters" +msgstr "" + +#: index.php:17 +#, php-format +msgid "Here you are %s and %s parameters for the %s mailserver." +msgstr "" + +#: index.php:18 +msgid "Internet Message Access Protocol - to receive e-mails" +msgstr "" + +#: index.php:19 +msgid "Simple Mail Transfer Protocol - to send e-mails" +msgstr "" + +#: index.php:23 index.php:49 index.php:75 +#, php-format +msgid "%s configuration" +msgstr "" + +#: index.php:27 index.php:53 +msgid "Server" +msgstr "" + +#: index.php:31 index.php:61 +msgid "Port" +msgstr "" + +#: index.php:35 index.php:57 +msgid "Username" +msgstr "" + +#: index.php:36 +msgid "foo@example.com" +msgstr "" + +#: index.php:36 +msgid "write your e-mail address there" +msgstr "" + +#: index.php:39 index.php:65 +msgid "Encryption method" +msgstr "" + +#: index.php:40 index.php:66 +msgid "TLS on a dedicated port" +msgstr "" + +#: index.php:43 +msgid "Authentication" +msgstr "" + +#: index.php:44 index.php:70 +#, php-format +msgid "Requires authentication (%s)" +msgstr "" + +#: index.php:76 +msgid "If you don't know that a DNS is, skip this section." +msgstr "" + +#: index.php:78 +#, php-format +msgid "Please create an MX record pointing to %s." +msgstr "" + +#: index.php:82 +#, php-format +msgid "" +"Additionally please create an SPF record with \"%s" +"\" in order to avoid spammers to use your domain as sender." +msgstr "" + +#: index.php:86 +msgid "Note" +msgstr "" + +#: index.php:88 +#, php-format +msgid "In case of troubles please contact %s." +msgstr "" + +#: index.php:90 +#, php-format +msgid "%s at %s dot %s" +msgstr "" + +#: index.php:99 +msgid "" +"The contents in this page are in public domain and/or are ineligible for " +"copyright." +msgstr "" + +#: index.php:101 +msgid "In other languages:" +msgstr "" diff --git a/l10n/it_IT.UTF-8/LC_MESSAGES/it.reyboz.mail.mo b/l10n/it_IT.UTF-8/LC_MESSAGES/it.reyboz.mail.mo new file mode 100644 index 0000000..d764005 Binary files /dev/null and b/l10n/it_IT.UTF-8/LC_MESSAGES/it.reyboz.mail.mo differ diff --git a/l10n/it_IT.UTF-8/LC_MESSAGES/it.reyboz.mail.po b/l10n/it_IT.UTF-8/LC_MESSAGES/it.reyboz.mail.po new file mode 100644 index 0000000..e650133 --- /dev/null +++ b/l10n/it_IT.UTF-8/LC_MESSAGES/it.reyboz.mail.po @@ -0,0 +1,121 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Valerio Bozzolan +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: it.reyboz.mail\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-12-16 18:06+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: it_IT \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: index.php:8 index.php:15 +msgid "E-mail server parameters" +msgstr "Parametri del server di posta" + +#: index.php:17 +#, php-format +msgid "Here you are %s and %s parameters for the %s mailserver." +msgstr "In seguito i parametri %s e %s per il server di posta %s." + +#: index.php:18 +msgid "Internet Message Access Protocol - to receive e-mails" +msgstr "Internet Message Access Protocol - per ricevere e-mail" + +#: index.php:19 +msgid "Simple Mail Transfer Protocol - to send e-mails" +msgstr "Simple Mail Transfer Protocol - per spedire e-mail" + +#: index.php:23 index.php:49 index.php:75 +#, php-format +msgid "%s configuration" +msgstr "Configurazione %s" + +#: index.php:27 index.php:53 +msgid "Server" +msgstr "Server" + +#: index.php:31 index.php:61 +msgid "Port" +msgstr "Porta" + +#: index.php:35 index.php:57 +msgid "Username" +msgstr "Nome utente" + +#: index.php:36 +msgid "foo@example.com" +msgstr "mario@example.org" + +#: index.php:36 +msgid "write your e-mail address there" +msgstr "scrivi qui il tuo indirizzo e-mail" + +#: index.php:39 index.php:65 +msgid "Encryption method" +msgstr "Metodo di cifratura" + +#: index.php:40 index.php:66 +msgid "TLS on a dedicated port" +msgstr "TLS su una porta dedicata" + +#: index.php:43 +msgid "Authentication" +msgstr "Autenticazione" + +#: index.php:44 index.php:70 +#, php-format +msgid "Requires authentication (%s)" +msgstr "Richiede autenticazione (%s)" + +#: index.php:76 +msgid "If you don't know that a DNS is, skip this section." +msgstr "Se non sai cosa sia un DNS, salta questa sezione." + +#: index.php:78 +#, php-format +msgid "Please create an MX record pointing to %s." +msgstr "Per favore crea un record MX che punti a %s." + +#: index.php:82 +#, php-format +msgid "" +"Additionally please create an SPF record with \"%s" +"\" in order to avoid spammers to use your domain as sender." +msgstr "" +"In aggiunta per favore crea un record SPF con \"%s" +"\" per prevenire che gli spammer utilizzino il tuo dominio come mittente." + +#: index.php:86 +msgid "Note" +msgstr "Note" + +#: index.php:88 +#, php-format +msgid "In case of troubles please contact %s." +msgstr "In caso di problemi contattare %s." + +#: index.php:90 +#, php-format +msgid "%s at %s dot %s" +msgstr "%s chiocciola %s punto %s" + +#: index.php:99 +msgid "" +"The contents in this page are in public domain and/or are ineligible for " +"copyright." +msgstr "" +"I contenuti di questa pagina sono in pubblico dominio e/o non hanno i " +"requisiti per essere protetti da copyright." + +#: index.php:101 +msgid "In other languages:" +msgstr "In altre lingue:" diff --git a/l10n/localize.sh b/l10n/localize.sh new file mode 100755 index 0000000..468007d --- /dev/null +++ b/l10n/localize.sh @@ -0,0 +1,53 @@ +#!/bin/sh +############################################################################# +# +# Copyright (C) 2015 Valerio Bozzolan +# +############################################################################# +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################# + +# This script does the entire GNU Gettext workflow + +# The copyright older of your localization +copyright="Valerio Bozzolan" + +# The prefix of your localization's files +# You have to know how GNU Gettext works to change it. +package="it.reyboz.mail" + +rtfm() { + echo Usage: + echo $1 SITE_ROOT + echo Example: + echo $1 /var/www/mysite +} + +path="$1" + +if [ -z "$path" ]; then + rtfm $0 + exit 1 +fi + +# Generate/update the .pot file from the single script (index.php) +xgettext --copyright-holder="$copyright" --package-name=$package --from-code=UTF-8 --keyword=_e --keyword=__ --default-domain=$package -o "$path"/l10n/$package.pot "$path"/*.php + +# Generate/update the .po files from the .pot file +find "$path"/l10n -name \*.po -execdir msgmerge -o $package.po $package.po ../../$package.pot \; + +# Generate/update the .mo files from .po files +find "$path"/l10n -name \*.po -execdir msgfmt -o $package.mo $package.po \; diff --git a/load-post.php b/load-post.php new file mode 100644 index 0000000..5337c19 --- /dev/null +++ b/load-post.php @@ -0,0 +1,27 @@ +. + +define( 'GETTEXT_DOMAIN', 'it.reyboz.mail' ); +define( 'GETTEXT_DIRECTORY', ABSPATH . '/l10n' ); +define( 'GETTEXT_DEFAULT_ENCODE', 'UTF-8' ); + +define_default( 'SITE_NAME', "Reyboz" ); + +register_language( 'en_US', [ 'en', 'en-us' ] ); +register_language( 'it_IT', [ 'it' ] ); +register_default_language( 'en_US' ); + +apply_language( @ $_GET[ 'l' ] );