Browse Source

Adding language support - currently only English and German

system/htmly.php
- Loads language files from folder lang/
- Sets language settings for date and time format
system/includes/dispatch.php
- function i18n() returns translated strings
pull/317/head
Ralf (infinity) 8 years ago
parent
commit
4fde479aba
41 changed files with 352 additions and 147 deletions
  1. +3
    -0
      config/config.ini.example
  2. +86
    -0
      lang/lang-de.ini
  3. +86
    -0
      lang/lang-en.ini
  4. +11
    -9
      system/admin/admin.php
  5. +5
    -5
      system/admin/views/add-content.html.php
  6. +7
    -7
      system/admin/views/categories.html.php
  7. +8
    -8
      system/admin/views/content-type.html.php
  8. +3
    -3
      system/admin/views/delete-category.html.php
  9. +3
    -3
      system/admin/views/delete-page.html.php
  10. +3
    -3
      system/admin/views/delete-post.html.php
  11. +5
    -5
      system/admin/views/edit-content.html.php
  12. +3
    -3
      system/admin/views/edit-page.html.php
  13. +2
    -2
      system/admin/views/main.html.php
  14. +1
    -1
      system/admin/views/no-posts.html.php
  15. +8
    -8
      system/admin/views/popular-posts.html.php
  16. +9
    -9
      system/admin/views/posts-list.html.php
  17. +7
    -7
      system/admin/views/user-draft.html.php
  18. +6
    -6
      system/admin/views/user-posts.html.php
  19. +25
    -14
      system/htmly.php
  20. +16
    -0
      system/includes/dispatch.php
  21. +20
    -19
      system/includes/functions.php
  22. +1
    -1
      themes/blog/layout.html.php
  23. +1
    -1
      themes/blog/no-posts.html.php
  24. +1
    -1
      themes/blog/profile.html.php
  25. +3
    -3
      themes/clean/layout.html.php
  26. +1
    -1
      themes/clean/no-posts.html.php
  27. +1
    -1
      themes/clean/profile.html.php
  28. +1
    -1
      themes/default/no-posts.html.php
  29. +1
    -1
      themes/default/profile.html.php
  30. +1
    -1
      themes/logs/layout.html.php
  31. +1
    -1
      themes/logs/no-posts.html.php
  32. +1
    -1
      themes/logs/profile.html.php
  33. +1
    -1
      themes/twentyfifteen/layout.html.php
  34. +1
    -1
      themes/twentyfifteen/main.html.php
  35. +1
    -1
      themes/twentyfifteen/no-posts.html.php
  36. +2
    -2
      themes/twentyfifteen/profile.html.php
  37. +6
    -6
      themes/twentysixteen/layout.html.php
  38. +5
    -5
      themes/twentysixteen/main.html.php
  39. +1
    -1
      themes/twentysixteen/no-posts.html.php
  40. +4
    -4
      themes/twentysixteen/post.html.php
  41. +1
    -1
      themes/twentysixteen/profile.html.php

+ 3
- 0
config/config.ini.example View File

@ -4,6 +4,9 @@ site.url = ""
; Your timezone
timezone = "Asia/Jakarta"
; Your language (currently only "en" for English or "de" for German)
language = "en"
; Blog info
blog.title = "HTMLy"
blog.tagline = "Just another HTMLy blog"


+ 86
- 0
lang/lang-de.ini View File

@ -0,0 +1,86 @@
About = "Über"
Add_category = "Kategorie hinzufügen"
Add_content = "Inhalt hinzufügen"
Add_sub = "Unterseite hinzufügen"
Admin = "Administrator"
All_blog_posts = "Alle Beiträge"
Archives = "Archiv"
Are_you_sure_you_want_to_delete_ = "Sind Sie sicher, daß Sie <strong>%s</strong> löschen wollen?"
Audio_post = "Audio-Beitrag"
Audio_post_comment = "Erstelle einen Beitrag mit hervorgehobenem Audio"
Author = "Autor"
Backup = "Backup"
Cancel = "Abbrechen"
Categories = "Kategorien"
Category = "Kategorie"
Clear_cache = "Cache löschen"
Config = "Konfiguration"
Contents = "Inhalt"
Created = "Datum"
Delete = "Löschen"
Description = "Beschreibung"
Draft = "Entwurf"
Edit = "Bearbeiten"
Edit_profile = "Profil editieren"
Filename = "Datei Name"
Follow = "Folgen"
Image_post = "Bild-Beitrag"
Image_post_comment = "Erstelle einen Beitrag mit hervorgehobenem Bild"
Import = "Import"
Link_post = "Link-Beitrag"
Link_post_comment = "Erstelle einen Beitrag mit hervorgehobenem Link"
Login = "Anmelden"
Login_page = "Anmeldeseite"
Logout = "Abmelden"
Meta_description = "Meta Beschreibung"
Mine = "Meine Beiträge"
More = "Mehr"
My_draft = "Meine Entwürfe"
My_posts = "Meine Beiträge"
Newer = "Neuere"
Next = "Frühere"
Next_post = "Nächster Beitrag"
No_draft_found = "Keine Entwürfe gefunden"
No_posts_found = "Keine Beiträge gefunden"
No_related_post_found = "Kein ähnlicher Beitrag gefunden"
Older = "Ältere"
Operations = "Operationen"
Popular_posts = "Beliebte Beiträge"
Popular_tags = "Beliebte Tags"
Posted_in = "Abgelegt in"
Posted_on = "Veröffentlicht am"
Posts = "Beiträge"
Prev = "Vorherige"
Prev_post = "Vorheriger Post"
Publish = "Veröffentlichen"
Publish_draft = "Veröffentlichen"
Published = "Datum"
Quote_post = "Quote-Beitrag"
Quote_post_comment = "Erstelle einen Beitrag mit hervorgehobenem Quote"
Recent_posts = "Letzte Beiträge"
Regular_post = "Normaler Beitrag"
Regular_post_comment = "Erstelle einen normalen Beitrag"
Related_posts = "Ähnliche Beiträge"
Revert_to_draft = "Als Entwurf speichern"
Save = "Speichern"
Save_as_draft = "Speichern als Entwurf"
Search = "Suche"
Search_for = "Suche nach"
Static_page = "Statische Seite"
Static_page_comment = "Erstelle eine statische Seite"
Static_pages = "Statische Seiten"
Tag = "Tag"
Tags = "Tags"
Title = "Titel"
Uncategorized = "Sonstiges"
Uncategorized_comment = "Themen die keine Kategorie brauchen oder nicht in andere existierende Kategorien passen."
Update = "Update"
Update_draft = "Draft aktualisieren"
Update_post = "Beitrag aktualisieren"
Video_post = "Video-Beitrag"
Video_post_comment = "Erstelle einen Beitrag mit hervorgehobenem Video"
View = "Ansicht"
Views = "Ansichten"
Your_recent_posts = "Deine letzten Beiträge"
by = "von"
read_more = "weiterlesen"

+ 86
- 0
lang/lang-en.ini View File

