Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26545

Android: Using global L() method for localization does not work if second argument is not supplied

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 8.0.0, Release 7.5.1
    • Component/s: Android
    • Labels:
      None
    • Story Points:
      8
    • Sprint:
      2018 Sprint 25

      Description

      If the L method does not receive a second parameter, the fallback string is not displayed if not supplied as a second argument. This works fine on iOS.

      Example:

      // Works
      L('Hello world', 'Hello world');
       
      // Does not work on Android, works on iOS
      L('Hello world');
      

      This triggered TIMOB-26544 and is kind of a blocker for us.

      Update: We now implemented a workaround using the ti.shell feature (in a L.bootstrap.js):

      global.Lx = (value, comment) => {
          return L(value, comment || value);
      };
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cwilliams Christopher Williams
                Reporter:
                hknoechel Hans Knöchel
                Tester:
                Samir Mohammed
              • Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-6694
                    Sync status:
                    PENDING
                    Last received:
                    Last sent:

                    Git Source Code