ExportXMLWordPrintable

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Normal
    • None
    • Affects Version/s: None
    • Component/s: OAuth, Website
    • None

      On the OAuth authorization (consent) page, the page chrome is now localized (see MEB-190: ui_locales support), but the per-scope descriptions shown to the user remain in English regardless of the selected language. For example, with the UI in French, the page reads "Cette application a demandé l'autorisation d'accéder à :" but the scope list still shows:

      profile: View your public account information
      musicbrainz:collection: View and modify your private collections
      musicbrainz:submit_isrc: Submit new ISRCs to the database
      musicbrainz:submit_barcode: Submit new barcodes to the database
      musicbrainz:tag: View and modify your private tags
      musicbrainz:rating: View and modify your private ratings

      Root cause:

      Scope descriptions are stored as plain English text in the database (oauth.scope.description), seeded via SQL (admin/sql/oauth/create_tables.sql and admin/schema_updates/*.sql). They are rendered directly, without passing through gettext:

      • metabrainz/oauth/views.py (authorize view) -> scope.description
      • metabrainz/index/views.py (account page scope listing) -> scope.description
      • metabrainz/templates/macros.html -> "{{ scope.name }}: {{ scope.description }}"
        So they are never translated for the active locale.

      Proposed solution:

      Translate scope descriptions by their stable scope name (e.g. "profile", "musicbrainz:collection"), mirroring the error-code approach used in MEB-190 for OAuth error messages. Add a server-side gettext map (scope name -> translated description) and use it wherever scopes are shown to the user, falling back to the database description for unknown scopes. The DB description remains the English source/fallback; no schema change required.

      Affected locations:

      • metabrainz/oauth/views.py (authorize / consent)
      • metabrainz/index/views.py (account page)
      • metabrainz/templates/macros.html (server-rendered scope list)
      • frontend consent component(s) consuming the scope props

      Notes:

      • The new gettext strings will be picked up by the normal translation workflow (Weblate / messages.pot regeneration).
      • Keep the scope name (identifier) shown as-is; only the human-readable description is translated.

            Assignee:
            Unassigned
            Reporter:
            Zas
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

                Version Package