Change hard coded text in footer so I can translate it

Change hard coded text in footer so I can translate it

Anne-Marieke
Excursionist
42 1 4

Hi everyone,

 

I have some text on my webshop that I hardcoded in the past. Now I am translating the site into English as well, so I want to avoid hard coded text as much as possible.

I've created some name structures to use:

 

 

{
  "general": {
    "no_valid_customer": {
      "error_line": "Only certified customers can order.",
      "error_image": "You must be a verified customer to view and download the images.",
      "error_pricelist": "You must be a verified customer to download the price list."
    },
    "custom": {
      "footertext": "Bickery Food Group reserves the right to change packaging and prices. Our products are only available through reputable Christmas and gift package suppliers. The information on this webshop is subject to typing errors."
    },

 

 

For example, 

 

 

<p style="text-align: center;"><span>{{ 'general.no_valid_customer.error_image' | t }}</span></p>

 

 

works perfectly fine somewhere else on the site.

But when I try to add:

 

 

{{ 'general.custom.footertext’ | t }}

 

 

to the footer text, I get errors. 

I want to place it here, where the hard coded text is now:

 

 

            {%- if request.page_type == 'blog' or request.page_type == 'article' -%}
              <li>
                <a class="social-icons__link" href="{{ shop.url }}{{ blog.url }}.atom">
                  {% include 'icon-rss' %}
                  <span class="icon__fallback-text">RSS</span>
                </a>
              </li>
            {%- endif -%}
          </ul>
        {%- else -%}
          <div class="small--hide site-footer-item-align-right {% if show_selectors or show_payment_icons %}site-footer-item-center-vertically{% endif %}">
            <small class="site-footer__copyright-content">&copy; {{ 'now' | date: "%Y" }}, {{ shop.name | link_to: routes.root_url }}</small> <br>
            <small class="site-footer__copyright-content site-footer__copyright-content-powered-by".>Bickery Food Group reserves the right to change packaging and prices. Our products are only available through reputable Christmas and gift package suppliers. The information on this webshop is subject to typing errors.</small>
          </div>
        {%- endif -%}

 

 

 

I feel like I'm missing a small thing to make this work. Anyone that can advise?
The webshop is: https://www.bickerykerst.nl

Thank you in advance!

Replies 0 (0)