Skip to content
This repository was archived by the owner on Nov 14, 2024. It is now read-only.

Commit 7c224ce

Browse files
Loads theme language files; Adds pl_PL translation. #9
1 parent 2925f11 commit 7c224ce

File tree

6 files changed

+80
-2
lines changed

6 files changed

+80
-2
lines changed

bootstrap/compatibility.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function tonikgin_not_found_notice()
4949
?>
5050
<div class="error notice">
5151
<p>
52-
<?php _e("We could not find <strong><a href='//github.com/tonik/gin'>tonik/gin package</a></strong>. You have to install it before using this theme.", '{{ theme.textdomain }}'); ?>
52+
<?php _e("We could not find <a href='//github.com/tonik/gin'><strong>tonik/gin package</strong></a>. You have to install it before using this theme.", '{{ theme.textdomain }}'); ?>
5353
</p>
5454
</div>
5555
<?php

config/theme.php

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
|
4040
*/
4141
'directories' => [
42+
'languages' => 'resources/languages',
4243
'templates' => 'resources/templates',
4344
'assets' => 'resources/assets',
4445
'public' => 'public',
@@ -63,6 +64,7 @@
6364
'Setup/filters.php',
6465
'Setup/supports.php',
6566
'Setup/navs.php',
67+
'Setup/sidebars.php',
6668
'Setup/widgets.php',
6769
'Setup/shortcodes.php',
6870
'Setup/thumbnails.php',

resources/languages/pl_PL.mo

1.4 KB
Binary file not shown.

resources/languages/pl_PL.po

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
msgid ""
2+
msgstr ""
3+
"Project-Id-Version: Polski\n"
4+
"POT-Creation-Date: 2017-02-28 15:40+0100\n"
5+
"PO-Revision-Date: 2017-02-28 15:40+0100\n"
6+
"Last-Translator: \n"
7+
"Language-Team: Tonik\n"
8+
"Language: pl_PL\n"
9+
"MIME-Version: 1.0\n"
10+
"Content-Type: text/plain; charset=UTF-8\n"
11+
"Content-Transfer-Encoding: 8bit\n"
12+
"X-Generator: Poedit 1.8.11\n"
13+
"X-Poedit-Basepath: ../..\n"
14+
"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
15+
"|| n%100>=20) ? 1 : 2);\n"
16+
"X-Poedit-KeywordsList: __;_e;_x;esc_attr_e\n"
17+
"X-Poedit-SourceCharset: UTF-8\n"
18+
"X-Poedit-SearchPath-0: .\n"
19+
"X-Poedit-SearchPathExcluded-0: vendor\n"
20+
"X-Poedit-SearchPathExcluded-1: node_modules\n"
21+
22+
#: bootstrap/compatibility.php:39
23+
msgid ""
24+
"Important! This theme requires <a href='//github.com/tonik/"
25+
"gin'><strong>tonik/gin package</strong></a>. Please, make sure it's "
26+
"installed and active."
27+
msgstr ""
28+
"Uwaga! Ten motyw wymaga paczki <a href='//github.com/tonik/"
29+
"gin'><strong>tonik/gin</strong></a> do poprawnego działania. Upewnij, że "
30+
"jest ona zainstalowana i aktywna."
31+
32+
#: bootstrap/compatibility.php:52
33+
msgid ""
34+
"We could not find <a href='//github.com/tonik/gin'><strong>tonik/gin "
35+
"package</strong></a>. You have to install it before using this theme."
36+
msgstr ""
37+
"Nie mogliśmy znaleźć paczki <a href='//github.com/tonik/gin'><strong>tonik/"
38+
"gin</strong></a>. Musisz ją zainstalować, aby używać tego motywu."
39+
40+
#: src/Setup/navs.php:25
41+
msgid "Primary"
42+
msgstr "Podstawowe"
43+
44+
#: src/Setup/sidebars.php:26
45+
msgid "Sidebar"
46+
msgstr "Pasek boczny"
47+
48+
#: src/Setup/sidebars.php:27
49+
msgid "Website sidebar"
50+
msgstr "Pasek boczny strony"
51+
52+
#~ msgid ""
53+
#~ "We could not find <strong><a href='//github.com/tonik/gin'>tonik/gin "
54+
#~ "package</a></strong>. You have to install it before using this theme."
55+
#~ msgstr ""
56+
#~ "Nie mogliśmy znaleźć paczki <a href='//github.com/tonik/"
57+
#~ "gin'><strong>tonik/gin</strong></a>. Musisz ją zainstalować, aby używać "
58+
#~ "tego motywu."
59+
60+
#~ msgid "Website sidebar."
61+
#~ msgstr "Pasek boczny strony."

src/Setup/sidebars.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function register_widget_areas()
2424
{
2525
register_sidebar([
2626
'name' => __('Sidebar', config('textdomain')),
27-
'description' => __('Website sidebar.', config('textdomain')),
27+
'description' => __('Website sidebar', config('textdomain')),
2828
]);
2929
}
3030
add_action('widgets_init', '{{ theme.namespace }}\Setup\register_widget_areas');

src/Setup/supports.php

+15
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
|
1414
*/
1515

16+
use function {{ theme.namespace }}\config;
17+
1618
/**
1719
* Adds various theme supports.
1820
*
@@ -61,3 +63,16 @@ function add_theme_supports()
6163
]);
6264
}
6365
add_action('after_setup_theme', '{{ theme.namespace }}\Setup\add_theme_supports');
66+
67+
/**
68+
* Loads theme textdomain language files.
69+
*
70+
* @return void
71+
*/
72+
function load_textdomain() {
73+
$paths = config('paths');
74+
$directories = config('directories');
75+
76+
load_theme_textdomain(config('textdomain'), "{$paths['directory']}/{$directories['languages']}");
77+
}
78+
add_action('after_setup_theme', '{{ theme.namespace }}\Setup\load_textdomain');

0 commit comments

Comments
 (0)