Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Commit

Permalink
Additional i18n support marko-web-theme-monorail-magazine
Browse files Browse the repository at this point in the history
  • Loading branch information
Shinsina committed Oct 17, 2024
1 parent 93176f3 commit b34fd27
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 26 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getAsObject } from "@parameter1/base-cms-object-path";
import queryFragment from "../../graphql/fragments/magazine-latest-issue";

$ const { site } = out.global;
$ const { site, i18n } = out.global;
$ const { publicationId } = input;
$ const blockName = "magazine-issues"
$ const linkHeader = input.linkHeader || false;
Expand Down Expand Up @@ -42,10 +42,10 @@ $ const title = input.title || "In Print";
target: "_blank",
}
>
Subscribe
${i18n("Subscribe")}
</marko-web-magazine-publication-subscribe-url>
<marko-web-link href=`/magazine/${publicationId}` class="btn btn-secondary" >
Archives
${i18n("Archives")}
</marko-web-link>
</marko-web-element>
</marko-web-element>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getAsArray, getAsObject } from "@parameter1/base-cms-object-path";
import defaultValue from "@parameter1/base-cms-marko-core/utils/default-value";

$ const { site } = out.global;
$ const { site, i18n } = out.global;
$ const buttons = input.buttons || defaultValue(site.get("magazine.buttons"), ["subscribe", "digital-edition", "pdf", "archives", "change-address", "renewal", "cancel", "reprints", "e-inquiry"]);

$ const link = { class: "btn btn-primary" };
Expand All @@ -15,47 +15,47 @@ $ const issue = getAsObject(input, "issue");
<for|button| of=buttons>
<if(button === "subscribe")>
<marko-web-magazine-publication-subscribe-url tag=null obj=issue.publication link=targetBlankLink>
Subscribe
${i18n("Subscribe")}
</marko-web-magazine-publication-subscribe-url>
</if>
<if(button === "renewal")>
<marko-web-magazine-publication-renewal-url tag=null obj=issue.publication link=targetBlankLink>
Renew
${i18n("Renew")}
</marko-web-magazine-publication-renewal-url>
</if>
<if(button === "cancel")>
<marko-web-magazine-publication-cancel-url tag=null obj=issue.publication link=targetBlankLink>
Cancel
${i18n("Cancel")}
</marko-web-magazine-publication-cancel-url>
</if>
<if(button === "change-address")>
<marko-web-magazine-publication-change-address-url tag=null obj=issue.publication link=targetBlankLink>
Change Address
${i18n("Change Address")}
</marko-web-magazine-publication-change-address-url>
</if>
<if(button === "digital-edition")>
<marko-web-magazine-issue-digital-edition-url tag=null obj=issue link=targetBlankLink>
Digital Edition
${i18n("Digital Edition")}
</marko-web-magazine-issue-digital-edition-url>
</if>
<if(button === "pdf")>
<marko-web-magazine-issue-pdf-url tag=null obj=issue link=targetBlankLink>
Download PDF
${i18n("Download PDF")}
</marko-web-magazine-issue-pdf-url>
</if>
<if(button === "archives")>
<marko-web-magazine-publication-name tag=null obj=issue.publication link=link>
Archives
${i18n("Archives")}
</marko-web-magazine-publication-name>
</if>
<if(button === "reprints")>
<marko-web-magazine-publication-reprints-url tag=null obj=issue.publication link=targetBlankLink>
Reprints
${i18n("Reprints")}
</marko-web-magazine-publication-reprints-url>
</if>
<if(button === "e-inquiry")>
<marko-web-magazine-publication-einquiry-url tag=null obj=issue.publication link=targetBlankLink>
E-Inquiry
${i18n("E-Inquiry")}
</marko-web-magazine-publication-einquiry-url>
</if>
</for>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getAsArray, getAsObject } from "@parameter1/base-cms-object-path";
import defaultValue from "@parameter1/base-cms-marko-core/utils/default-value";

$ const { site } = out.global;
$ const { site, i18n } = out.global;
$ const buttons = input.buttons || defaultValue(site.get("magazine.links"), ["subscribe", "digital-edition", "pdf", "archives", "change-address", "renewal", "cancel", "reprints", "e-inquiry"]);

$ const link = { class: "magazine-link" };
Expand All @@ -15,47 +15,47 @@ $ const issue = getAsObject(input, "issue");
<for|button| of=buttons>
<if(button === "subscribe")>
<marko-web-magazine-publication-subscribe-url tag=null obj=issue.publication link=targetBlankLink>
Subscribe
${i18n("Subscribe")}
</marko-web-magazine-publication-subscribe-url>
</if>
<if(button === "renewal")>
<marko-web-magazine-publication-renewal-url tag=null obj=issue.publication link=targetBlankLink>
Renew
${i18n("Renew")}
</marko-web-magazine-publication-renewal-url>
</if>
<if(button === "cancel")>
<marko-web-magazine-publication-cancel-url tag=null obj=issue.publication link=targetBlankLink>
Cancel
${i18n("Cancel")}
</marko-web-magazine-publication-cancel-url>
</if>
<if(button === "change-address")>
<marko-web-magazine-publication-change-address-url tag=null obj=issue.publication link=targetBlankLink>
Change Address
${i18n("Change Address")}
</marko-web-magazine-publication-change-address-url>
</if>
<if(button === "digital-edition")>
<marko-web-magazine-issue-digital-edition-url tag=null obj=issue link=targetBlankLink>
Digital Edition
${i18n("Digital Edition")}
</marko-web-magazine-issue-digital-edition-url>
</if>
<if(button === "pdf")>
<marko-web-magazine-issue-pdf-url tag=null obj=issue link=targetBlankLink>
Download PDF
${i18n("Download PDF")}
</marko-web-magazine-issue-pdf-url>
</if>
<if(button === "archives")>
<marko-web-magazine-publication-name tag=null obj=issue.publication link=link>
Archives
${i18n("Archives")}
</marko-web-magazine-publication-name>
</if>
<if(button === "reprints")>
<marko-web-magazine-publication-reprints-url tag=null obj=issue.publication link=targetBlankLink>
Reprints
${i18n("Reprints")}
</marko-web-magazine-publication-reprints-url>
</if>
<if(button === "e-inquiry")>
<marko-web-magazine-publication-einquiry-url tag=null obj=issue.publication link=targetBlankLink>
E-Inquiry
${i18n("E-Inquiry")}
</marko-web-magazine-publication-einquiry-url>
</if>
</for>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import issueFragment from "../graphql/fragments/magazine-issue-archive";
import contentListFragment from "../graphql/fragments/magazine-content-feed-block";
import { get, getAsObject } from "@parameter1/base-cms-object-path";

$ const { site, pagination: p, } = out.global;
$ const { site, pagination: p, i18n } = out.global;
$ const { id, pageNode } = data;

<marko-web-magazine-issue-page-layout id=id>
Expand Down Expand Up @@ -77,14 +77,14 @@ $ const { id, pageNode } = data;
collapsible=false
>
<@header>
Past Issues
${i18n("Past Issues")}
</@header>
<@body>
<theme-magazine-issue-archive-flow nodes=nodes flush=true />
</@body>
<@footer>
<marko-web-magazine-publication-name tag=null obj=issue.publication link={ class: "btn btn-primary" }>
View All Past Issues
${i18n("View All Past Issues")}
</marko-web-magazine-publication-name>
</@footer>
</marko-web-node-list>
Expand Down

0 comments on commit b34fd27

Please sign in to comment.