@ -0,0 +1,86 @@
About = "About"
Add_category = "Add category"
Add_content = "Add content"
Add_sub = "Add sub"
Admin = "Admin"
All_blog_posts = "All blog posts"
Archives = "Archives"
Are_you_sure_you_want_to_delete_ = "Are you sure you want to delete <strong>%s</strong>?"
Audio_post = "Audio post"
Audio_post_comment = "Creating blog post with featured audio"
Author = "Author"
Backup = "Backup"
Cancel = "Cancel"
Categories = "Categories"
Category = "Category"
Clear_cache = "Clear cache"
Config = "Config"
Contents = "Contents"
Created = "Created"
Delete = "Delete"
Description = "Description"
Draft = "Draft"
Edit = "Edit"
Edit_profile = "Edit profile"
Filename = "Filename"
Follow = "Follow"
Image_post = "Image post"
Image_post_comment = "Creating blog post with featured image"
Import = "Import"
Link_post = "Link post"
Link_post_comment = "Creating blog post with featured link"
Login = "Login"
Login_page = "Login page"
Logout = "Logout"
Meta_description = "Meta description"
Mine = "Mine"
More = "More"
My_draft = "My draft"
My_posts = "My posts"
Newer = "Newer"
Next = "Next"
Next_post = "Next post"
No_draft_found = "No draft found"
No_posts_found = "No posts found"
No_related_post_found = "No related post found"
Older = "Older"
Operations = "Operations"
Popular_posts = "Popular posts"
Popular_tags = "Popular tags"
Posted_in = "Posted in"
Posted_on = "Posted on"
Posts = "Posts"
Prev = "Old"
Prev_post = "Previous Post"
Publish = "Publish"
Publish_draft = "Publish draft"
Published = "Published"
Quote_post = "Quote post"
Quote_post_comment = "Creating blog post with featured quote"
Recent_posts = "Recent posts"
Regular_post = "Regular post"
Regular_post_comment = "Creating regular blog post"
Related_posts = "Related posts"
Revert_to_draft = "Revert to draft"
Save = "Save"
Save_as_draft = "Save as draft"
Search = "Search"
Search_for = "Search for"
Static_page = "Static page"
Static_page_comment = "Creating static page"
Static_pages = "Static pages"
Tag = "Tag"
Tags = "Tags"
Title = "Title"
Uncategorized = "Uncategorized"
Uncategorized_comment = "Topics that don't need a category, or don't fit into any other existing category"
Update = "Update"
Update_draft = "Update draft"
Update_post = "Update post"
Video_post = "Video post"
Video_post_comment = "Creating blog post with featured video"
View = "View"
Views = "Views"
Your_recent_posts = "Your recent posts"
by = "by"
read_more = "read more"

+ 11
- 9
system/admin/admin.php View File

