Skip to content
This repository was archived by the owner on Jul 20, 2022. It is now read-only.

Commit 304a15d

Browse files
committed
Localization update
1 parent 13c026d commit 304a15d

File tree

10 files changed

+75
-86
lines changed

10 files changed

+75
-86
lines changed

author.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<?php get_header(); ?>
32

43
<?php get_template_part( 'template-parts/page-heading' ); ?>
@@ -14,5 +13,4 @@
1413
</div>
1514
</section>
1615

17-
<?php get_footer(); ?>
18-
16+
<?php get_footer(); ?>

category.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
21
<?php get_header(); ?>
3-
42
<?php get_template_part( 'template-parts/page-heading' ); ?>
53

64
<section id="content">
@@ -14,5 +12,4 @@
1412
</div>
1513
</section>
1614

17-
<?php get_footer(); ?>
18-
15+
<?php get_footer(); ?>

header.php

+1-56
Original file line numberDiff line numberDiff line change
@@ -9,62 +9,7 @@
99
</head>
1010
<body <?php body_class(); ?>>
1111
<div class="header__wrapper">
12-
<?php $announcement_text = get_field('announcement_text', 'option'); ?>
13-
<?php $announcement_link = get_field('announcement_link', 'option'); ?>
14-
<?php $left_for_freebie = get_field('announcement_how_much_for_freebie', 'option'); ?>
15-
<?php $accouncement_success_msg = get_field('announce_about_success', 'option'); ?>
16-
<?php $announcement_bg = get_field('announcement_color', 'option'); ?>
17-
<?php $hide_on_home = get_field('hide_on_home', 'option'); ?>
18-
<?php $announcement_off = get_field('turn_off_announcement_bar', 'option'); ?>
19-
20-
<?php $freebie_price = get_field('freebie_price', 'option'); ?>
21-
<?php $cart_total = WC()->cart->total; ?>
22-
23-
<?php if ( $announcement_text && $announcement_off[0] != 'off') : ?>
24-
25-
<?php if ( is_front_page() && $hide_on_home[0] == 'hide' ) : ?>
26-
27-
<?php $hide_on_home_style = 'display: none;'; ?>
28-
29-
<?php else: ?>
30-
31-
<?php $hide_on_home_style = ''; ?>
32-
33-
<?php endif; ?>
34-
35-
<div class="announcement" <?= $announcement_bg ? 'style="background-color:' . $announcement_bg . '; ' . $hide_on_home_style . ' "' : ''; ?> >
36-
37-
<?php if ( $cart_total == 0 ) : ?>
38-
<p>
39-
<?= $announcement_text ?>
40-
</p>
41-
42-
<?php if ( $announcement_link ) : ?>
43-
<a href="<?= $announcement_link['url'] ?>" target="<?= $announcement_link['target']; ?>">
44-
<?= $announcement_link['title']; ?>
45-
</a>
46-
<?php endif; ?>
47-
48-
<?php elseif ( $left_for_freebie && $cart_total < $freebie_price ) : ?>
49-
50-
51-
<?php $difference = $freebie_price - $cart_total; ?>
52-
53-
<?php $freebie_announcement = str_replace("PRICE", $difference , $left_for_freebie); ?>
54-
55-
<p><?= $freebie_announcement; ?></p>
56-
57-
<?php elseif ( $accouncement_success_msg && $cart_total > $freebie_price ) : ?>
58-
59-
<p><?= $accouncement_success_msg ?></p>
60-
61-
<?php endif; ?>
62-
63-
<button class="announcement__close">
64-
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-close" viewBox="0 0 64 64"><path d="M32 29.714L53.714 8 56 10.286 34.286 32 56 53.714 53.714 56 32 34.286 10.286 56 8 53.714 29.714 32 8 10.286 10.286 8 32 29.714z" fill="#162317" fill-rule="evenodd"/></svg>
65-
</button>
66-
</div>
67-
<?php endif; ?>
12+
<?php get_template_part( 'template-parts/top-bar' ); ?>
6813

