Skip to content

🌐 Introduction of i18n and Bulgarian translation #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions locales/bg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"By": "от",
"Sign in": "Вход",
"Subscribe": "Абонамент",
"Upgrade": "Ъпгрейд",
"Account": "Профил",
"Featured": "Избрано",
"Powered by": "Създаден с",
"See all": "Виж всички",
"Read more": "Още",
"Search this site": "Търси в сайта",
"Search posts, tags and authors": "Търси публикации, етикети и автори"
}
13 changes: 13 additions & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"By": "By",
"Sign in": "Sign in",
"Subscribe": "Subscribe",
"Upgrade": "Upgrade",
"Account": "Account",
"Featured": "Featured",
"Powered by": "Powered by",
"See all": "See all",
"Read more": "Read more",
"Search this site": "Search this site",
"Search posts, tags and authors": "Search posts, tags and authors"
}
2 changes: 1 addition & 1 deletion partials/components/featured.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{#get "posts" filter="featured:true" include="authors" limit=limit as |featured|}}
<section class="gh-featured gh-outer">
<div class="gh-featured-inner gh-inner">
<h2 class="gh-featured-title">Featured</h2>
<h2 class="gh-featured-title">{{t "Featured"}}</h2>
<div class="gh-featured-feed">
{{#foreach featured}}
{{> "post-card" imageSizes="80px"}}
Expand Down
2 changes: 1 addition & 1 deletion partials/components/footer.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
{{navigation type="secondary"}}
</nav>
<div class="gh-footer-copyright">
Powered by <a href="https://ghost.org/" target="_blank" rel="noopener">Ghost</a>
{{t "Powered by"}} <a href="https://ghost.org/" target="_blank" rel="noopener">Ghost</a>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion partials/components/header-content.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<h1 class="gh-header-title is-title">{{#if @custom.header_text}}{{@custom.header_text}}{{else}}{{@site.description}}{{/if}}</h1>
<form class="gh-form">
{{> "icons/search"}}
<button class="gh-form-input" data-ghost-search>Search posts, tags and authors</button>
<button class="gh-form-input" data-ghost-search>{{t "Search posts, tags and authors"}}</button>
</form>
{{/match}}

Expand Down
8 changes: 4 additions & 4 deletions partials/components/navigation.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
<div class="gh-navigation-members">
{{#unless @member}}
{{#unless @site.members_invite_only}}
<a href="#/portal/signin" data-portal="signin">Sign in</a>
<a href="#/portal/signin" data-portal="signin">{{t "Sign in"}}</a>
{{#unless hideSubscribeButton}}
<a class="gh-button" href="#/portal/signup" data-portal="signup">Subscribe</a>
<a class="gh-button" href="#/portal/signup" data-portal="signup">{{t "Subscribe"}}</a>
{{/unless}}
{{else}}
<a class="gh-button" href="#/portal/signin" data-portal="signin">Sign in</a>
<a class="gh-button" href="#/portal/signin" data-portal="signin">{{t "Sign in"}}</a>
{{/unless}}
{{else}}
<a class="gh-button" href="#/portal/account" data-portal="account">Account</a>
<a class="gh-button" href="#/portal/account" data-portal="account">{{t "Account"}}</a>
{{/unless}}
</div>
{{/unless}}
Expand Down
8 changes: 4 additions & 4 deletions partials/components/post-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@

{{#match pagination.pages ">" 1}}
<div class="gh-more is-title">
<a href="{{@site.url}}/page/2">See all {{> "icons/arrow"}}</a>
<a href="{{@site.url}}/page/2">{{t "See all"}} {{> "icons/arrow"}}</a>
</div>
{{/match}}
</main>
Expand All @@ -98,11 +98,11 @@
{{/if}}
{{#if @site.members_enabled}}
{{#unless @member}}
<button class="gh-button" data-portal="signup">Subscribe</button>
<button class="gh-button" data-portal="signup">{{t "Subscribe"}}</button>
{{else}}
{{#if @site.paid_members_enabled}}
{{#unless @member.paid}}
<button class="gh-button" data-portal="upgrade">Upgrade</button>
<button class="gh-button" data-portal="upgrade">{{t "Upgrade"}}</button>
{{/unless}}
{{/if}}
{{/unless}}
Expand All @@ -112,7 +112,7 @@
<section class="gh-recommendations">
<h4 class="gh-sidebar-title">Recommendations</h4>
{{recommendations}}
<button data-portal="recommendations">See all {{> "icons/arrow"}}</button>
<button data-portal="recommendations">{{t "See all"}} {{> "icons/arrow"}}</button>
</section>
{{/if}}
</div>
Expand Down
4 changes: 2 additions & 2 deletions partials/email-subscription.hbs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<form class="gh-form" data-members-form>
<input class="gh-form-input" id="{{email_field_id}}" name="email" type="email" placeholder="[email protected]" required data-members-email>
<button class="gh-button" type="submit" aria-label="Subscribe">
<span><span>Subscribe</span> {{> "icons/arrow"}}</span>
<button class="gh-button" type="submit" aria-label="{{t "Subscribe"}}">
<span><span>{{t "Subscribe"}}</span> {{> "icons/arrow"}}</span>
{{> "icons/loader"}}
{{> "icons/checkmark"}}
</button>
Expand Down
2 changes: 1 addition & 1 deletion partials/post-card.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
{{/has}}
{{/unless}}<!--
-->{{#if @custom.show_author}}
<span class="gh-card-author">By {{#foreach authors}}{{#if @first}}{{name}}{{else}}, {{name}}{{/if}}{{/foreach}}</span>
<span class="gh-card-author">{{t "By"}} {{#foreach authors}}{{#if @first}}{{name}}{{else}}, {{name}}{{/if}}{{/foreach}}</span>
{{/if}}
{{#if @custom.show_publish_date}}
<time class="gh-card-date" datetime="{{date format="YYYY-MM-DD"}}">{{date format="DD MMM YYYY"}}</time>
Expand Down
2 changes: 1 addition & 1 deletion partials/search-toggle.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<button class="gh-search gh-icon-button" aria-label="Search this site" data-ghost-search>
<button class="gh-search gh-icon-button" aria-label="{{t "Search this site"}}" data-ghost-search>
{{> "icons/search"}}
</button>
2 changes: 1 addition & 1 deletion post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
{{#if next}}
<section class="gh-container is-grid gh-outer">
<div class="gh-container-inner gh-inner">
<h2 class="gh-container-title">Read more</h2>
<h2 class="gh-container-title">{{t "Read more"}}</h2>
<div class="gh-feed">
{{#foreach next}}
{{> "post-card" lazyLoad=true}}
Expand Down