forked from tohe/wmdeit_kaform
Language support (partial)
This commit is contained in:
parent
8f35208d33
commit
8f8f9b1505
46
ka.php
46
ka.php
|
@ -1,9 +1,24 @@
|
|||
<!doctype html>
|
||||
<?php
|
||||
|
||||
$lang=$_GET['lang'];
|
||||
if ( !in_array ($lang, array('en'))){
|
||||
$lang="";
|
||||
if ( !in_array ($lang, array('en_US'))){
|
||||
$locale = $lang;
|
||||
}
|
||||
else
|
||||
$locale = "de_DE";
|
||||
|
||||
|
||||
$locale = "en_US";
|
||||
$domain = "messages";
|
||||
|
||||
setlocale(LC_MESSAGES, $locale);
|
||||
setlocale(LC_ALL, $locale);
|
||||
|
||||
$results = putenv("LC_ALL=$locale");
|
||||
$results = bindtextdomain($domain,"./locale");
|
||||
|
||||
|
||||
?>
|
||||
<html >
|
||||
<head>
|
||||
|
@ -25,36 +40,37 @@
|
|||
<img alt="wikimedia logo" src="Wikimedia_Deutschland-Logo.svg"/>
|
||||
</div>
|
||||
<div class="main-content">
|
||||
<?php echo _( "
|
||||
<h1>Antrag auf Kostenerstattung</h1>
|
||||
<p>Du möchtest dir Kosten erstatten lassen, welche im Rahmen deines
|
||||
Projektes entstanden sind?<BR>
|
||||
Bitte fülle dieses Formular aus.
|
||||
Pflichtfelder sind mit einem * gekennzeichnet.
|
||||
</p>") ?>
|
||||
<h1>
|
||||
<?php echo _( "Antrag auf Kostenerstattung")?>
|
||||
</h1>
|
||||
<p>
|
||||
<?php echo _("Du möchtest dir Kosten erstatten lassen, welche im Rahmen deines Projektes entstanden sind?")?><BR>
|
||||
<?php echo _("Bitte fülle dieses Formular aus. Pflichtfelder sind mit einem * gekennzeichnet.")?>
|
||||
</p>
|
||||
|
||||
<form data-kube="kaform" name="theform" id="theform" action="submit.php" method="POST">
|
||||
|
||||
<div class="is-row">
|
||||
<div class="is-col is-70">
|
||||
<fieldset>
|
||||
<legend><?php echo _("1. Erfasse deine Stammdaten</legend>")?>
|
||||
<legend><?php echo _("1. Erfasse deine Stammdaten")?></legend>
|
||||
<div class="is-row">
|
||||
<div class="is-col">
|
||||
<input required type="input"
|
||||
size="32" id="projectid" name="project"
|
||||
placeholder="Projekt/Zweck der Reise*" />
|
||||
placeholder="<?php echo _("Projekt/Zweck der Reise*")?>" />
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<div class="is-row">
|
||||
<div class="is-col">
|
||||
<input required type="input" size="32"
|
||||
` id="realname" name="realname" placeholder="Dein Realname (Vorname Nachname)*" />
|
||||
` id="realname" name="realname" placeholder="<?php echo _("Dein Realname (Vorname Nachname)*")?>" />
|
||||
</div>
|
||||
<div class="is-col">
|
||||
<input type="input" size="32"
|
||||
` id="wmdecontact" name="wmdecontact" placeholder="Deine Ansprechperson bei Wikimedia" />
|
||||
` id="wmdecontact" name="wmdecontact"
|
||||
placeholder="<?= _("Deine Ansprechperson bei Wikimedia")?>" />
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
|
@ -64,7 +80,7 @@
|
|||
<div class="is-col">
|
||||
<input type="tel" size="32"
|
||||
id="phone" name="phone"
|
||||
placeholder="Deine Telefonnummer" />
|
||||
placeholder="<?= _("Deine Telefonnummer")?>" />
|
||||
</div>
|
||||
<div class="is-col">
|
||||
</div>
|
||||
|
@ -75,7 +91,7 @@
|
|||
<div class="is-row">
|
||||
<div class="is-col">
|
||||
<input required type="email" size="32" id="email"
|
||||
name="email" placeholder="Deine E-Mail-Adresse*" />
|
||||
name="email" placeholder="<?= _("Deine E-Mail-Adresse*")?>" />
|
||||
</div>
|
||||
<div class="is-col">
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,60 @@
|
|||
# German translations for apache package.
|
||||
# Copyright (C) 2021 THE apache'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the apache package.
|
||||
# Charlie & <root@bsd>, 2021.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: apache 24\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-07-06 18:34+0200\n"
|
||||
"PO-Revision-Date: 2021-07-06 18:21+0200\n"
|
||||
"Last-Translator: Charlie & <root@bsd>\n"
|
||||
"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: ka.php:44
|
||||
msgid "Antrag auf Kostenerstattung"
|
||||
msgstr "Request for reimbursement"
|
||||
|
||||
#: ka.php:47
|
||||
msgid ""
|
||||
"Du möchtest dir Kosten erstatten lassen, welche im Rahmen deines Projektes "
|
||||
"entstanden sind?"
|
||||
msgstr ""
|
||||
"You would like to be reimbursed for costs incurred in the course of your "
|
||||
"project?"
|
||||
|
||||
#: ka.php:48
|
||||
msgid ""
|
||||
"Bitte fülle dieses Formular aus. Pflichtfelder sind mit einem * "
|
||||
"gekennzeichnet."
|
||||
msgstr "Please fill out this form. Mandatory fields are marked with *."
|
||||
|
||||
#: ka.php:56
|
||||
msgid "1. Erfasse deine Stammdaten"
|
||||
msgstr "1. Enter your master data"
|
||||
|
||||
#: ka.php:61
|
||||
msgid "Projekt/Zweck der Reise*"
|
||||
msgstr "Project/Purpose of the trip*"
|
||||
|
||||
#: ka.php:68
|
||||
msgid "Dein Realname (Vorname Nachname)*"
|
||||
msgstr "Your real name (first name last name)*"
|
||||
|
||||
#: ka.php:73
|
||||
msgid "Deine Ansprechperson bei Wikimedia"
|
||||
msgstr "Your contact person at Wikimedia"
|
||||
|
||||
#: ka.php:83
|
||||
msgid "Deine Telefonnummer"
|
||||
msgstr "Your phone number"
|
||||
|
||||
#: ka.php:94
|
||||
msgid "Deine E-Mail-Adresse*"
|
||||
msgstr "Your email address*"
|
BIN
messages.mo
BIN
messages.mo
Binary file not shown.
49
messages.po
49
messages.po
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-06-22 10:09+0200\n"
|
||||
"POT-Creation-Date: 2021-07-06 18:34+0200\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -17,17 +17,42 @@ msgstr ""
|
|||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: ka.php:28
|
||||
msgid ""
|
||||
"\n"
|
||||
"\t\t<h1>Antrag auf Kostenerstattung</h1>\n"
|
||||
"\t\t<p>Du möchtest dir Kosten erstatten lassen, welche im Rahmen deines\n"
|
||||
"\t\tProjektes entstanden sind?<BR>\n"
|
||||
"\t\tBitte fülle dieses Formular aus.\n"
|
||||
"\t\tPflichtfelder sind mit einem * gekennzeichnet.\n"
|
||||
"\t\t</p>"
|
||||
#: ka.php:44
|
||||
msgid "Antrag auf Kostenerstattung"
|
||||
msgstr ""
|
||||
|
||||
#: ka.php:41
|
||||
msgid "1. Erfasse deine Stammdaten</legend>"
|
||||
#: ka.php:47
|
||||
msgid ""
|
||||
"Du möchtest dir Kosten erstatten lassen, welche im Rahmen deines Projektes "
|
||||
"entstanden sind?"
|
||||
msgstr ""
|
||||
|
||||
#: ka.php:48
|
||||
msgid ""
|
||||
"Bitte fülle dieses Formular aus. Pflichtfelder sind mit einem * "
|
||||
"gekennzeichnet."
|
||||
msgstr ""
|
||||
|
||||
#: ka.php:56
|
||||
msgid "1. Erfasse deine Stammdaten"
|
||||
msgstr ""
|
||||
|
||||
#: ka.php:61
|
||||
msgid "Projekt/Zweck der Reise*"
|
||||
msgstr ""
|
||||
|
||||
#: ka.php:68
|
||||
msgid "Dein Realname (Vorname Nachname)*"
|
||||
msgstr ""
|
||||
|
||||
#: ka.php:73
|
||||
msgid "Deine Ansprechperson bei Wikimedia"
|
||||
msgstr ""
|
||||
|
||||
#: ka.php:83
|
||||
msgid "Deine Telefonnummer"
|
||||
msgstr ""
|
||||
|
||||
#: ka.php:94
|
||||
msgid "Deine E-Mail-Adresse*"
|
||||
msgstr ""
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
touch messages.po
|
||||
xgettext --add-comments --from-code=utf-8 ka.php
|
||||
msgmerge locale/en_US/LC_MESSAGES/messages.po messages.po > new.po
|
||||
cp locale/en_US/LC_MESSAGES/messages.po locale/en_US/LC_MESSAGES/messages.po.bak
|
||||
mv new.po locale/en_US/LC_MESSAGES/messages.po
|
||||
rm locale/en_US/LC_MESSAGES/messages.mo
|
||||
msgfmt locale/en_US/LC_MESSAGES/messages.po -o locale/en_US/LC_MESSAGES/messages.mo
|
||||
|
Loading…
Reference in New Issue