Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-3189

Custom lang strings for bottom tabs not always applied

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      This issue only needs to be tested in 1 device.

      Also, this issue requires being able to inspect the app.

      1. Go to admin/settings.php?section=mobilefeatures and set the following value for "customlangstrings":
        core.more|Settings|en
      2. Load the mobile app and connect to your site.
      3. Inspect the "More" button in the bottom tab bar, and find the <span class="tab-button-text"> element. Check that the span contains the string "Settings".
      4. Restart the app and repeat step 3. Do this 3-4 times and make sure it always works (the error described in this issue only happened sometimes).
      Show
      This issue only needs to be tested in 1 device. Also, this issue requires being able to inspect the app. Go to admin/settings.php?section=mobilefeatures and set the following value for "customlangstrings": core.more|Settings|en Load the mobile app and connect to your site. Inspect the "More" button in the bottom tab bar, and find the <span class=" tab-button-text "> element. Check that the span contains the string "Settings". Restart the app and repeat step 3. Do this 3-4 times and make sure it always works (the error described in this issue only happened sometimes).
    • Affected Branches:
      MOODLE_37_STABLE
    • Fixed Branches:
      MOODLE_38_STABLE
    • Sprint:
      Moodle App 3.8.0

      Description

      Steps to reproduce:

      • Go to admin/settings.php?section=mobilefeatures and set the following value for "customlangstrings":
        core.more|Settings|en
      • Load the mobile app and connect to your site.
      • Inspect the "more" button in the bottom tab bar, and find the <span class="tab-button-text"> element.
        • Expected: The span contains the string "Settings"
        • Actual: The span contains the string "more"

      This appears to be a race condition. Sometimes, the first call of TranslatePipe.transform('core.more') occurs before CoreLangProvider.loadCustomStrings(), so it returns the default value of "more". Future calls to transform with the same key will return the same value as before.

        Attachments

          Activity

            People

            Assignee:
            dpalou Dani Palou
            Reporter:
            marxjohnson Mark Johnson
            Peer reviewer:
            Pau Ferrer
            Integrator:
            Juan Leyva
            Tester:
            Noel De Martin
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              20/Dec/19