Skip to content

Commit

Permalink
Translate theme
Browse files Browse the repository at this point in the history
  • Loading branch information
wblondel committed Dec 22, 2023
1 parent 53d475f commit db757a6
Show file tree
Hide file tree
Showing 14 changed files with 94 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Source

The default theme for [Ghost](http:https://github.com/tryghost/ghost/). This is the latest development version of Source! If you're just looking to download the latest release, head over to the [releases](https://github.com/TryGhost/Source/releases) page.
The default theme for [Ghost](http:https://github.com/tryghost/ghost/). This is a fork of the development version of Source. The theme was made translatable. If you're just looking to download the latest official release, head over to the [releases](https://github.com/TryGhost/Source/releases) page.

 

Expand Down
23 changes: 23 additions & 0 deletions locales/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Read more": "Lies mehr",
"Featured": "Hervorgehoben",
"Powered by {ghostlink}": "Läuft mit {ghostlink}",
"Search posts, tags and authors": "Suche nach Beiträgen, Schlagwörtern und Autoren",
"Subscribe": "Abonnieren",
"Sign in": "Einloggen",
"Account": "Konto",
"Latest": "Neu",
"Upgrade": "Upgrade",
"Recommendations": "Empfehlungen",
"See all": "Alles ansehen",
"Search this site": "Suche auf dieser Webseite",
"By": "Von",
"Close (Esc)": "Schließen (ESC)",
"Share": "Teilen",
"Toggle fullscreen": "Vollbildanzeige",
"Zoom in/out": "Zoomen",
"Previous (arrow left)": "Vorheriges Bild (Linke Pfeiltaste)",
"Next (arrow right)": "Nächstes Bild (Rechte Pfeiltaste)",
"1 min read": "Lesezeit: 1 Minute",
"% min read": "Lesezeit: % Minuten"
}
23 changes: 23 additions & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Read more": "Read more",
"Featured": "Featured",
"Powered by {ghostlink}": "Powered by {ghostlink}",
"Search posts, tags and authors": "Search posts, tags and authors",
"Subscribe": "Subscribe",
"Sign in": "Sign in",
"Account": "Account",
"Latest": "Latest",
"Upgrade": "Upgrade",
"Recommendations": "Recommendations",
"See all": "See all",
"Search this site": "Search this site",
"By": "By",
"Close (Esc)": "Close (Esc)",
"Share": "Share",
"Toggle fullscreen": "Toggle fullscreen",
"Zoom in/out": "Zoom in/out",
"Previous (arrow left)": "Previous (arrow left)",
"Next (arrow right)": "Next (arrow right)",
"1 min read": "1 min read",
"% min read": "% min read"
}
23 changes: 23 additions & 0 deletions locales/fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Read more": "Plus d'articles...",
"Featured": "À la une",
"Powered by {ghostlink}": "Propulsé par {ghostlink}",
"Search posts, tags and authors": "Rechercher des articles, tags, et auteurs",
"Subscribe": "S'abonner",
"Sign in": "Se connecter",
"Account": "Compte",
"Latest": "Derniers articles",
"Upgrade": "Mettre à niveau",
"Recommendations": "Recommandations",
"See all": "Tout voir",
"Search this site": "Effectuez une recherche sur ce site",
"By": "Par",
"Close (Esc)": "Fermer (Echap)",
"Share": "Partager",
"Toggle fullscreen": "Passer en mode plein écran",
"Zoom in/out": "Zoomer / dézoomer",
"Previous (arrow left)": "Précédent (arrow left)",
"Next (arrow right)": "Suivant (arrow right)",
"1 min read": "1 min de lecture",
"% min read": "% min de lecture"
}
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 {ghostlink}" ghostlink="<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
12 changes: 6 additions & 6 deletions partials/components/post-list.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

{{#if showTitle}}
<h2 class="gh-container-title">
{{#unless title}}Latest{{else}}{{title}}{{/unless}}
{{#unless title}}{{t "Latest"}}{{else}}{{title}}{{/unless}}
</h2>
{{/if}}

Expand Down Expand Up @@ -92,21 +92,21 @@
{{/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}}
{{/if}}
</section>
{{#if @site.recommendations_enabled}}
<section class="gh-recommendations">
<h4 class="gh-sidebar-title">Recommendations</h4>
<h4 class="gh-sidebar-title">{{t "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 All @@ -115,7 +115,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}}

Expand Down
2 changes: 1 addition & 1 deletion 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" type="email" placeholder="[email protected]" required data-members-email>
<button class="gh-button" type="submit">
<span><span>Subscribe</span> {{> "icons/arrow"}}</span>
<span><span>{{t "Subscribe"}}</span> {{> "icons/arrow"}}</span>
{{> "icons/loader"}}
{{> "icons/checkmark"}}
</button>
Expand Down
12 changes: 6 additions & 6 deletions partials/lightbox.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<div class="pswp__top-bar">
<div class="pswp__counter"></div>

<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
<button class="pswp__button pswp__button--share" title="Share"></button>
<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
<button class="pswp__button pswp__button--close" title="{{t "Close (Esc)"}}"></button>
<button class="pswp__button pswp__button--share" title="{{t "Share"}}"></button>
<button class="pswp__button pswp__button--fs" title="{{t "Toggle fullscreen"}}"></button>
<button class="pswp__button pswp__button--zoom" title="{{t "Zoom in/out"}}"></button>

<div class="pswp__preloader">
<div class="pswp__preloader__icn">
Expand All @@ -30,8 +30,8 @@
<div class="pswp__share-tooltip"></div>
</div>

<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)"></button>
<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)"></button>
<button class="pswp__button pswp__button--arrow--left" title="{{t "Previous (arrow left)"}}"></button>
<button class="pswp__button pswp__button--arrow--right" title="{{t "Next (arrow right)"}}"></button>

<div class="pswp__caption">
<div class="pswp__caption__center"></div>
Expand Down
2 changes: 1 addition & 1 deletion partials/post-card.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
{{/if}}
<footer class="gh-card-meta"><!--
-->{{#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}}</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>
4 changes: 2 additions & 2 deletions post.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<div class="gh-article-meta-content">
<time class="gh-article-meta-date" datetime="{{date format="YYYY-MM-DD"}}">{{date}}</time>
{{#if reading_time}}
<span class="gh-article-meta-length"><span class="bull">—</span> {{reading_time}}</span>
<span class="gh-article-meta-length"><span class="bull">—</span> {{reading_time minute=(t "1 min read") minutes=(t "% min read")}}</span>
{{/if}}
</div>
</div>
Expand Down Expand Up @@ -64,7 +64,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

0 comments on commit db757a6

Please sign in to comment.