Over and over again (gave up to post about at OC) there are so many duplicated language variables.

I think we should reworkd the curretn files before other start translating.
For example (did not count, but all of them are existing in many files) - only a few:
$_['text_success']	
$_['text_list']
$_['text_add']
$_['text_edit']

$_['column_name']
$_['column_action']

$_['entry_name']

$_['error_permission']


Boring!!
Could we move such either into the main file or create an additonal file with 'common' phrases?
Sunday, June 07 2015, 03:29 PM
Like
1
Share this post:
Responses (9)
  • Accepted Answer

    Sunday, June 07 2015, 05:17 PM - #Permalink
    I fully agree on this on, and was actually going to post about it when I saw this.

    Instead of the unneeded "local" use for each page, it could simply be defaults changed into something like:
    $_['text_success'] = The change was successfully saved.
    $_['text_list'] = List
    $_['text_add'] = Add
    $_['text_edit'] = Edit

    $_['column_name'] = Name
    $_['column_action'] = Action

    $_['entry_name'] = Name

    $_['error_permission'] = Warning: You do not have permission to perform the selected action!


    Myself, I have already starting using this standard for all duplicates of it.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, June 07 2015, 05:36 PM - #Permalink
    Another related issue is all the unused strings.

    Maybe there is need for a language debug, like in Joomla, displaying unused and missing strings.
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, June 07 2015, 07:54 PM - #Permalink
    Rune Rasmussen wrote:

    I fully agree on this on, and was actually going to post about it when I saw this.

    Instead of the unneeded "local" use for each page, it could simply be defaults changed into something like:
    $_['text_success'] = The change was successfully saved.
    $_['text_list'] = List
    $_['text_add'] = Add
    $_['text_edit'] = Edit

    $_['column_name'] = Name
    $_['column_action'] = Action

    $_['entry_name'] = Name

    $_['error_permission'] = Warning: You do not have permission to perform the selected action!


    Myself, I have already starting using this standard for all duplicates of it.

    Not only you ;)
    I have done this seince a long time ago in all German language files.
    So instead of having (e.g.)
    $_['text_success']           = 'Success: You have modified attributes!';

    it could be a global message like
    $_['text_success']           = 'Settings successfully edited';

    or modified or stored or somethingelse ...

    Do you agree Rune (and of course all others) if we can find a practiable solution?
    Before x people start to translate the same sh**
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, June 07 2015, 08:08 PM - #Permalink
    How this:

    $_['text_success']           = 'Settings successfully %s edited!';


    and:

    $data['text_success'] = sprintf('attributes', $this->language->get('text_success'),'');
    The reply is currently minimized Show
  • Accepted Answer

    Sunday, June 07 2015, 08:50 PM - #Permalink
    No need for that Pekka, and anyhow upper-case letters within sentences is no good for most languages - so it would not help much neither. People should know which page they are working on, no need to specify it in all strings - common shared strings works fine.

    And yes Michael, I agree that this should be cleaned up during the coming months - but I don't agree on putting the translations on hold until that task is completed. It's a bit annoying, but no show-stopper.

    Edit! Actually most of the error messages could be standardised too.
    T.ex. error_name: "Module Name must be between 3 and 64 characters!" -> "Name must be between 3 and 64 characters!"
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 08 2015, 10:29 AM - #Permalink
    Hello Rune,

    meant not that it is a 'show-stopper', it is only boring.

    So how can we proceed?
    Translations are made - that is okay.
    I suggest to summarize all variables which are double (and much more ..).
    But where to move these 'global' vars - into the main file?
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 08 2015, 11:51 AM - #Permalink
    If the main file is loaded on all pages, it would be the right place for it I guess. If I remember correctly this is how it works in t.ex. Joomla. Making an extra language file to be loaded on all pages, if there's one already wouldn't make any sense.

    Anyhow we would need to make the list of duplicates, and agree on the standardized English definitions for it.
    Then add them to the main file, and start removing those from all other files - making the patch and PR for it.

    It's a time consuming task... :)
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 08 2015, 12:00 PM - #Permalink
    That is the purpose of the default.php file which is loaded on all pages, to contain the main variables.

    The Translation Team can do a work sharing on making the list of duplicates.
    Like
    1
    The reply is currently minimized Show
  • Accepted Answer

    Monday, June 08 2015, 12:34 PM - #Permalink
    The reply is currently minimized Show
Your Reply