Hallo,
ich wollte das Grunion Contact Form Plugin übersetzen.
Die .po und .mo Files wurden auch alle korrekt übersetzt, aber irgendwie streikt der Rest. :-?
Als domain habe ich "crazy" gewählt. Somit heißen die Dateien auch crazy-de_DE.po und gleiches für die *.mo.
Hier mal der Sourcecode. Ich bin mit meinem Latein am Ende. :(
<?php
/*
Plugin Name: Grunion Contact Form
Description: Add a contact form to any post, page or text widget. Emails will be sent to the post's author by default, or any email address you choose. As seen on WordPress.com.
Plugin URI: http://automattic.com/#
AUthor: Automattic, Inc.
Author URI: http://automattic.com/
Version: 1.2
*/
if (function_exists('load_plugin_textdomain')) {
if ( !defined('WP_PLUGIN_DIR') ) {
load_plugin_textdomain('crazy', str_replace( ABSPATH, '', dirname(__FILE__) ));
} else {
load_plugin_textdomain('crazy', false, dirname(plugin_basename(__FILE__)));
}
}
function contact_form_shortcode( $atts ) {
// Inhalt gelöscht, damit es in Post passt
}
add_shortcode( 'contact-form', 'contact_form_shortcode' );
function contact_form_send_message( $to, $subject, $widget ) {
// Inhalt gelöscht, damit es in Post passt
}
/*
* @return true: it's spam, mark it as such
* false: it's not spam, let it ride
* WP_Error: it's spam, abort
*/
function contact_form_is_spam( $form ) {
return apply_filters( 'contact_form_is_spam', false, $form );
}
function contact_form_is_spam_akismet( $return, $form ) {
// Inhalt gelöscht, damit es in Post passt
}
function contact_form_widget_atts( $text ) {
// Inhalt gelöscht, damit es in Post passt
}
add_filter( 'widget_text', 'contact_form_widget_atts', 0 );
function contact_form_widget_shortcode_hack( $text ) {
// Inhalt gelöscht, damit es in Post passt
}
function contact_form_init() {
if ( function_exists( 'akismet_http_post' ) )
add_filter( 'contact_form_is_spam', 'contact_form_is_spam_akismet', 10, 2 );
if ( !has_filter( 'widget_text', 'do_shortcode' ) )
add_filter( 'widget_text', 'contact_form_widget_shortcode_hack', 5 );
}
add_action( 'init', 'contact_form_init' );
Alles anzeigen
Danke für eure Hilfe.