Skip to content

$.i18n.Tr should not output fallback strings in production mode #12579

@silverwind

Description

@silverwind

Extracted from #12564

If an invalid translation key is passed, the function will render strings like signing.wont_sign.%!s(<nil>) into HTML which is ugly. We should only do that when gitea is in development mode, otherwise output empty string only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions