Translate-plugin: Localizations only working on CMS, not on static pages

Created on 30 Dec 2016  路  4Comments  路  Source: rainlab/translate-plugin

Hi, I've been having the same bug since I started using OctoberCMS with Rainlab's stuff on edgeUpdates. This is happening on all platforms (Ubuntu / OSX / PHP 6 & 7).

Basically I noticed that all static pages with content have no localizations working. (i.e. We only can see 'nav.home' instead of the actual localized content). If I remove the content, the localizations come back magically. (i.e. 'nav.home' becomes 'Home' again)

Also, localizations work for all CMS pages. (I have a contact and products page using the CMS tab and these are all fully localized).

Both static pages and CMS use the same layout. (I also tried separating layouts with no luck)

Feel free to ask for more details. I will add a few screenshots later.
Thanks!

Most helpful comment

OctoberCMS 1.0.391, Pages 1.2.13, Translate 1.2.8

  1. add two languages: EN (default and one other: HR)
  2. create a new theme
  3. add layout layouts/main.htm
[localePicker]
forceUrl = 1
[staticPage]
==
<html>
<head>
    <title>{{ this.page.title }} - Test l10n</title>
</head>
<body>
    {% partial "partial10n" %}
    {% page %}
</body>
</html>
  1. add partial partials/partial10n.htm
[viewBag]
==
<header>
{{ 'Am I translated?'|_ }} {{ activeLocale }}    
</header>
  1. add static page content/static-pages/content-page.htm
[viewBag]
title = "Content page"
url = "/content-page"
layout = "main"
is_hidden = 0
navigation_hidden = 0
==
<p>Content</p>
  1. add static page content/static-pages/no-content-page.htm
[viewBag]
title = "No content page"
url = "/no-content-page"
layout = "main"
is_hidden = 0
navigation_hidden = 0
==
  1. translate the only available message in Settings/Translate messages

Observe (unexpected) different translations in header of the following pages:
/hr/content-page
/hr/no-content-page

All 4 comments

Basically I noticed that all static pages with content have no localizations working.

Confirmed.

204

This issue lacks enough detail or the replication instructions cannot be actioned easily. As per the contribution guidelines, please provide the exact steps you are taking for the issue to occur. This will be used for peer review.

Here is an example of a bug summary:

The CMS page URL is not being set automatically from the title value.

Here is an example of some reproduce steps:

  1. In the back-end, open the CMS > Pages section
  2. Click the "Add" button
  3. Enter [Hello] for the Title field
  4. Click the Save button

Here is an example of expected behavior:

  • The Title should be set to [Hello]
  • The URL should be set to [/hello]

Here is an example of actual behavior:

  • The Title is set to [Hello] correctly
  • The URL is left empty

OctoberCMS 1.0.391, Pages 1.2.13, Translate 1.2.8

  1. add two languages: EN (default and one other: HR)
  2. create a new theme
  3. add layout layouts/main.htm
[localePicker]
forceUrl = 1
[staticPage]
==
<html>
<head>
    <title>{{ this.page.title }} - Test l10n</title>
</head>
<body>
    {% partial "partial10n" %}
    {% page %}
</body>
</html>
  1. add partial partials/partial10n.htm
[viewBag]
==
<header>
{{ 'Am I translated?'|_ }} {{ activeLocale }}    
</header>
  1. add static page content/static-pages/content-page.htm
[viewBag]
title = "Content page"
url = "/content-page"
layout = "main"
is_hidden = 0
navigation_hidden = 0
==
<p>Content</p>
  1. add static page content/static-pages/no-content-page.htm
[viewBag]
title = "No content page"
url = "/no-content-page"
layout = "main"
is_hidden = 0
navigation_hidden = 0
==
  1. translate the only available message in Settings/Translate messages

Observe (unexpected) different translations in header of the following pages:
/hr/content-page
/hr/no-content-page

Duplicate of #204?

Was this page helpful?
0 / 5 - 0 ratings