Skip to content

Commit

Permalink
acajou_from_blog_title() for displaying multilangual title on hom
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Dec 30, 2016
1 parent f0b4399 commit e16026b
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 232 deletions.
2 changes: 1 addition & 1 deletion home.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
get_header(); ?>
<section class="row main-row">
<div class="category-row">
<h1 class="category-title">From the blog</h1>
<h1 class="category-title"><?php acajou_from_blog_title();?></h1>
<div class="category-title-line large-2 large-centered columns"></div>
<!-- post list-->
<div class="post-list clearfix">
Expand Down
27 changes: 27 additions & 0 deletions inc/customizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,33 @@ function acajou_customize_register( $wp_customize ) {
"type" => "textarea",
)
));

/*
* From the blog text
*
*
*/
// Create sections for socials links
$wp_customize->add_section("acajou_from_section", array(
"title" => __("From the blog", "acajou"),
"priority" => 30,
));

// Typing lines
$wp_customize->add_setting("from_text", array(
"default" => "From the blog",
"transport" => "refresh",
));
$wp_customize->add_control(new WP_Customize_Control(
$wp_customize,
"from_text",
array(
"label" => __("Replace the defaut « From the blog » text", "acajou"),
"section" => "acajou_from_section",
"settings" => "from_text",
"type" => "textarea",
)
));
}
add_action( 'customize_register', 'acajou_customize_register' );

Expand Down
11 changes: 11 additions & 0 deletions inc/extras.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,3 +411,14 @@ function acajou_typing_machine(){
echo '</p>';
}
}
/*
* "From the blog"
*
*/
function acajou_from_blog_title(){
$text = __("From the blog", "acajou");
if(get_theme_mod( 'from_text' ) && ""!=get_theme_mod( 'from_text' )) {
$text = get_theme_mod( 'from_text' );
}
echo $text;
}
224 changes: 0 additions & 224 deletions languages/acajou-backup-201612300532470.pot~

This file was deleted.

32 changes: 30 additions & 2 deletions languages/acajou.pot
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,34 @@ msgstr ""
"Language:fr\n"
"MIME-Version: 1.0\n"

#: "from_text",
#: array(
#: "label" => __("Replace the defaut « From the blog » text", "acajou"),
# wpml-name: 1bae563ac73d8764dc25047a4b779d41
msgid "Replace the defaut « From the blog » text"
msgstr "Remplacer le titre « Actualités »"

#: // Create sections for socials links
#: $wp_customize->add_section("acajou_from_section", array(
#: "title" => __("From the blog", "acajou"),
# wpml-name: e9e838e8eb8a156d2989faa260244799
msgid "From the blog"
msgstr "Actualités"

#: "typing_text",
#: array(
#: "label" => __("Type your text and use slash (/) for creating several sentences", "acajou"),
# wpml-name: dc754740f7de8b013feff530324c71b8
msgid "Type your text and use slash (/) for creating several sentences"
msgstr "Tapez votre texte et utilisez la barre oblique (/) pour créer plusieurs phrases"

#: // Create sections for socials links
#: $wp_customize->add_section("acajou_typing_section", array(
#: "title" => __("Typing machine", "acajou"),
# wpml-name: 0eae6a1413df83696f931b200ba47561
msgid "Typing machine"
msgstr "Machine à écrire"

#: <a href="<?php the_permalink();?>" class="small button post-item-buttom"><?php _e('Read more','acajou')?></a>
#: <?php if ( get_edit_post_link() ) : ?>
#: <a href="<?php echo get_edit_post_link();?>" class="small button alert"><i class="fa fa-edit"></i> <?php _e('Edit','acajou')?></a>
Expand Down Expand Up @@ -207,7 +235,7 @@ msgstr "Principal"
#: <p class="copyright"><?php _e('Developed by ','acajou')?>Samuel Guebo.<br><a href="<?php echo esc_url( __( 'https://wordpress.org/', 'acajou' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'acajou' ), 'WordPress' ); ?></a> <?php _e('and available on','acajou')?> <a href="https://github.com/samuelguebo/acajou"><i class="fa fa-github"></i> Github</a></p>
# wpml-name: d6c4a6ac6a732b8db88d1cfe32b5b44e
msgid "and available on"
msgstr "disponible sur"
msgstr "et disponible sur "

#: <div class="row">
#: <div class="small-6 large-6 columns">
Expand All @@ -228,7 +256,7 @@ msgstr "Fièrement propulsé par %s"
#: <p class="copyright"><?php _e('Developed by ','acajou')?>Samuel Guebo.<br><a href="<?php echo esc_url( __( 'https://wordpress.org/', 'acajou' ) ); ?>"><?php printf( esc_html__( 'Proudly powered by %s', 'acajou' ), 'WordPress' ); ?></a> <?php _e('and available on','acajou')?> <a href="https://github.com/samuelguebo/acajou"><i class="fa fa-github"></i> Github</a></p>
# wpml-name: 71a7765c3d553e44aaa308159b5a2ba6
msgid "https://wordpress.org/"
msgstr ""
msgstr "https://wordpress.org/"

#: <?php
#: printf( // WPCS: XSS OK.
Expand Down
Binary file modified languages/es_ES.mo
Binary file not shown.
32 changes: 29 additions & 3 deletions languages/es_ES.po
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,32 @@ msgstr ""
"MIME-Version: 1.0\n"
"X-Generator: Poedit 1.5.4\n"

# wpml-name: 1bae563ac73d8764dc25047a4b779d41
#: "from_text", array( "label" => __("Replace the defaut « From blog »
#: text", "acajou"),
msgid "Replace the defaut « From the blog » text"
msgstr "Sustituir el título \"Noticias\""

# wpml-name: e9e838e8eb8a156d2989faa260244799
#: // Create sections for socials links
#: $wp_customize->add_section("acajou_from_section", array( "title" =>
#: __("From the blog", "acajou"),
msgid "From the blog"
msgstr "Noticias"

# wpml-name: dc754740f7de8b013feff530324c71b8
#: "typing_text", array( "label" => __("Type your text and use slash (/) for
#: creating several sentences", "acajou"),
msgid "Type your text and use slash (/) for creating several sentences"
msgstr "Escriba su texto y utilice la barra (/) para crear varias oraciones"

# wpml-name: 0eae6a1413df83696f931b200ba47561
#: // Create sections for socials links
#: $wp_customize->add_section("acajou_typing_section", array( "title" =>
#: __("Typing machine", "acajou"),
msgid "Typing machine"
msgstr "Máquina de escribir"

# wpml-name: 7dce122004969d56ae2e0245cb754d35
#: <a href="<?php the_permalink();?>" class="small button
#: post-item-buttom"><?php _e('Read more','acajou')?></a> <?php if (
Expand Down Expand Up @@ -136,7 +162,7 @@ msgstr "Inicio"
#: new Palette_Custom_Control( $wp_customize, 'acajou_theme_color', array(
#: 'label' => __( 'Theme color', 'acajou' ),
msgid "Theme color"
msgstr ""
msgstr "Color del tema"

# wpml-name: 582d0217bdd3280c7fef224c83846d47
#: "github_url", array( "label" => __("Enter Github url", "acajou"),
Expand Down Expand Up @@ -197,7 +223,7 @@ msgstr "Principal"
#: href="https://github.com/samuelguebo/acajou"><i class="fa fa-github"></i>
#: Github</a></p>
msgid "and available on"
msgstr ""
msgstr "y disponible en "

# wpml-name: e2b8f1326fea2c94cdc3bccda878a9d6
#: <div class="row"> class="small-6 large-6 columns"> <p
Expand Down Expand Up @@ -230,7 +256,7 @@ msgstr "Felizmente alimentado por %s"
#: href="https://github.com/samuelguebo/acajou"><i class="fa fa-github"></i>
#: Github</a></p>
msgid "https://wordpress.org/"
msgstr ""
msgstr "https://wordpress.org/"

# wpml-name: ed9e37872f818f1e8903eba505917478
#: <?php printf( // WPCS: XSS OK. esc_html( _nx( 'One thought on
Expand Down
Binary file modified languages/fr_FR.mo
Binary file not shown.
Loading

0 comments on commit e16026b

Please sign in to comment.