@ -673,14 +673,16 @@ function get_feed($feed_url, $credit)
// Get recent posts by user
function get_user_posts()
{
global $date_format;
if (isset($_SESSION[config("site.url")]['user'])) {
$posts = get_profile_posts($_SESSION[config("site.url")]['user'], 1, 5);
if (!empty($posts)) {
echo '<table class="post-list">';
echo '<tr class="head"><th>Title</th><th>Published</th>';
echo '<tr class="head"><th>' . i18n('Title') . '</th><th>' . i18n('Published') . '</th>';
if (config("views.counter") == "true")
echo '<th>Views</th>';
echo '<th>Tag</th><th>Operations</th></tr>';
echo '<th>' . i18n('Tag') . '</th><th>' . i18n('Operations') . '</th></tr>';
$i = 0;
$len = count($posts);
foreach ($posts as $p) {
@ -694,11 +696,11 @@ function get_user_posts()
$i++;
echo '<tr class="' . $class . '">';
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
echo '<td>' . date('d F Y', $p->date) . '</td>';
echo '<td>' . strftime($date_format, $p->date) . '</td>';
if (config("views.counter") == "true")
echo '<td>' . $p->views . '</td>';
echo '<td>' . $p->tag . '</td>';
echo '<td><a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>';
echo '<td><a href="' . $p->url . '/edit?destination=admin">' . i18n('Edit') . '</a> <a href="' . $p->url . '/delete?destination=admin">' . i18n('Delete') . '</a></td>';
echo '</tr>';
}
echo '</table>';
@ -714,10 +716,10 @@ function get_user_pages()
if (!empty($posts)) {
krsort($posts);
echo '<table class="post-list">';
echo '<tr class="head"><th>Title</th>';
echo '<tr class="head"><th>' . i18n('Title') . '</th>';
if (config("views.counter") == "true")
echo '<th>Views</th>';
echo '<th>Operations</th></tr>';
echo '<th>' . i18n('Operations') . '</th></tr>';
$i = 0;
$len = count($posts);
foreach ($posts as $p) {
@ -734,7 +736,7 @@ function get_user_pages()
echo '<td><a target="_blank" href="' . $p->url . '">' . $p->title . '</a></td>';
if (config("views.counter") == "true")
echo '<td>' . $p->views . '</td>';
echo '<td><a href="' . $p->url . '/add?destination=admin">Add Sub</a> <a href="' . $p->url . '/edit?destination=admin">Edit</a> <a href="' . $p->url . '/delete?destination=admin">Delete</a></td>';
echo '<td><a href="' . $p->url . '/add?destination=admin">' . i18n('Add_sub') . '</a> <a href="' . $p->url . '/edit?destination=admin">' . i18n('Edit') . '</a> <a href="' . $p->url . '/delete?destination=admin">' . i18n('Delete') . '</a></td>';
echo '</tr>';
$shortUrl = substr($p->url, strrpos($p->url, "/") + 1);
@ -745,7 +747,7 @@ function get_user_pages()
echo '<td> &raquo;<a target="_blank" href="' . $sp->url . '">' . $sp->title . '</a></td>';
if (config("views.counter") == "true")
echo '<td>' . $sp->views . '</td>';
echo '<td><a href="' . $sp->url . '/edit?destination=admin">Edit</a> <a href="' . $sp->url . '/delete?destination=admin">Delete</a></td>';
echo '<td><a href="' . $sp->url . '/edit?destination=admin">' . i18n('Edit') . '</a> <a href="' . $sp->url . '/delete?destination=admin">' . i18n('Delete') . '</a></td>';
echo '</tr>';
}
}
@ -762,7 +764,7 @@ function get_backup_files()
if (!empty($files)) {
krsort($files);
echo '<table class="backup-list">';
echo '<tr class="head"><th>Filename</th><th>Date</th><th>Operations</th></tr>';
echo '<tr class="head"><th>' . i18n('Filename') . '</th><th>Date</th><th>' . i18n('Operations') . '</th></tr>';
$i = 0;
$len = count($files);
foreach ($files as $file) {


+ 5
- 5
system/admin/views/add-content.html.php View File

@ -27,14 +27,14 @@ $desc = get_category_info(null);
<div class="wmd-panel">
<form method="POST">
Title <span class="required">*</span>
<?php echo i18n('Title');?> <span class="required">*</span>
<br>
<input type="text" class="text <?php if (isset($postTitle)) { if (empty($postTitle)) { echo 'error';}} ?>" name="title" value="<?php if (isset($postTitle)) { echo $postTitle;} ?>"/>
<br><br>
Category <span class="required">*</span>
<?php echo i18n('Category');?> <span class="required">*</span>
<br>
<select name="category">
<option value="uncategorized">Uncategorized</option>
<option value="uncategorized"><?php echo i18n("Uncategorized");?></option>
<?php foreach ($desc as $d):?>
<option value="<?php echo $d->md;?>"><?php echo $d->title;?></option>
<?php endforeach;?>
@ -48,7 +48,7 @@ $desc = get_category_info(null);
<br>
<span class="help">If the url leave empty we will use the post title.</span>
<br><br>
Meta Description (optional)<br>
<?php echo i18n('Meta_description');?> (optional)<br>
<textarea name="description" rows="3" cols="20"><?php if (isset($p->description)) { echo $p->description;} ?></textarea>
<br><br>
@ -99,7 +99,7 @@ $desc = get_category_info(null);
<textarea id="wmd-input" class="wmd-input <?php if (isset($postContent)) { if (empty($postContent)) { echo 'error'; } } ?>" name="content" cols="20" rows="10"><?php if (isset($postContent)) { echo $postContent;} ?></textarea>
<br/>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
<input type="submit" name="publish" class="submit" value="Publish"/> <input type="submit" name="draft" class="draft" value="Save as draft"/>
<input type="submit" name="publish" class="submit" value="<?php echo i18n('Publish');?>"/> <input type="submit" name="draft" class="draft" value="<?php echo i18n('Save_as_draft');?>"/>
</form>
</div>


+ 7
- 7
system/admin/views/categories.html.php View File

@ -1,16 +1,16 @@
<?php $desc = get_category_info(null); ?>
<a href="<?php echo site_url();?>add/category">Add category</a>
<a href="<?php echo site_url();?>add/category"><?php echo i18n('Add_category');?></a>
<table class="category-list">
<tr class="head">
<th>Name</th>
<th>Description</th>
<th>Contents</th>
<th>Operations</th>
<th><?php echo i18n('Description');?></th>
<th><?php echo i18n('Contents');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
<tr>
<td><a href="<?php echo site_url();?>category/uncategorized" target="_blank">Uncategorized</a></td>
<td><p>Topics that don't need a category, or don't fit into any other existing category.</p></td>
<td><a href="<?php echo site_url();?>category/uncategorized" target="_blank"><?php echo i18n("Uncategorized");?></a></td>
<td><p><?php echo i18n('Uncategorized_comment');?>.</p></td>
<td><?php $total = get_draftcount('uncategorized') + get_categorycount('uncategorized'); echo $total?></td>
<td></td>
</tr>
@ -19,7 +19,7 @@
<td><a href="<?php echo $d->url;?>" target="_blank"><?php echo $d->title;?></a></td>
<td><?php echo $d->body;?></td>
<td><?php $total = get_draftcount($d->md) + get_categorycount($d->md); echo $total?></td>
<td><a href="<?php echo $d->url;?>/edit?destination=admin/categories">Edit</a> <?php if (get_categorycount($d->md) == 0 && get_draftcount($d->md) == 0 ){echo '<a href="' . $d->url . '/delete?destination=admin/categories">Delete</a>';}?></td>
<td><a href="<?php echo $d->url;?>/edit?destination=admin/categories"><?php echo i18n('Edit');?></a> <?php if (get_categorycount($d->md) == 0 && get_draftcount($d->md) == 0 ){echo '<a href="' . $d->url . '/delete?destination=admin/categories">' . i18n('Delete') . '</a>';}?></td>
</tr>
<?php endforeach;?>
</table>

+ 8
- 8
system/admin/views/content-type.html.php View File

@ -1,9 +1,9 @@
<h2>Add content</h2>
<h2><?php echo i18n('Add_content');?></h2>
<p><a href="<?php echo site_url();?>add/content?type=post">Regular post</a><br>Creating regular blog post.</p>
<p><a href="<?php echo site_url();?>add/content?type=image">Image post</a><br>Creating blog post with featured image.</p>
<p><a href="<?php echo site_url();?>add/content?type=video">Video post</a><br>Creating blog post with featured video.</p>
<p><a href="<?php echo site_url();?>add/content?type=audio">Audio post</a><br>Creating blog post with featured audio.</p>
<p><a href="<?php echo site_url();?>add/content?type=link">Link post</a><br>Creating blog post with featured link.</p>
<p><a href="<?php echo site_url();?>add/content?type=quote">Quote post</a><br>Creating blog post with featured quote.</p>
<p><a href="<?php echo site_url();?>add/page">Static page</a><br>Creating static page.</p>
<p><a href="<?php echo site_url();?>add/content?type=post"><?php echo i18n('Regular_post')?></a><br><?php echo i18n('Regular_post_comment')?>.</p>
<p><a href="<?php echo site_url();?>add/content?type=image"><?php echo i18n('Image_post')?></a><br><?php echo i18n('Image_post_comment')?>.</p>
<p><a href="<?php echo site_url();?>add/content?type=video"><?php echo i18n('Video_post')?></a><br><?php echo i18n('Video_post_comment')?>.</p>
<p><a href="<?php echo site_url();?>add/content?type=audio"><?php echo i18n('Audio_post')?></a><br><?php echo i18n('Audio_post_comment')?>.</p>
<p><a href="<?php echo site_url();?>add/content?type=link"><?php echo i18n('Link_post')?></a><br><?php echo i18n('Link_post_comment')?>.</p>
<p><a href="<?php echo site_url();?>add/content?type=quote"><?php echo i18n('Quote_post')?></a><br><?php echo i18n('Quote_post_comment')?>.</p>
<p><a href="<?php echo site_url();?>add/page"><?php echo i18n('Static_page')?></a><br><?php echo i18n('Static_page_comment')?>.</p>

+ 3
- 3
system/admin/views/delete-category.html.php View File

@ -21,10 +21,10 @@ if (isset($destination)) {
$back = site_url();
}
?>
<p>Are you sure want to delete <strong><?php echo $p->title; ?></strong>?</p>
<p><?php echo sprintf(i18n('Are_you_sure_you_want_to_delete_'), $p->title);?></p>
<form method="POST">
<input type="hidden" name="file" value="<?php echo $p->file ?>"/><br>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
<input type="submit" name="submit" value="Delete"/>
<span><a href="<?php echo $back ?>">Cancel</a></span>
<input type="submit" name="submit" value="<?php echo i18n('Delete');?>"/>
<span><a href="<?php echo $back . '">' . i18n('Cancel');?></a></span>
</form>

+ 3
- 3
system/admin/views/delete-page.html.php View File

@ -21,10 +21,10 @@ if (isset($destination)) {
$back = site_url();
}
?>
<p>Are you sure want to delete <strong><?php echo $p->title; ?></strong>?</p>
<p><?php echo sprintf(i18n('Are_you_sure_you_want_to_delete_'), $p->title);?></p>
<form method="POST">
<input type="hidden" name="file" value="<?php echo $p->file ?>"/><br>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
<input type="submit" name="submit" value="Delete"/>
<span><a href="<?php echo $back ?>">Cancel</a></span>
<input type="submit" name="submit" value="<?php echo i18n('Delete');?>"/>
<span><a href="<?php echo $back . '">' . i18n('Cancel');?></a></span>
</form>

+ 3
- 3
system/admin/views/delete-post.html.php View File

@ -29,10 +29,10 @@ if (isset($destination)) {
}
?>
<?php echo '<p>Are you sure want to delete <strong>' . $p->title . '</strong>?</p>'; ?>
<p><?php echo sprintf(i18n('Are_you_sure_you_want_to_delete_'), $p->title);?></p>
<form method="POST">
<input type="hidden" name="file" value="<?php echo $p->file ?>"/><br>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
<input type="submit" name="submit" value="Delete"/>
<span><a href="<?php echo $back ?>">Cancel</a></span>
<input type="submit" name="submit" value="<?php echo i18n('Delete');?>"/>
<span><a href="<?php echo $back . '">' . i18n('Cancel');?></a></span>
</form>

+ 5
- 5
system/admin/views/edit-content.html.php View File

@ -71,14 +71,14 @@ if (config('permalink.type') == 'post') {
<div class="wmd-panel">
<form method="POST">
Title <span class="required">*</span>
<?php echo i18n('Title');?> <span class="required">*</span>
<br>
<input type="text" name="title" class="text <?php if (isset($postTitle)) { if (empty($postTitle)) { echo 'error';} } ?>" value="<?php echo $oldtitle ?>"/>
<br><br>
Category <span class="required">*</span>
<?php echo i18n('Category');?> <span class="required">*</span>
<br>
<select name="category">
<option value="uncategorized">Uncategorized</option>
<option value="uncategorized"><?php echo i18n("Uncategorized");?></option>
<?php foreach ($desc as $d):?>
<option value="<?php echo $d->md;?>" <?php if($category === $d->md) { echo 'selected="selected"';} ?>><?php echo $d->title;?></option>
<?php endforeach;?>
@ -146,9 +146,9 @@ if (config('permalink.type') == 'post') {
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
<input type="hidden" name="csrf_token" value="<?php echo get_csrf() ?>">
<?php if ($isdraft[4] == 'draft') { ?>
<input type="submit" name="publishdraft" class="submit" value="Publish draft"/> <input type="submit" name="updatedraft" class="draft" value="Update draft"/> <a href="<?php echo $delete ?>">Delete</a>
<input type="submit" name="publishdraft" class="submit" value="<?php echo i18n('Publish_draft');?>"/> <input type="submit" name="updatedraft" class="draft" value="<?php echo i18n('Update_draft');?>"/> <a href="<?php echo $delete ?>"><?php echo i18n('Delete');?></a>
<?php } else { ?>
<input type="submit" name="updatepost" class="submit" value="Update post"/> <input type="submit" name="revertpost" class="revert" value="Revert to draft"/> <a href="<?php echo $delete ?>">Delete</a>
<input type="submit" name="updatepost" class="submit" value="<?php echo i18n('Update_post');?>"/> <input type="submit" name="revertpost" class="revert" value="<?php echo i18n('Revert_to_draft');?>"/> <a href="<?php echo $delete ?>"><?php echo i18n('Delete');?></a>
<?php }?>
</form>
</div>


+ 3
- 3
system/admin/views/edit-page.html.php View File

@ -79,7 +79,7 @@ if ($type == 'is_frontpage') {
<div class="wmd-panel">
<form method="POST">
Title <span class="required">*</span>
<?php echo i18n('Title');?> <span class="required">*</span>
<br>
<input type="text" name="title" class="text <?php if (isset($postTitle)) { if (empty($postTitle)) { echo 'error'; } } ?>" value="<?php echo $oldtitle ?>"/><br><br>
<?php if($type != 'is_frontpage' && $type != 'is_profile') { ?>
@ -87,7 +87,7 @@ if ($type == 'is_frontpage') {
<br>
<span class="help">If the url leave empty we will use the page title.</span>
<br><br>
Meta Description (optional)<br><textarea name="description" rows="3" cols="20"><?php if (isset($p->description)) { echo $p->description;} else {echo $olddescription;}?></textarea>
<?php echo i18n('Meta_description');?> (optional)<br><textarea name="description" rows="3" cols="20"><?php if (isset($p->description)) { echo $p->description;} else {echo $olddescription;}?></textarea>
<br><br>
<?php } ?>
<div id="wmd-button-bar" class="wmd-button-bar"></div>
@ -101,7 +101,7 @@ if ($type == 'is_frontpage') {
<input type="submit" name="submit" class="submit" value="Save category"/>
<?php } else {?>
<input type="hidden" name="oldfile" class="text" value="<?php echo $url ?>"/>
<input type="submit" name="submit" class="submit" value="Save"/> <a href="<?php echo $delete ?>">Delete</a>
<input type="submit" name="submit" class="submit" value="<?php echo i18n('Save');?>"/> <a href="<?php echo $delete ?>"><?php echo i18n('Delete');?></a>
<?php } ?>
</form>
</div>


+ 2
- 2
system/admin/views/main.html.php View File

@ -1,5 +1,5 @@
<?php
echo '<h2>Your recent posts</h2>';
echo '<h2>' . i18n('Your_recent_posts') . '</h2>';
get_user_posts();
echo '<h2>Static pages</h2>';
echo '<h2>' . i18n('Static_pages') . '</h2>';
get_user_pages(); ?>

+ 1
- 1
system/admin/views/no-posts.html.php View File

@ -1 +1 @@
<h1>No posts found!</h1>
<h1><?php echo i18n('No_posts_found');?>!</h1>

+ 8
- 8
system/admin/views/popular-posts.html.php View File

@ -2,12 +2,12 @@
<?php if (!empty($posts)) { ?>
<table class="post-list">
<tr class="head">
<th>Title</th>
<th>Published</th><?php if (config("views.counter") == "true"): ?>
<th>Views</th><?php endif; ?>
<th>Author</th>
<th>Tag</th>
<th>Operations</th>
<th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Published');?></th><?php if (config("views.counter") == "true"): ?>
<th><?php echo i18n('Views');?></th><?php endif; ?>
<th><?php echo i18n('Author');?></th>
<th><?php echo i18n('Tag');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
<?php $i = 0;
$len = count($posts); ?>
@ -24,7 +24,7 @@
?>
<tr class="<?php echo $class ?>">
<td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td>
<td><?php echo date('d F Y', $p->date) ?></td>
<td><?php echo strftime($date_format, $p->date) ?></td>
<?php if (config("views.counter") == "true"): ?>
<td><?php echo $p->views ?></td><?php endif; ?>
<td><a target="_blank" href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td>
@ -35,5 +35,5 @@
<?php endforeach; ?>
</table>
<?php } else {
echo 'No posts found!';
echo i18n('No_posts_found') . '!';
} ?>

+ 9
- 9
system/admin/views/posts-list.html.php View File

@ -2,12 +2,12 @@
<?php if (!empty($posts)) { ?>
<table class="post-list">
<tr class="head">
<th>Title</th>
<th>Published</th><?php if (config("views.counter") == "true"): ?>
<th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Published');?></th><?php if (config("views.counter") == "true"): ?>
<th>Views</th><?php endif; ?>
<th>Author</th>
<th>Tag</th>
<th>Operations</th>
<th><?php echo i18n('Author');?></th>
<th><?php echo i18n('Tag');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
<?php $i = 0;
$len = count($posts); ?>
@ -24,13 +24,13 @@
?>
<tr class="<?php echo $class ?>">
<td><a target="_blank" href="<?php echo $p->url ?>"><?php echo $p->title ?></a></td>
<td><?php echo date('d F Y', $p->date) ?></td>
<td><?php echo strftime($date_format, $p->date) ?></td>
<?php if (config("views.counter") == "true"): ?>
<td><?php echo $p->views ?></td><?php endif; ?>
<td><a target="_blank" href="<?php echo $p->authorUrl ?>"><?php echo $p->author ?></a></td>
<td><?php echo $p->tag ?></td>
<td><a href="<?php echo $p->url ?>/edit?destination=admin/posts">Edit</a> <a
href="<?php echo $p->url ?>/delete?destination=admin/posts">Delete</a></td>
<td><a href="<?php echo $p->url ?>/edit?destination=admin/posts"><?php echo i18n('Edit');?></a> <a
href="<?php echo $p->url ?>/delete?destination=admin/posts"><?php echo i18n('Delete');?></a></td>
</tr>
<?php endforeach; ?>
</table>
@ -45,5 +45,5 @@
</div>
<?php endif; ?>
<?php } else {
echo 'No posts found!';
echo i18n('No_posts_found') . '!';
} ?>

+ 7
- 7
system/admin/views/user-draft.html.php View File

@ -2,10 +2,10 @@
<?php if (!empty($posts)) { ?>
<table class="post-list">
<tr class="head">
<th>Title</th>
<th>Created</th>
<th>Tag</th>
<th>Operations</th>
<th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Created');?></th>
<th><?php echo i18n('Tag');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
<?php $i = 0;
$len = count($posts); ?>
@ -22,12 +22,12 @@
?>
<tr class="<?php echo $class ?>">
<td><?php echo $p->title ?></td>
<td><?php echo date('d F Y', $p->date) ?></td>
<td><?php echo strftime($date_format, $p->date) ?></td>
<td><?php echo strip_tags($p->tag) ?></td>
<td><a href="<?php echo $p->url ?>/edit?destination=admin/draft">Edit</a> <a href="<?php echo $p->url ?>/delete?destination=admin/draft">Delete</a></td>
<td><a href="<?php echo $p->url ?>/edit?destination=admin/draft"><?php echo i18n('Edit');?></a> <a href="<?php echo $p->url ?>/delete?destination=admin/draft"><?php echo i18n('Delete');?></a></td>
</tr>
<?php endforeach; ?>
</table>
<?php } else {
echo 'No draft found!';
echo i18n('No_draft_found') . '!';
} ?>

+ 6
- 6
system/admin/views/user-posts.html.php View File

@ -2,13 +2,13 @@
<?php if (!empty($posts)) { ?>
<table class="post-list">
<tr class="head">
<th>Title</th>
<th>Published</th>
<th><?php echo i18n('Title');?></th>
<th><?php echo i18n('Published');?></th>
<?php if (config("views.counter") == "true"): ?>
<th>Views</th>
<?php endif; ?>
<th>Tag</th>
<th>Operations</th>
<th><?php echo i18n('Tag');?></th>
<th><?php echo i18n('Operations');?></th>
</tr>
<?php $i = 0;
$len = count($posts); ?>
@ -30,7 +30,7 @@
<td><?php echo $p->views ?></td>
<?php endif; ?>
<td><?php echo $p->tag ?></td>
<td><a href="<?php echo $p->url ?>/edit?destination=admin/mine">Edit</a> <a href="<?php echo $p->url ?>/delete?destination=admin/mine">Delete</a></td>
<td><a href="<?php echo $p->url ?>/edit?destination=admin/mine">Edit</a> <a href="<?php echo $p->url ?>/delete?destination=admin/mine"><?php echo i18n('Delete');?></a></td>
</tr>
<?php endforeach; ?>
</table>
@ -45,5 +45,5 @@
</div>
<?php endif; ?>
<?php } else {
echo 'No posts found!';
echo i18n('No_posts_found') . '!';
} ?>

+ 25
- 14
system/htmly.php View File

@ -3,6 +3,17 @@
// Load the configuration file
config('source', $config_file);
// Settings for the language
if ( config('language') === "de" ) {
i18n('source', 'lang/lang-de.ini'); // Load the German language file
$date_format = '%d. %B %Y'; // Date format German style
setlocale(LC_TIME, 'de_DE', 'de_DE.utf8', "German"); // Change time format to German
} else { // Default: English ("en")
i18n('source', 'lang/lang-en.ini'); // Load the English language file
$date_format = '%B %d, %Y'; // Date format English style
setlocale(LC_TIME, 'en_US', 'en_US.utf8', "English"); // Change time format to English
}
// Set the timezone
if (config('timezone')) {
date_default_timezone_set(config('timezone'));
@ -403,7 +414,7 @@ get('/add/content', function () {
config('views.root', 'system/admin/views');
render('add-content', array(
'title' => 'Add content - ' . blog_title(),
'title' => i18n('Add_content') . ' - ' . blog_title(),
'description' => strip_tags(blog_description()),
'canonical' => site_url(),
'type' => $type,
@ -866,7 +877,7 @@ get('/admin/posts', function () {
// a non-existing page
render('no-posts', array(
'title' => 'All blog posts - ' . blog_title(),
'title' => i18n('All_blog_posts') . ' - ' . blog_title(),
'description' => strip_tags(blog_description()),
'canonical' => site_url(),
'bodyclass' => 'no-posts',
@ -884,10 +895,10 @@ get('/admin/posts', function () {
}
render('posts-list', array(
'title' => 'All blog posts - ' . blog_title(),
'title' => i18n('All_blog_posts') . ' - ' . blog_title(),
'description' => strip_tags(blog_description()),
'canonical' => site_url(),
'heading' => 'All blog posts',
'heading' => i18n('All_blog_posts'),
'page' => $page,
'posts' => $posts,
'bodyclass' => 'all-posts',
@ -898,7 +909,7 @@ get('/admin/posts', function () {
));
} else {
render('denied', array(
'title' => 'All blog posts - ' . blog_title(),
'title' => i18n('All_blog_posts') . ' - ' . blog_title(),
'description' => strip_tags(blog_description()),
'canonical' => site_url(),
'type' => 'is_admin-posts',
@ -1012,7 +1023,7 @@ get('/admin/mine', function () {
'description' => strip_tags(blog_description()),
'canonical' => site_url(),
'page' => $page,
'heading' => 'My posts',
'heading' => i18n('My_posts'),
'posts' => null,
'about' => $author->about,
'name' => $author->name,
@ -1029,7 +1040,7 @@ get('/admin/mine', function () {
'title' => 'My blog posts - ' . blog_title(),
'description' => strip_tags(blog_description()),
'canonical' => site_url(),
'heading' => 'My posts',
'heading' => i18n('My_posts'),
'page' => $page,
'posts' => $posts,
'about' => $author->about,
@ -1073,11 +1084,11 @@ get('/admin/draft', function () {
if (empty($posts) || $page < 1) {
render('user-draft', array(
'title' => 'My draft - ' . blog_title(),
'title' => i18n('My_draft') . ' - ' . blog_title(),
'description' => strip_tags(blog_description()),
'canonical' => site_url(),
'page' => $page,
'heading' => 'My draft',
'heading' => i18n('My_draft'),
'posts' => null,
'about' => $author->about,
'name' => $author->name,
@ -1090,10 +1101,10 @@ get('/admin/draft', function () {
}
render('user-draft', array(
'title' => 'My draft - ' . blog_title(),
'title' => i18n('My_draft') . ' - ' . blog_title(),
'description' => strip_tags(blog_description()),
'canonical' => site_url(),
'heading' => 'My draft',
'heading' => i18n('My_draft'),
'page' => $page,
'posts' => $posts,
'about' => $author->about,
@ -1114,13 +1125,13 @@ get('/admin/content', function () {
if (login()) {
config('views.root', 'system/admin/views');
render('content-type', array(
'title' => 'Add content - ' . blog_title(),
'title' => i18n('Add_content') . ' - ' . blog_title(),
'description' => strip_tags(blog_description()),
'canonical' => site_url(),
'type' => 'is_admin-content',
'is_admin' => true,
'bodyclass' => 'admin-content',
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; Add content'
'breadcrumb' => '<a href="' . site_url() . '">' . config('breadcrumb.home') . '</a> &#187; ' . i18n('Add_content')
));
} else {
$login = site_url() . 'login';
@ -2319,7 +2330,7 @@ get('/:static', function ($static) {
if (login()) {
config('views.root', 'system/admin/views');
render('main', array(
'title' => 'Admin - ' . blog_title(),
'title' => i18n('Admin') . ' - ' . blog_title(),
'description' => strip_tags(blog_description()),
'canonical' => site_url(),
'bodyclass' => 'admin-front',


+ 16
- 0
system/includes/dispatch.php View File

@ -40,6 +40,22 @@ function error($code, $message)
die($message);
}
// i18n provides strings in the current language
function i18n($key, $value = null)
{
static $_i18n = array();
if ($key === 'source') {
if (file_exists($value))
$_i18n = parse_ini_file($value, true);
else
$_i18n = parse_ini_file('lang/lang-en.ini', true);
} elseif ($value == null)
return (isset($_i18n[$key]) ? $_i18n[$key] : '_i18n_' . $key . '_i18n_');
else
$_i18n[$key] = $value;
}
function config($key, $value = null)
{
static $_config = array();


+ 20
- 19
system/includes/functions.php View File

@ -556,7 +556,7 @@ function default_category()
$tmp = array();
$desc = new stdClass;
$desc->title = 'Uncategorized';
$desc->title = i18n("Uncategorized");
$desc->url = site_url() . 'category/uncategorized';
$desc->body = '<p>Topics that don&#39;t need a category, or don&#39;t fit into any other existing category.</p>';
@ -586,7 +586,7 @@ function category_list($custom = null) {
foreach ($arr as $a) {
$cat[] = array($a->md, $a->title);
}
array_push($cat, array('uncategorized', 'Uncategorized'));
array_push($cat, array('uncategorized', i18n('Uncategorized')));
asort($cat);
$tmp = serialize($cat);
file_put_contents($filename, print_r($tmp, true));
@ -988,7 +988,7 @@ function get_related($tag, $custom = null, $count = null)
echo '</ul>';
} else {
echo '<ul><li>No related post found</li></ul>';
echo '<ul><li>' . i18n('No_related_post_found') . '</li></ul>';
}
} else {
@ -1406,7 +1406,7 @@ EOF;
echo '<ul class="month">';
foreach ($by_month as $month => $count) {
$name = date('F', mktime(0, 0, 0, $month, 1, 2010));
$name = strftime('%B', mktime(0, 0, 0, $month, 1, 2010));
echo '<li class="item"><a href="' . site_url() . 'archive/' . $year . '-' . $month . '">' . $name . '</a>';
echo ' <span class="count">(' . $count . ')</span></li>';
}
@ -2150,10 +2150,11 @@ function search($text = null)
</form>
EOF;
} else {
$search = i18n('Search');
echo <<<EOF
<form id="search-form" method="get">
<input type="text" class="search-input" name="search" value="Search" onfocus="if (this.value == 'Search') {this.value = '';}" onblur="if (this.value == '') {this.value = 'Search';}">
<input type="submit" value="Search" class="search-button">
<input type="text" class="search-input" name="search" value="{$search}" onfocus="if (this.value == '{$search}') {this.value = '';}" onblur="if (this.value == '') {this.value = '{$search}';}">
<input type="submit" value="{$search}" class="search-button">
</form>
EOF;
}
@ -2760,28 +2761,28 @@ function toolbar()
<link href="{$base}system/resources/css/toolbar.css" rel="stylesheet" />
EOF;
echo '<div id="toolbar"><ul>';
echo '<li><a href="' . $base . 'admin">Admin</a></li>';
echo '<li><a href="' . $base . 'admin">' . i18n('Admin') . '</a></li>';
if ($role === 'admin') {
echo '<li><a href="' . $base . 'admin/posts">Posts</a></li>';
echo '<li><a href="' . $base . 'admin/posts">' . i18n('Posts') . '</a></li>';
if (config('views.counter') == 'true') {
echo '<li><a href="' . $base . 'admin/popular">Popular</a></li>';
}
}
echo '<li><a href="' . $base . 'admin/mine">Mine</a></li>';
echo '<li><a href="' . $base . 'admin/draft">Draft</a></li>';
echo '<li><a href="' . $base . 'admin/content">Add content</a></li>';
echo '<li><a href="' . $base . 'admin/mine">' . i18n('Mine') . '</a></li>';
echo '<li><a href="' . $base . 'admin/draft">' . i18n('Draft') . '</a></li>';
echo '<li><a href="' . $base . 'admin/content">' . i18n('Add_content') . '</a></li>';
if ($role === 'admin') {
echo '<li><a href="' . $base . 'admin/categories">Categories</a></li>';
echo '<li><a href="' . $base . 'admin/categories">' . i18n('Categories') . '</a></li>';
}
echo '<li><a href="' . $base . 'edit/profile">Edit profile</a></li>';
echo '<li><a href="' . $base . 'admin/import">Import</a></li>';
echo '<li><a href="' . $base . 'admin/backup">Backup</a></li>';
echo '<li><a href="' . $base . 'edit/profile">' . i18n('Edit_profile') . '</a></li>';
echo '<li><a href="' . $base . 'admin/import">' . i18n('Import') . '</a></li>';
echo '<li><a href="' . $base . 'admin/backup">' . i18n('Backup') . '</a></li>';
if ($role === 'admin') {
echo '<li><a href="' . $base . 'admin/config">Config</a></li>';
echo '<li><a href="' . $base . 'admin/config">' . i18n('Config') . '</a></li>';
}
echo '<li><a href="' . $base . 'admin/clear-cache">Clear cache</a></li>';
echo '<li><a href="' . $base . 'admin/update">Update</a></li>';
echo '<li><a href="' . $base . 'logout">Logout</a></li>';
echo '<li><a href="' . $base . 'admin/clear-cache">' . i18n('Clear_cache') . '</a></li>';
echo '<li><a href="' . $base . 'admin/update">' . i18n('Update') . '</a></li>';
echo '<li><a href="' . $base . 'logout">' . i18n('Logout') . '</a></li>';
echo '</ul></div>';
}


+ 1
- 1
themes/blog/layout.html.php View File

@ -166,7 +166,7 @@
</aside><!--//section-->
<aside class="category-list aside section">
<div class="section-inner">
<h2 class="heading">Category</h2>
<h2 class="heading"><?php echo i18n('Category');?></h2>
<div class="content">
<?php echo category_list();?>
</div><!--//content-->


+ 1
- 1
themes/blog/no-posts.html.php View File

@ -1 +1 @@
<h1>No posts found!</h1>
<h1><?php echo i18n('No_posts_found');?>!</h1>

+ 1
- 1
themes/blog/profile.html.php View File

@ -29,7 +29,7 @@
<?php endforeach; ?>
</ul>
<?php } else {
echo 'No posts found!';
echo i18n('No_posts_found') . '!';
} ?>
</div><!--//item-->
</div><!--//content-->


+ 3
- 3
themes/clean/layout.html.php View File

@ -32,9 +32,9 @@
</div>
<div class="social"><?php echo social() ?></div>
<div class="menu"><?php echo menu() ?></div>
<div class="recent"><h3>Recent Posts</h3><?php echo recent_posts() ?></div>
<div class="archive"><h3>Archive</h3><?php echo archive_list() ?></div>
<div class="category-list"><h3>Category</h3><?php echo category_list() ?></div>
<div class="recent"><h3><?php echo i18n('Recent_posts');?></h3><?php echo recent_posts() ?></div>
<div class="archive"><h3><?php echo i18n('Archive');?></h3><?php echo archive_list() ?></div>
<div class="category-list"><h3><?php echo i18n('Category');?></h3><?php echo category_list() ?></div>
<div class="tagcloud"><h3>Tags</h3><?php echo tag_cloud() ?></div>
<div class="copyright"><?php echo copyright() ?></div>
</aside>


+ 1
- 1
themes/clean/no-posts.html.php View File

@ -1 +1 @@
<h1>No posts found!</h1>
<h1><?php echo i18n('No_posts_found');?>!</h1>

+ 1
- 1
themes/clean/profile.html.php View File

@ -38,5 +38,5 @@
</div>
<?php endif; ?>
<?php } else {
echo 'No posts found!';
echo i18n('No_posts_found') . '!';
} ?>

+ 1
- 1
themes/default/no-posts.html.php View File

@ -1 +1 @@
<h1>No posts found!</h1>
<h1><?php echo i18n('No_posts_found');?>!</h1>

+ 1
- 1
themes/default/profile.html.php View File

@ -37,5 +37,5 @@
</div>
<?php endif; ?>
<?php } else {
echo 'No posts found!';
echo i18n('No_posts_found') . '!';
} ?>

+ 1
- 1
themes/logs/layout.html.php View File

@ -75,7 +75,7 @@
</div>
<?php endif; ?>
<div class="category-list">
<h3>Category</h3>
<h3><?php echo i18n('Category');?></h3>
<?php echo category_list() ?>
</div>
<div class="tagcloud">


+ 1
- 1
themes/logs/no-posts.html.php View File

@ -1 +1 @@
<h1>No posts found!</h1>
<h1><?php echo i18n('No_posts_found');?>!</h1>

+ 1
- 1
themes/logs/profile.html.php View File

@ -38,5 +38,5 @@
</div>
<?php endif; ?>
<?php } else {
echo 'No posts found!';
echo i18n('No_posts_found') . '!';
} ?>

+ 1
- 1
themes/twentyfifteen/layout.html.php View File

@ -96,7 +96,7 @@
<?php echo archive_list() ?>
</aside>
<aside class="widget widget_meta">
<h2 class="widget-title">Category</h2>
<h2 class="widget-title"><?php echo i18n('Category');?></h2>
<?php echo category_list() ?>
</aside>
<aside class="widget widget_meta">


+ 1
- 1
themes/twentyfifteen/main.html.php View File

@ -1,5 +1,5 @@
<?php if (isset($is_category)):?>
<header class="page-header"><h1 class="page-title">Category: <?php echo $category->title;?></h1><div class="taxonomy-description"><?php echo $category->body;?></div></header>
<header class="page-header"><h1 class="page-title"><?php echo i18n('Category');?>: <?php echo $category->title;?></h1><div class="taxonomy-description"><?php echo $category->body;?></div></header>
<?php endif;?>
<?php if (isset($is_tag)):?>
<header class="page-header"><h1 class="page-title">Tag: <?php echo $tag->title;?></h1></header>


+ 1
- 1
themes/twentyfifteen/no-posts.html.php View File

@ -1 +1 @@
<h1>No posts found!</h1>
<h1><?php echo i18n('No_posts_found');?>!</h1>

+ 2
- 2
themes/twentyfifteen/profile.html.php View File

@ -19,12 +19,12 @@
$i++; ?>
<li class="<?php echo $class; ?>">
<span><a href="<?php echo $p->url ?>"><?php echo $p->title ?></a></span> on
<span><?php echo date('d F Y', $p->date) ?></span> - Posted in <span><?php echo $p->tag ?></span>
<span><?php echo strftime($date_format, $p->date) ?></span> - <?php echo i18n('Posted_in');?> <span><?php echo $p->tag ?></span>
</li>
<?php endforeach; ?>
</ul>
<?php } else {
echo 'No posts found!';
echo i18n('No_posts_found') . '!';
} ?>
</div>
</article>


+ 6
- 6
themes/twentysixteen/layout.html.php View File

@ -65,7 +65,7 @@
<aside id="secondary" class="sidebar widget-area" role="complementary">
<section class="widget widget_text">
<h2 class="widget-title">About</h2>
<h2 class="widget-title"><?php echo i18n("About");?></h2>
<div class="textwidget"><p><?php echo blog_description();?></p>
</div>
</section>
@ -74,14 +74,14 @@
<form role="search" class="search-form">
<label>
<span class="screen-reader-text">Search for:</span>
<input type="search" class="search-field" placeholder="Search &hellip;" value="" name="search" title="Search for:" />
<input type="search" class="search-field" placeholder="<?php echo i18n("Search");?> &hellip;" value="" name="search" title="<?php echo i18n("Search_for");?>:" />
</label>
<button type="submit" class="search-submit"><span class="screen-reader-text">Search</span></button>
</form>
</section>
<section id="recent-posts" class="widget widget_recent_entries">
<h2 class="widget-title">Recent Posts</h2>
<h2 class="widget-title"><?php echo i18n("Recent_posts");?></h2>
<?php echo recent_posts();?>
</section>
@ -100,17 +100,17 @@
<?php endif;?>
<section id="archives" class="widget widget_archive">
<h2 class="widget-title">Archives</h2>
<h2 class="widget-title"><?php echo i18n("Archives");?></h2>
<?php echo archive_list() ?>
</section>
<section id="category" class="widget widget_category">
<h2 class="widget-title">Category</h2>
<h2 class="widget-title"><?php echo i18n("Categories");?></h2>
<?php echo category_list() ?>
</section>
<section id="popular-tags" class="widget widget_popular_tags">
<h2 class="widget-title">Popular Tags</h2>
<h2 class="widget-title"><?php echo i18n("Popular_tags");?></h2>
<?php $i = 1; $tags = tag_cloud(true); arsort($tags); ?>
<ul>
<?php foreach ($tags as $tag => $count):?>


+ 5
- 5
themes/twentysixteen/main.html.php View File

@ -1,14 +1,14 @@
<?php if (isset($is_category)):?>
<header class="page-header"><h1 class="page-title">Category: <?php echo $category->title;?></h1><div class="taxonomy-description"><?php echo $category->body;?></div></header>
<header class="page-header"><h1 class="page-title"><?php echo i18n('Category');?>: <?php echo $category->title;?></h1><div class="taxonomy-description"><?php echo $category->body;?></div></header>
<?php endif;?>
<?php if (isset($is_tag)):?>
<header class="page-header"><h1 class="page-title">Tag: <?php echo $tag->title;?></h1></header>
<?php endif;?>
<?php if (isset($is_archive)):?>
<header class="page-header"><h1 class="page-title">Archive: <?php echo $archive->title;?></h1></header>
<header class="page-header"><h1 class="page-title"><?php echo i18n('Archive');?>: <?php echo $archive->title;?></h1></header>
<?php endif;?>
<?php if (isset($is_search)):?>
<header class="page-header"><h1 class="page-title">Search: <?php echo $search->title;?></h1></header>
<header class="page-header"><h1 class="page-title"><?php echo i18n('Search');?>: <?php echo $search->title;?></h1></header>
<?php endif;?>
<?php if (isset($is_type)):?>
<header class="page-header"><h1 class="page-title">Type: <?php echo ucfirst($type->title);?></h1></header>
@ -50,8 +50,8 @@
<footer class="entry-footer">
<span class="byline"><span class="author vcard"><a href="<?php echo $p->authorUrl;?>"><img alt="<?php echo $p->author;?>" src="<?php echo site_url();?>themes/twentysixteen/img/avatar.png" class="avatar avatar-49 grav-hashed grav-hijack" height="49" width="49"></a><span class="screen-reader-text">Author </span> <a class="url fn n" href="<?php echo $p->authorUrl;?>"><?php echo $p->author;?></a></span></span>
<span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="<?php echo $p->url;?>" rel="bookmark"><time class="entry-date published"><?php echo date('F d, Y', $p->date) ?></time></a></span>
<span class="cat-links"><span class="screen-reader-text">Category </span><?php echo $p->category;?></span>
<span class="posted-on"><span class="screen-reader-text"><?php echo i18n('Posted_on');?> </span><a href="<?php echo $p->url;?>" rel="bookmark"><time class="entry-date published"><?php global $date_format; echo strftime($date_format, $p->date) ?></time></a></span>
<span class="cat-links"><span class="screen-reader-text"><?php echo i18n('Category');?> </span><?php echo $p->category;?></span>
<span class="tags-links"><span class="screen-reader-text">Tags </span><?php echo $p->tag;?></span>
<?php if (disqus_count()) { ?>
<span class="comments-link"><a href="<?php echo $p->url ?>#disqus_thread"> comments</a></span>


+ 1
- 1
themes/twentysixteen/no-posts.html.php View File

@ -1,5 +1,5 @@
<article class="page type-page hentry">
<header class="entry-header">
<h1 class="entry-title">No posts found!</h1>
<h1 class="entry-title"><?php echo i18n('No_posts_found');?>!</h1>
</header><!-- .entry-header -->
</article><!-- #post-## -->

+ 4
- 4
themes/twentysixteen/post.html.php View File

@ -30,7 +30,7 @@
<hr>
<style>.related p {margin-top:0;margin-bottom:0.5em;} .related ul {margin-left:1em;}</style>
<div class="related">
<p><strong>Related Posts</strong></p>
<p><strong><?php echo i18n("Related_posts");?></strong></p>
<?php echo get_related($p->related);?>
</div>
</div>
@ -43,7 +43,7 @@
</div><!-- .author-avatar -->
<div class="author-description">
<h2 class="author-title"><span class="author-heading">Author:</span> <?php echo $author->name;?></h2>
<h2 class="author-title"><span class="author-heading"><?php echo i18n('Author');?>:</span> <?php echo $author->name;?></h2>
<?php echo $author->about;?>
</div><!-- .author-description -->
@ -54,9 +54,9 @@
<footer class="entry-footer">
<span class="byline"><span class="author vcard"><a href="<?php echo $p->authorUrl;?>"><img alt="<?php echo $p->author;?>" title="<?php echo $p->author;?>" src="<?php echo site_url();?>themes/twentysixteen/img/avatar.png" class="avatar avatar-49 grav-hashed grav-hijack" height="49" width="49"/></a><span class="screen-reader-text">Author </span> <a class="url fn n" href="<?php echo $p->authorUrl;?>"><?php echo $p->author;?></a></span></span>
<span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="<?php echo $p->url;?>" rel="bookmark"><time class="entry-date published"><?php echo date('F d, Y', $p->date) ?></time></a></span>
<span class="posted-on"><span class="screen-reader-text">Posted on </span><a href="<?php echo $p->url;?>" rel="bookmark"><time class="entry-date published"><?php echo strftime($date_format, $p->date) ?></time></a></span>
<span class="cat-links"><span class="screen-reader-text">Category </span><?php echo $p->category;?></span>
<span class="cat-links"><span class="screen-reader-text"><?php echo i18n('Category');?> </span><?php echo $p->category;?></span>
<span class="tags-links"><span class="screen-reader-text">Tags </span><?php echo $p->tag;?></span>


+ 1
- 1
themes/twentysixteen/profile.html.php View File

@ -24,7 +24,7 @@
<?php endforeach; ?>
</ul>
<?php } else {
echo 'No posts found!';
echo i18n('No_posts_found') . '!';
} ?>
</div>
</article>


Loading…
Cancel
Save