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

phpbb_extension_metadata_manager uses hard coded language for exceptions

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-dev
    • Fix Version/s: 3.1.0-RC1
    • Component/s: Extensions
    • Labels:

      Description

      throw new phpbb_extension_exception('The required file does not exist: ' . $this->metadata_file);

      throw new phpbb_extension_exception('The required file does not exist: ' . $this->metadata_file);

      throw new phpbb_extension_exception('file_get_contents failed on ' . $this->metadata_file);

      throw new phpbb_extension_exception('json_decode failed on ' . $this->metadata_file);

      As we have a user object there, we should use a language string

        Activity

        Hide
        EXreaction EXreaction [X] (Inactive) added a comment -

        There are errors people get when editing code or something along those lines incorrectly and errors users run into while managing a board.

        In the first case, I think it might be safe to assume some level of understanding of English (since code and comments are using English words). Translating these adds more work for translators when the errors should not be generally encountered.

        In the second case, we need translations because non-English users can run into the errors.

        Show
        EXreaction EXreaction [X] (Inactive) added a comment - There are errors people get when editing code or something along those lines incorrectly and errors users run into while managing a board. In the first case, I think it might be safe to assume some level of understanding of English (since code and comments are using English words). Translating these adds more work for translators when the errors should not be generally encountered. In the second case, we need translations because non-English users can run into the errors.
        Hide
        nickvergessen Joas Schilling added a comment -

        If a file is corrupted on upload, decode can fail, if a file is accidently deleted on the system, it does not exist. So 3 out of that 4 messages can happen to normal users.

        Also we try to translate every error, if possible. Cause not everyone familar with stuff (even programming) can speak english.

        Show
        nickvergessen Joas Schilling added a comment - If a file is corrupted on upload, decode can fail, if a file is accidently deleted on the system, it does not exist. So 3 out of that 4 messages can happen to normal users. Also we try to translate every error, if possible. Cause not everyone familar with stuff (even programming) can speak english.
        Hide
        EXreaction EXreaction [X] (Inactive) added a comment -

        What about a more general error then with specific details not being translated?

        Something like "Extension package invalid blah blah try reuploading..." (translated)
        "...missing file %s"
        "...file_get_contents failed %s"
        "...json_decode failed %s"

        Show
        EXreaction EXreaction [X] (Inactive) added a comment - What about a more general error then with specific details not being translated? Something like "Extension package invalid blah blah try reuploading..." (translated) "...missing file %s" "...file_get_contents failed %s" "...json_decode failed %s"

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development