DEV: Update styleguide to use real i18n helper implementation (#24080)

This commit is contained in:
David Taylor 2023-10-25 10:15:19 +01:00 committed by GitHub
parent 895036bd7a
commit 605ec0ad9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,34 +1,32 @@
import I18n from "discourse-i18n";
import i18n from "discourse/helpers/i18n";
import StyleguideExample from "../../styleguide-example";
const t = I18n.t.bind(I18n);
<template>
<StyleguideExample @title="h1">
<h1>{{t "styleguide.sections.typography.example"}}</h1>
<h1>{{i18n "styleguide.sections.typography.example"}}</h1>
</StyleguideExample>
<StyleguideExample @title="h2">
<h2>{{t "styleguide.sections.typography.example"}}</h2>
<h2>{{i18n "styleguide.sections.typography.example"}}</h2>
</StyleguideExample>
<StyleguideExample @title="h3">
<h3>{{t "styleguide.sections.typography.example"}}</h3>
<h3>{{i18n "styleguide.sections.typography.example"}}</h3>
</StyleguideExample>
<StyleguideExample @title="h4">
<h4>{{t "styleguide.sections.typography.example"}}</h4>
<h4>{{i18n "styleguide.sections.typography.example"}}</h4>
</StyleguideExample>
<StyleguideExample @title="h5">
<h5>{{t "styleguide.sections.typography.example"}}</h5>
<h5>{{i18n "styleguide.sections.typography.example"}}</h5>
</StyleguideExample>
<StyleguideExample @title="h6">
<h6>{{t "styleguide.sections.typography.example"}}</h6>
<h6>{{i18n "styleguide.sections.typography.example"}}</h6>
</StyleguideExample>
<StyleguideExample @title="p">
<p>{{t "styleguide.sections.typography.paragraph"}}</p>
<p>{{i18n "styleguide.sections.typography.paragraph"}}</p>
</StyleguideExample>
</template>