6914
<header class="main-header <?= ($announcement_text || $announcement_link) ? 'announcement-on' : ''; ?>">
7015
<div class="main-header__filling"></div>

home.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<?php get_header(); ?>
32

43
<?php get_template_part( 'template-parts/page-heading' ); ?>
@@ -14,5 +13,4 @@
1413
</div>
1514
</section>
1615

17-
<?php get_footer(); ?>
18-
16+
<?php get_footer(); ?>

index.php

-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
<?php get_header(); ?>
22
<div id="content">
3-
43
<?php the_content(); ?>
5-
64
</div>
75
<?php get_footer(); ?>

page.php

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
11
<?php get_header(); ?>
2-
3-
<section id="content">
4-
<div class="container--sm">
5-
6-
<?php the_content(); ?>
7-
8-
</div>
9-
</section>
2+
<section id="content">
3+
<div class="container--sm">
4+
<?php the_content(); ?>
5+
</div>
6+
</section>
107
<?php get_footer(); ?>

single.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
global $post;
99
$author_id = $post->post_author;
1010
$author_name = get_the_author_meta( 'display_name', $author_id ); ?>
11-
<h6><?= get_the_date( 'Y-F-d' ); ?></h6>
11+
<h6><?= get_the_date(); ?></h6>
1212
<h6><?= _e( 'Autorius: ', 'math' );?><?= $author_name; ?></h6>
1313
<?php endif; ?>
1414

