Resolved Bug


This bug has been marked as resolved.

"Layout" naming issue

Permalink 7 0 Browser Info Environment
This is about line 53 in /concrete/models/layout.php

The naming of "Layout".

public function getLayoutNameTxt(){ return t('Layout'); }


This is not the good practice since this naming of the layout will be use for the CSS class eventually.

Using multibytes name for CSS class is not really a good practice.

So we kinda decided to take t() off, and use only "Layout" in English.

However, if we take it off, we need to write converter to convert the name of the layout in the table.

This is the major holds-up for our Japanese version now.

Thanks


Status: Resolved
katz515
katz515 replied on at Permalink
katz515
We are going to release

concrete5.4.1.1.1.ja

And this is the upgrade script

/concrete/helpers/concrete/upgrade/version_54111.php

<?php 
/**
 * @access private
 * @package Helpers
 * @category Concrete
 * @author Tao Sasaki <[email protected]>
 * @copyright  Copyright (c) 2003-2011 Concrete5. (http://www.concrete5.org)
 * @license   http://www.concrete5.org/license/...     MIT License
 */
defined('C5_EXECUTE') or die("Access Denied.");
class ConcreteUpgradeVersion54111Helper {
   public function run() {
      $db = Loader::db();
      // Changing the layout without t()
        $db->Execute("UPDATE Areas SET arHandle = replace(arHandle,'".t('Layout')."','Layout') WHERE arHandle LIKE '%: ".t('Layout')."%'");
Mnkras replied on at Permalink
Mnkras
i see what you mean,
Tao replied on at Permalink
Tao
To specify the css class name in multi-byte characters have no problem specification, but may be causing the problem.
katz515 replied on at Permalink
katz515
Adding Tao's note: One Japanese user pointed out that W3C allows to use Japanese (in Unicode) as the part of CSS class name.

However, we may face the character encoding issue...

Most of all, the serious issue is that you have a chance to lose the layout when switching the language.
katz515 replied on at Permalink
katz515
I made the thread to Internationalization section.

http://www.concrete5.org/community/forums/internationalization/nami...
syzlmr replied on at Permalink
As you say.

I also don't understand the reason to keep using t() for getLayoutNameTxt().

If I build my own site with English version at beginning, and install other language package later.

In that case, I think I will lose all my layout too. Except, the translator didn't translate the t('Layout'),or I have to change my database.

I agree it's a really Big problem for people using foreign languages.
andrew replied on at Permalink
andrew
Confirmed. Removing the t()

concrete5 Environment Information

All versions upto 5.4.1.1

Browser User-Agent String

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13