Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-5469

Document Mongoid's reliance on existence of I18n.fallbacks to mean fallbacks are enabled

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      As identified in https://github.com/mongodb/mongoid/pull/5427, i18n does not provide a public API to interrogate it as to whether fallbacks are enabled. Mongoid currently checks whether I18n.fallbacks exists, however this field is defined when the fallbacks backend extension is loaded and not when it's actually used by the active backend, hence the check is not strictly correct.

      Since there haven't been any reports about this in the last 4+ years, I assume that applications either always have fallbacks on or always have them off and don't load them in the latter case.

      I think a warning in documentation wouldn't hurt for anyone who might be trying to use i18n more adventurously than just copy-pasting our usage guidance (I imagine another reason why this is unlikely is because i18n appears to have minimal documentation) .

            Assignee:
            Unassigned Unassigned
            Reporter:
            oleg.pudeyev@mongodb.com Oleg Pudeyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: