Development

#6564 (Textual content from "generator.yml" is placed to "sf_admin" i18n dictionary)

You must first sign up to be able to contribute.

Ticket #6564 (new defect)

Opened 8 months ago

Last modified 7 months ago

Textual content from "generator.yml" is placed to "sf_admin" i18n dictionary

Reported by: VEnis Assigned to: fabien
Priority: minor Milestone:
Component: sfPropelPlugin Version: 1.2.7
Keywords: i18n generator Cc:
Qualification: Unreviewed

Description

By using admin generator and customizing it by creating some batch actions will bring result, that textual part of that actions was placed in the "sf_admin" dictionary, but must be placed in "messages". List actions are generated correctly in "messages" dictionary.

Change History

07/01/09 11:00:56 changed by fabien

  • milestone deleted.

Can you be a bit more explicit about the problem? Can you give some examples?

07/01/09 12:36:34 changed by VEnis

Ok. Here is an more detailed example. To see it, You must:

1) Create module, that is represented as admin generator (so this module can be customized by editing generator.yml file, located in the "config" subdirectory of the module directory.

2) Add some batch actions:

batch_actions:
  _delete: ~
  activate:   ~
  deactivate: ~
  markAsTemplatePage: { label: "Mark as Template Page" }
  markAsRegularPage: { label: "Mark as Regular Page" } 

3) Look at the generated cache files for that module and opening file '/templates/_list_batch_actions.php'. This file contains strings:

<option value=""><?php echo __('Choose an action', array(), 'sf_admin') ?></option>
    <option value="batchDelete"><?php echo __('Delete', array(), 'sf_admin') ?></option>
    <option value="batchActivate"><?php echo __('Activate', array(), 'sf_admin') ?></option>
    <option value="batchDeactivate"><?php echo __('Deactivate', array(), 'sf_admin') ?></option>
    <option value="batchMarkAsTemplatePage"><?php echo __('Mark as Template Page', array(), 'sf_admin') ?></option>
    <option value="batchMarkAsRegularPage"><?php echo __('Mark as Regular Page', array(), 'sf_admin') ?></option>

As we can see - all labels, that are generated, are placed into 'sf_admin' dictionary. But I think, labels for custom actions must be placed into dictionary, that is passed as 'i18n_catalogue' param in generator.yml file.

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.