template-parts/list-categories.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ul class="categories">
22
<li class="cat-item">
33
<a href="<?= get_permalink( get_option( 'page_for_posts' ) ); ?>">
4-
<?php esc_html_e( 'All', 'math' ); ?>
4+
<?php esc_html_e( 'Visi įrašai', 'math' ); ?>
55
</a>
66
</li>
77
<?php $args = array(

template-parts/top-bar.php

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php $announcement_text = get_field('announcement_text', 'option'); ?>
2+
<?php $announcement_link = get_field('announcement_link', 'option'); ?>
3+
<?php $left_for_freebie = get_field('announcement_how_much_for_freebie', 'option'); ?>
4+
<?php $accouncement_success_msg = get_field('announce_about_success', 'option'); ?>
5+
<?php $announcement_bg = get_field('announcement_color', 'option'); ?>
6+
<?php $hide_on_home = get_field('hide_on_home', 'option'); ?>
7+
<?php $announcement_off = get_field('turn_off_announcement_bar', 'option'); ?>
8+
9+
<?php $freebie_price = get_field('freebie_price', 'option'); ?>
10+
<?php $cart_total = WC()->cart->total; ?>
11+
12+
<?php if ( $announcement_text && $announcement_off[0] != 'off') : ?>
13+
14+
<?php if ( is_front_page() && $hide_on_home[0] == 'hide' ) : ?>
15+
16+
<?php $hide_on_home_style = 'display: none;'; ?>
17+
18+
<?php else: ?>
19+
20+
<?php $hide_on_home_style = ''; ?>
21+
22+
<?php endif; ?>
23+
24+
<div class="announcement" <?= $announcement_bg ? 'style="background-color:' . $announcement_bg . '; ' . $hide_on_home_style . ' "' : ''; ?> >
25+
26+
<?php if ( $cart_total == 0 ) : ?>
27+
<p>
28+
<?= $announcement_text ?>
29+
</p>
30+
31+
<?php if ( $announcement_link ) : ?>
32+
<a href="<?= $announcement_link['url'] ?>" target="<?= $announcement_link['target']; ?>">
33+
<?= $announcement_link['title']; ?>
34+
</a>
35+
<?php endif; ?>
36+
37+
<?php elseif ( $left_for_freebie && $cart_total < $freebie_price ) : ?>
38+
39+
40+
<?php $difference = $freebie_price - $cart_total; ?>
41+
42+
<?php $freebie_announcement = str_replace("PRICE", $difference , $left_for_freebie); ?>
43+
44+
<p><?= $freebie_announcement; ?></p>
45+
46+
<?php elseif ( $accouncement_success_msg && $cart_total > $freebie_price ) : ?>
47+
48+
<p><?= $accouncement_success_msg ?></p>
49+
50+
<?php endif; ?>
51+
52+
<button class="announcement__close">
53+
<svg aria-hidden="true" focusable="false" role="presentation" class="icon icon-close" viewBox="0 0 64 64"><path d="M32 29.714L53.714 8 56 10.286 34.286 32 56 53.714 53.714 56 32 34.286 10.286 56 8 53.714 29.714 32 8 10.286 10.286 8 32 29.714z" fill="#162317" fill-rule="evenodd"/></svg>
54+
</button>
55+
</div>
56+
<?php endif; ?>

woocommerce/content-single-product.php

+8-8
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,22 @@
7676
<div class="countdown__timer">
7777
<div class="countdown__timer__item">
7878
<div class="countdown__timer__item--num" id="day--global--<?= $i; ?>"></div>
79-
<p>DAYS</p>
79+
<p><?php esc_html_e( 'DIENOS', 'math' ); ?></p>
8080
</div>
8181
<div class="countdown__timer__separator">:</div>
8282
<div class="countdown__timer__item">
8383
<div class="countdown__timer__item--num" id="hour--global--<?= $i; ?>"></div>
84-
<p>HOURS</p>
84+
<p><?php esc_html_e( 'VALANDOS', 'math' ); ?></p>
8585
</div>
8686
<div class="countdown__timer__separator">:</div>
8787
<div class="countdown__timer__item">
8888
<div class="countdown__timer__item--num" id="min--global--<?= $i; ?>"></div>
89-
<p>MINUTES</p>
89+
<p><?php esc_html_e( 'MINUTĖS', 'math' ); ?></p>
9090
</div>
9191
<div class="countdown__timer__separator">:</div>
9292
<div class="countdown__timer__item">
9393
<div class="countdown__timer__item--num" id="sec--global--<?= $i; ?>"></div>
94-
<p>SECONDS</p>
94+
<p><?php esc_html_e( 'SEKUNDĖS', 'math' ); ?></p>
9595
</div>
9696
</div>
9797
<?php $countdown_end = get_sub_field('countdown_end_date'); ?>
@@ -139,22 +139,22 @@
139139
<div class="countdown__timer">
140140
<div class="countdown__timer__item">
141141
<div class="countdown__timer__item--num" id="day--local--<?= $i; ?>"></div>
142-
<p>DAYS</p>
142+
<p><?php esc_html_e( 'DIENOS', 'math' ); ?></p>
143143
</div>
144144
<div class="countdown__timer__separator">:</div>
145145
<div class="countdown__timer__item">
146146
<div class="countdown__timer__item--num" id="hour--local--<?= $i; ?>"></div>
147-
<p>HOURS</p>
147+
<p><?php esc_html_e( 'VALANDOS', 'math' ); ?></p>
148148
</div>
149149
<div class="countdown__timer__separator">:</div>
150150
<div class="countdown__timer__item">
151151
<div class="countdown__timer__item--num" id="min--local--<?= $i; ?>"></div>
152-
<p>MINUTES</p>
152+
<p><?php esc_html_e( 'MINUTĖS', 'math' ); ?></p>
153153
</div>
154154
<div class="countdown__timer__separator">:</div>
155155
<div class="countdown__timer__item">
156156
<div class="countdown__timer__item--num" id="sec--local--<?= $i; ?>"></div>
157-
<p>SECONDS</p>
157+
<p><?php esc_html_e( 'SEKUNDĖS', 'math' ); ?></p>
158158
</div>
159159
</div>
160160
<?php $countdown_end = get_sub_field('countdown_end_date'); ?>

0 commit comments

Comments
 (0)