Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-8700

Language file "acp/styles.php" contains many unused language entries

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.x, 3.0.8
    • Fix Version/s: 3.1.0-b3
    • Component/s: Language pack
    • Labels:

      Description

      As per the title , the styles.php file contains many old entries, and i doubt that those language variables are used by mod writers.

      For example ; http://code.phpbb.com/repositories/revision/phpbb/7562
      That commit have deleted some language entries, and IMO it is quit useless and quit painless to translate those, since you can not test it since it is not used anywhere.

        Activity

        Hide
        Acyd Burn Meik Sievertsen [X] (Inactive) added a comment -

        They were removed, yes. What is the bug now? Which language entries are not used?

        Show
        Acyd Burn Meik Sievertsen [X] (Inactive) added a comment - They were removed, yes. What is the bug now? Which language entries are not used?
        Hide
        Raimon Raimon Meuldijk added a comment -

        Acyd Burn:

        What is the bug now?


        Language variables that are not used on phpBB3

        For example;

            'BACKGROUND'            => 'Background',    'BACKGROUND_COLOUR'        => 'Background colour',    'BACKGROUND_IMAGE'        => 'Background image',    'BACKGROUND_REPEAT'        => 'Background repeat',    'BOLD'                    => 'Bold',    'HIDE_CSS'                => 'Hide raw CSS',    'IMAGE_PARAMETER'            => 'Parameter',    'FOREGROUND'            => 'Foreground',    'FONT_COLOUR'            => 'Font colour',    'FONT_FACE'                => 'Font face',    'FONT_FACE_EXPLAIN'        => 'You can specify multiple fonts separated by commas. If a user doesn’t have the first font installed the first other working font will be chosen.',    'FONT_SIZE'                => 'Font size',    'ITALIC'                    => 'Italic',    'LINE_SPACING'                => 'Line spacing',    'NO_CLASS'                    => 'Cannot find class in stylesheet.',    'UNDERLINE'                => 'Underline',    'UNSET'                    => 'Undefined', 

        I'm going to dig a bit more if i can find more language entry's on the styles.php file.

        Show
        Raimon Raimon Meuldijk added a comment - Acyd Burn: What is the bug now? Language variables that are not used on phpBB3 For example;     'BACKGROUND'            => 'Background',    'BACKGROUND_COLOUR'        => 'Background colour',    'BACKGROUND_IMAGE'        => 'Background image',    'BACKGROUND_REPEAT'        => 'Background repeat',    'BOLD'                    => 'Bold',    'HIDE_CSS'                => 'Hide raw CSS',    'IMAGE_PARAMETER'            => 'Parameter',    'FOREGROUND'            => 'Foreground',    'FONT_COLOUR'            => 'Font colour',    'FONT_FACE'                => 'Font face',    'FONT_FACE_EXPLAIN'        => 'You can specify multiple fonts separated by commas. If a user doesn’t have the first font installed the first other working font will be chosen.',    'FONT_SIZE'                => 'Font size',    'ITALIC'                    => 'Italic',    'LINE_SPACING'                => 'Line spacing',    'NO_CLASS'                    => 'Cannot find class in stylesheet.',    'UNDERLINE'                => 'Underline',    'UNSET'                    => 'Undefined',  I'm going to dig a bit more if i can find more language entry's on the styles.php file.
        Hide
        Raimon Raimon Meuldijk added a comment -

        Also;

        'TEMPLATE_EXPORT' => 'Export templates',
        'TEMPLATE_EXPORTED' => 'Templates exported successfully and stored in %s.',
        'TEMPLATE_LOCATION' => 'Store templates in',

        Must that not be template instead of templates?

        Show
        Raimon Raimon Meuldijk added a comment - Also; 'TEMPLATE_EXPORT' => 'Export templates', 'TEMPLATE_EXPORTED' => 'Templates exported successfully and stored in %s.', 'TEMPLATE_LOCATION' => 'Store templates in', Must that not be template instead of templates?
        Hide
        nickvergessen Joas Schilling added a comment -

        With the removal of the editor, imagesets and the db storing of themes and templates, even more messages are unused. However it is quite hard to verify that the messages are not used anymore anywhere.

        I'd say what we could do is, just drop them now in develop and hope that they will be spotted if they are still required, before we release a final version

        Show
        nickvergessen Joas Schilling added a comment - With the removal of the editor, imagesets and the db storing of themes and templates, even more messages are unused. However it is quite hard to verify that the messages are not used anymore anywhere. I'd say what we could do is, just drop them now in develop and hope that they will be spotted if they are still required, before we release a final version
        Hide
        EXreaction EXreaction [X] (Inactive) added a comment -

        It should be fairly trivial to write a script that loads a language file and then searches the filesystem for the keys. You could write some PHP that executes a grep filesystem wide.

        Show
        EXreaction EXreaction [X] (Inactive) added a comment - It should be fairly trivial to write a script that loads a language file and then searches the filesystem for the keys. You could write some PHP that executes a grep filesystem wide.
        Hide
        nickvergessen Joas Schilling added a comment -

        EXreaction [X] the problem is we concatinate strings with variable very often.

        Show
        nickvergessen Joas Schilling added a comment - EXreaction [X] the problem is we concatinate strings with variable very often.
        Hide
        EXreaction EXreaction [X] (Inactive) added a comment - - edited

        Do you mean like lang('FOO_' . $bar)?

        Show
        EXreaction EXreaction [X] (Inactive) added a comment - - edited Do you mean like lang('FOO_' . $bar)?
        Hide
        nickvergessen Joas Schilling added a comment -

        yes, or even worse lang[$var]

        Show
        nickvergessen Joas Schilling added a comment - yes, or even worse lang [$var]
        Hide
        nickvergessen Joas Schilling added a comment -

        I went through the acp_styles file (its only included there) and the template file and prepared a patch. However github is denying pushes at the moment.

        Show
        nickvergessen Joas Schilling added a comment - I went through the acp_styles file (its only included there) and the template file and prepared a patch. However github is denying pushes at the moment.

          People

          • Assignee:
            nickvergessen Joas Schilling
            Reporter:
            Raimon Raimon Meuldijk
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development