Skip to content

problem with translation strings for pages #59

@lhtdesignde

Description

@lhtdesignde

Hi guys,

i'm using this plugin quite heavily at the moment and am happy that it works for me almost 100%. So great work! I do have one compiling issue with the pages feature though.
I have around 8 pages which have a custom title. I'm generating the navigation out of the page titles:

{{#withSort pages "data.sortorder"}}
    {{#is data.language ../language}}
    <li class="nav-item item-{{this.basename}}{{#if this.isCurrentPage}} active{{/if}}">
        <a href="{{relative dest this.dest}}">{{ data.title }}</a>
    </li>
    {{/is}}
{{/withSort}}
title: '<%= i18n[language].H_I_02 %>'
layout: 'lyt-default.hbs'
description: 'press page'
sortorder: 3

in the json:

    "H_I_01": "FAQs",
    "H_I_02": "Press",
    "H_I_03": "Contact",
    "H_I_04": "Newsletter",

For around half of the pages the translation of the titles works but for some pages I get just the string rendered out into the navigation. So on some pages I get the following navigation:
FAQs | <%= i18n[language].H_I_02 %> | Contact | Newsletter OR
<%= i18n[language].H_I_01 %> | <%= i18n[language].H_I_02 %> | Contact | Newsletter

I'm not sure how this happened. All pages have the same implementation of the title string. Also weird that on the page itself the string is fine. So in this example above, if I'd click the weird string which is supposed to be press, the navigation shows correctly on the press page.

I tried to reduce the complexity of how the pages are rendered out (without sort, without url etc) but it's always the same result.

Do you have any idea what went wrong? In which area would I need to look, to fix this?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions