Here we can report duplicated variables for admin language files, and propose standardised definitions for them.
For catalog variables, please use: http://arastta.org/forum/duplicate-variables-list-catalog
Monday, June 08 2015, 12:19 PM
Share this post:
Responses (6)
  • Accepted Answer

    Monday, June 08 2015, 12:28 PM - #Permalink
    Starting by looking at admin/catalog/attribute.php it wouldn't be many strings left in it after cleaning up. :)

    // Text
    $_['text_success'] = 'The changes was successfully saved.';
    $_['text_list'] = 'List';
    $_['text_add'] = 'Add';
    $_['text_edit'] = 'Edit';


    // Column
    $_['column_name'] = 'Name';
    $_['column_attribute_group'] = 'Group';
    $_['column_sort_order'] = 'Sort Order';
    $_['column_action'] = 'Action';

    column_attribute_group should be changed into column_group ?

    // Entry
    $_['entry_name'] = 'Name';
    $_['entry_sort_order'] = 'Sort Order';

    Note! Is there any need for both column_name and entry_name, in English and other languages? In Norwegian it's not.
    At least there is no need for both column_sort_order and entry_sort_order...


    // Error
    $_['error_permission'] = 'Warning: You do not have permission to perform the selected action!';
    $_['error_name'] = 'Name must be between 3 and 64 characters!';
    $_['error_product'] = 'Warning: The selected item cannot be deleted as it is currently assigned to %s products!'

    Btw! I think we could skip the "Warning:" too. The text is already red isn't it? Anyhow it's not concise in the error messages now.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 08 2015, 01:20 PM - #Permalink
    For example, I am happy to have separate variables like
    column_name and entry_name

    We should keep them, because for example at the product form > Options I am using column_xx with ... for addtional explainations.
    Further it separates the logic between entries and display variables.

    What dou you think?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 08 2015, 01:24 PM - #Permalink
    Repeated variables.
    For example:
    text_success
    is used overall 103 times, all with the same meaning:
    Record successfully edited

    There is only one exception: extension/installer.php is using an additional explaination (here the German text):
    $_['text_success'] = 'Erweiterung wurde erfolgreich hochgeladen, um sie anzuwenden müssen jetzt die Anpassungen angewendet werden.
    Dazu bitte a href="/forum?route=extension/modification&token='%20.%20$_SESSION['token']%20.%20'" hier a klicken und auf Button Aktualisieren klicken';

    (code is stripped from the system here, that is why it looks strange)
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 08 2015, 01:28 PM - #Permalink
    Warning, Attention, Note

    There are all used at several places - and at least useless.
    Yes, I vote for deleting them.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 08 2015, 01:45 PM - #Permalink
    Michael wrote:We should keep them, because for example at the product form > Options I am using column_xx with ... for addtional explainations.
    Further it separates the logic between entries and display variables.

    I don't follow on this one, could you illustrate it with some English examples?

    Michael wrote:There is only one exception: extension/installer.php is using an additional explaination (here the German text):

    Could/Should be changed into $_['text_installer_success'] then.
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 08 2015, 01:54 PM - #Permalink
    Changing it into text_installer_success requires a change in the controller.
    Leaving it as it is - but only in that file - will override the default vars.

    Where we are at my next question: using
    $data = $this->language->all();
    will load all language vars at once instead of calling several times (e.g.)
    $data['text_database_header'] = $this->language->get('text_database_header');


    This would reduce the controller lines by approx. 20%
    The reply is currently minimized Show
Your Reply